-
Notifications
You must be signed in to change notification settings - Fork 7
Reference
Quentin Brandon edited this page Apr 4, 2018
·
5 revisions
var orchestratorInstance = new Orchestrator({
tenancyName: string (optional),
usernameOrEmailAddress: string (required),
password: string (required),
hostname: string (required),
isSecure: boolean (optional, default=true),
port: integer (optional, [1..65535], default={443,80} depending on isSecure),
invalidCertificate: boolean (optional, default=false),
connectionPool: number (optional, 0=unlimited, default=1)
});
// Example
var orchestratorInstance = new Orchestrator({
usernameOrEmailAddress: 'admin',
password: 'Password!',
hostname: 'orchestrator.mydomain.com'
});orchestratorInstance.switchOrganizationUnitId(organizationUnitId: number);
// Example
orchestratorInstance.switchOrganizationUnitId(5);orchestratorInstance.get(path: string, query: Object, function(err: Error, res: Object));
orchestratorInstance.post(path: string, data: Object, function(err: Error, res: Object));
orchestratorInstance.put(path: string, data: Object, function(err: Error, res: Object));
orchestratorInstance.patch(path: string, data: Object, function(err: Error, res: Object));
orchestratorInstance.delete(path: string, function(err: Error, res: Object));
// Example
orchestratorInstance.get(
'/odata/Users/UiPath.Server.Configuration.OData.GetCurrentUser()',
{},
function (err, res) {
if (err) {
console.error(err.message);
}
console.log(JSON.stringify(res));
}
);The helpers for each API version can be accessed through properties of your Orchestrator instance.
Version 2 (v2 property) reference
Remark: you can also consult the swagger reference on platform.uipath.com: https://platform.uipath.com/swagger/ui/index
Note that the current token is stored in the private _credentials (string) property.
It may come in handy if you want to bypass the login in some cases.