API Reference

Add Task

POST  ConsoleServerAddress:API_port_number/task/add

  • ConsoleServerAddress = FQDN of the Console Plus Server as defined during Nintex RPA Server installation

  • API_port_number = API port as defined during Nintex RPA Server installation

    • If required, you can check this number in NGINX (in the Bindings for the WebAPI website)

    • Default value = 44445

  • Example: MACHINENAME.COMPANYDOMAIN.COM:44445/task/add

API controller name

Task

Method name

Add

Input

WebRequest (json)

Output

WebResponse (json)

Add Task: WebRequest Parameters

WizardCustomId

String

ID of the wizard to execute

  • See Appendix A for information about viewing/creating wizard custom IDs

NumberOfRuns

Long

Parameter is obsolete. Number of wizard runs per task is always set to 1.

Warning is sent to log if set greater than 1.

SingleRunEstimation

Long

Parameter is obsolete. Warning is sent to log if parameter is used.

Variables

Array (String, String)

List of initial variable names and values to be populated into the wizard

QueuePriority

Integer

Priority in task queue:

  • 1 - Highest

  • 10 - Lowest

GroupName

String

Robot group to which to assign the task; default is empty (any available robot)

MachineName

String

Robot name to which to assign the task; default is empty (any available robot)

Add Task: WebResponse Parameters

{

TaskId:<long>,

Status:<int>,

Error:<int>,

OutputData: <string>

}

TaskId

Long

ID of the added task

Status

Integer

(N/A – will be empty)

Error

Integer

(N/A – will be empty)

OutputData

String

(N/A – will be empty)

Example

var request = {

WizardCustomid: ‘A_123’,

Variables: [{Name: 'var1', Value: 'one'},

{Name: 'var2', Value: 'two'}]};

$.ajax({

url: '/task/add',

data: JSON.stringify(request),

type: 'post',

crossDomain: true,

contentType: 'application/json; charset=utf-8',

beforeSend: function(request) {

request.setRequestHeader("username", 'username'),

request.setRequestHeader("pwd", 'password');

}

})

.done(function(resp) {

return resp;

})

.fail(function(error) {

throw new Error("Error getting the data");

});

Get Status

GET ConsoleServerAddress:API_port_number/task/status?tid=taskid

  • ConsoleServerAddress = FQDN of the Console Plus Server as defined during Nintex RPA Server installation

  • API_port_number = API port as defined during Nintex RPA Server installation

    • If required, you can check this number in NGINX (in the Bindings for the WebAPI website)

    • Default value = 44445

  • Example: MACHINENAME.COMPANYDOMAIN.COM:44445/task/status?tid=taskid

API controller name

Task

Method name

GetStatus

Parameter

TaskId (long)

Output

WebResponse (json)

Get Status: WebResponse Parameters

{

TaskId:<long>,

Status:<int>,

Error:<int>,

OutputData: <string>

}

TaskId

Long

ID of the queried task

Status

Integer

Task status (see table below)

Error

Integer

Error code (see table below)

OutputData

String

Output data reported by wizard

In order for this output parameter to be returned, the relevant wizard must utilize the Report Wizard Output advanced command.

• For additional details, see the document: Advanced Commands Reference Guide (Report Wizard Output)

Status Code

Meaning

0

Started

1

Stopped

2

Ended

3

Delayed

4

Inactive

5

Skipped

6

Queued

7

Faulty (see table below)

Error Code

Meaning

0

OK (no error)

1

General

2

Login

3

Expired

4

Failed To Create Task

5

Wizard Not Found

6

Failed To Get Status

7

Task Not Found

Example

$.ajax({

url: '/task/status?tid=1',

type: 'get',

crossDomain: true,

beforeSend: function(request) {

request.setRequestHeader("username", 'username'),

request.setRequestHeader("pwd", 'password');}

})

.done(function(resp) {

return resp;

})

.fail(function(error) {

throw new Error("Error getting the data");

});