UiPath Robot API - Better documentation

Andrew Teece
May 16, 2016 12:59
I’m working to submit data to a UIPath robot on a remote system over a HTTP connection.

I have 3 questions which I hope can be quickly answered and the documentation updated (as I think it should already be stated).

1# When passing/retrieving date/time values to/from the StartJob or QueryJob methods what timezone should they be in? I’m hoping UTC as it is constant and doesn’t worry about daylight savings, etc. If not how do I get the timezone UIPath expects (if it is the servers timezone) or how do I tell UIPath the tz of the values I’m passing?

2# What is the OpenSessionInfo object? It isn’t documented but is a parameter of a JobModel object. What is the Exception object, it also isn’t documented. Is it a serialized .Net Exception object?

3# If a workflow (on a remote system started over HTTP) needs to upload a file how can this be passed to the RESTful web service and used in the UIPath flow? Activities always seem to be want to use local files.

Andrew Teece May 18, 2016 13:11
For anyone else struggling with this I have found the objects in the UIPath.Models assembly.

So the ExecutionStatus of the JobStatus object which is documented as a string of {NotStarted, Processing, Finished, Error, Cancelled, Cancelling, JobMissing}

Is actually an Enum, of

public enum ExecutionStatus
{
JobMissing,
NotStarted,
Processing,
Cancelling,
Cancelled,
Error,
Finished,
}

The Status field (not even documented) will give you the text instead of the integer.

@Restful Services, edit the WebApi.config to add the regular expressions to pass the parameters with the validations ( Integer, Decimal, Float, Alpha numeric, Date, Time, DateTime, Unique Identifiers).

Example:
/// Query string parameters date → http://localhost/api/proc/4/test/dd-MMM-yyyy
config.Routes.MapHttpRoute(
name: “DefaultApiDate”,
routeTemplate: “api/{controller}/{alpha}/{beta}/{gamma}”,
defaults: new { alpha = RouteParameter.Optional, beta = RouteParameter.Optional },
constraints: new { gamma = @“^(([0-9])|([0-2][0-9])|([3][0-1]))-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-\d{4}$” }