Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Bot Deploy

  • Updated: 2022/04/07
    • Automation 360 v.x
    • Optimize
    • RPA Workspace
    • API docs

Bot Deploy

As a user with a Bot Runner license, deploy bots on your assigned devices. You can also pass variables to bots when they are deployed.

Request

POST https://{{ControlRoomURL}}/v3/automations/deploy
Header: X-Authorization <<authentication token>>
All API calls must contain an authentication token in the request header. Use the Authentication API to generate a JSON Web Token. See Authentication API.
Note: Bot deploy request can be made without any input fields. If you specify inputs, make sure that the bot to successfully receive these mapped in values, the variable for that bot must be marked as input. Additionally, the name of the variable in the bot has to match the value that is being mapped in the request body.
Request body with LIST input:
{
  "fileId": 86, 
  "runAsUserIds": [
    3 
  ],
  "poolIds": [],
  "overrideDefaultDevice": false,
  "callbackInfo": {
    "url": "https://callbackserver.com/storeBotExecutionStatus", 
    "headers": {
      "X-Authorization": "{{token}}" 
    }
  },
  "botInput": { 
    "iTestList": {
      "type": "LIST", //Type can be [ STRING, NUMBER, BOOLEAN, LIST, DICTIONARY, DATETIME ]
     "list": [
        { "type":"STRING",
         "string": "TestValues1" 
    },
     { "type":"STRING",
         "string": "TestValues2" 
    }
     ] //key must match type, in this case string
    }
  }
}
Request body with STRING input:
{
  "fileId": 87,
  "runAsUserIds": [
    3 
  ],
  "poolIds": [],
  "overrideDefaultDevice": false,
  "callbackInfo": {
    "url": "https://callbackserver.com/storeBotExecutionStatus", 
    "headers": {
      "X-Authorization": "{{token}}" 
    }
  },
  "botInput": { 
    "sInput1": {
      "type": "STRING", 
      "string": "Test Values1" 
    },
    "sInput2": {
      "type": "STRING",
      "string": "Test Values2"
    }
  }
}
Request body with NUMBER input:
{
  "fileId": 87,
  "runAsUserIds": [
    3 
  ],
  "poolIds": [],
  "overrideDefaultDevice": false,
  "callbackInfo": {
    "url": "https://callbackserver.com/storeBotExecutionStatus", 
    "headers": {
      "X-Authorization": "{{token}}" 
    }
  },
  "botInput": { 
    "sInput1": {
      "type": "NUMBER", 
      "integer": 123
    },
    "sInput2": {
      "type": "NUMBER",
      "integer": 345
    }
  }
}
Request body with DICTIONARY input:
{
  "fileId": 86, 
  "runAsUserIds": [
    3 
  ],
  "botInput": { 
    "iTestList": {
      "type": "DICTIONARY", //Type can be [ STRING, NUMBER, BOOLEAN, LIST, DICTIONARY, DATETIME ]
     "dictionary": [
         {
            "key":"key1",
            "value":{
               "type":"STRING",
               "string":"value1"
            }
         },
         {
            "key":"key2",
            "value":{
               "type":"STRING",
               "string":"value2"
            }
         }
      ] //key must match type, in this case string
    }
  }
}
Request body with DATE TIME input:
{
  "fileId": 87,
  "runAsUserIds": [
    3 
  ],
  "botInput": { 
    "dt_input1": {
      "type": "DATETIME", 
      "string": "2022-04-07T00:15:00-06:00[USA/New York]" 
    },
    "dt_input2": {
      "type": "DATETIME",
      "string": "2022-04-07T00:15:05-06:00[USA/New York]"
    }
  }
}

Request Parameters

Parameter Type Required Description
fileId Integer Yes File Id of bot to be deployed.

List files and folders by workspace API

automationName String No Name of the automation to be deployed.
runAsUserIds Integer Yes List of runAs user ids to deploy bot. The bot will be deployed on associated default device for each runAsUserIds or on one of the devices from the device pool(s), if provided.

List available unattended Bot Runners API

callbackInfo Object No callbackInfo provides the callback API URL (For example, https://callbackserver.com/storeBotExecutionStatus) and authentication token for the callback server. After the bot is deployed, the Control Room sends the deployment status and output variable values to this callback server.
Note: The callback server must accept POST calls to receive the bot execution data and the deployment status from the Control Room.
poolIds Integer No You will define the poolIds only when you are running it against a device pool or a pool of runners instead of an individual runner. Identifier of a device pool that has at least one active device. If you enter multiple pool IDs, enter the values in the order of which you want the API to check for available devices. If none of the devices are available at the time of deployment, the automation is queued.
Note: If the user associated with the Bot Runner license has a default device assigned to their account, the bot deploys on that device. If no default device is assigned, or you want to select a different device, then you must specify a device pool.

List device pools API

overrideDefaultDevice Boolean No If the Bot Runner user is assigned to a default device and you want to specify a device pool, set this parameter to true.

If deploying to the default device, set this parameter to false.

runElevated Array No Whether to deploy the bot using elevated permissions or not. Possible values include - false, true.
numOfRunAsUsersToUse Integer No Specifies how many Bot Runners to use from the list of runAsUserIds provided. A weighted system algorithm selects the Bot Runners with the least number of queued tasks.
  • System will pick the specified number of runAsUsers with the least number of tasks queued for the user at the moment of deploy request.
  • If 0 then all the users will be used.
  • If the number is greater than the number of runAsUsers provided or less than 0 it will error out.
automationPriority String No The automation Priority. By default it is set to PRIORITY_MEDIUM. Possible values for automationPriority includes: PRIORITY_MEDIUM, PRIORITY_HIGH, and PRIORITY_LOW.
botLabel String No Label for the bot to be deployed.
botInput Object No A data structure containing a botInput Object. See below for more details.
botInput Object
type* String No By default it is STRING. Possible values for type includes: STRING, NUMBER, BOOLEAN, FILE, ITERATOR, LIST, DICTIONARY, TABLE, VARIABLE, CONDITIONAL, WINDOW, TASKBOT, DATETIME, UIOBJECT, RECORD, EXCEPTION, CREDENTIAL, COORDINATE, IMAGE, REGION, PROPERTIES, TRIGGER, CONDITIONALGROUP, FORM, FORMELEMENT, HOTKEY, and WORKITEM.
*The structure of the input varies depending on the type you want to input. This topic provides you with few of the mostly used sample.

Response

200 OK

For more information on the return codes, see API response codes.

{
    "deploymentId": "340a2949-aa44-41ab-af9b-f9343ae2581c"
}

Response Parameters

Parameter Type Description
deploymentId String The deployment Id created.
Note: View the Control Room APIs in the Community Edition, but API functionality is limited. You need a licensed Automation 360 Edition to access the full functionality of the APIs.
The REST API responds to each request with an HTTP response code. For response codes, see API response codes.
Send Feedback