Skip to content

Reference

Quentin Brandon edited this page Apr 4, 2018 · 5 revisions

Orchestrator class

Constructor

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'
});

switchOrganizationUnitId method

orchestratorInstance.switchOrganizationUnitId(organizationUnitId: number);

// Example
orchestratorInstance.switchOrganizationUnitId(5);

Generic HTTP methods

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));
     }
);

API helpers

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

Other

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.

Clone this wiki locally