Read and Review Automation Anywhere Documentation

Automation Anywhere Version 11.3

Close Contents

Contents

Open Contents

Bot Insight API details

  • Updated: 9/24/2020
    • 11.3.x
    • Optimize
    • API docs
    • Bot Insight

Bot Insight API details

To use the Bot Insight API, you have to send an HTTP request to the domain where the API is available.

The HTTP request is a Bot Insight API that is appended to the base URL of the domain. For example: http://{DOMAIN Name}:{Port}/v2/botinsight/data/api/{method}. In this syntax, you have to provide the domain name or its IP address, the mentioned URIs, and the Bot Insight method you want to call.

Notes:
  • The output of the Bot Insight APIs is paginated and fetches 1000 records at a time. You must use an offset to fetch the next set of records. Specify 0 as the offset to fetch data for the first 1000 records, 1 for the next 1000 records, and so on.
  • Only UTF-8 English characters and numbers are supported. Hence, for the date field, you must use all-numeric date formats and not the language-specific characters.

Retrieving task variable profile

Description Use this API to get information about the task variable profile.
Method GET
Syntax http://{Host}:{Port}/v2/botinsight/data/api/gettaskvariableprofile/{JobName}?from= ${DateValue}&to=${DateValue}
Input parameters JobName: Name of the job for which you want to get the data.

From: The start date of the period for which you want to fetch the data.

To: The end date of the period for which you want to fetch the data. The default date is the current date.

Returns Returns information about the variable profile in JSON format.
Sample output
{
  "taskId": "462b2b03-2341-47e0-9c6e-d7098fd83761",
  "taskName": "Firstbot",
  "totalRecords": 2,
  "profileVariables": [
  {
    "variableName": "v1",
    "displayName": "V1",
    "mappedToColumnName": "string1",
    "attributeType": "NUMERIC",
    "isAttributeTypeChanged": "N",
    "totalRecords": 2,
    "totalNullRecords": 0,
    "sumOfValue": 4,
    "minimumValue": "2",
    "maximumValue": "2",
    "averageOfValues": 2,
    "totalDistincts": 1,
    "newlyAdded": null,
    "enabled": null
  }
 ],
  "standardDashboardName": null
}
User role You must have the AAE_Bot Insight Admin role to access the API.

Retrieving task data

Description Use this API to retrieve the analytics data that is logged for a task for a period of 90 days.
Method GET
Syntax http://{Host}:{Port}/v2/botinsight/data/api/gettasklogdata/{task-name}/{page}/{from}/{to}?limit=
Input parameters task name: Name of the bot for which you want to get the data.

chunk: Page number from which you want to fetch the data. For example, you must specify 3 if you want to fetch data from page 4 that contains data of records from 4000 to 5000.

from: The start date of the period for which you want to fetch the data.

to: The end date of the period for which you want to fetch the data. The default date is the current date.

limit: Specifies the number of parts in which the information is retrieved. The default limit is 1000. For example, if you specify the limit as 2500 to retrieve 10000 records, then:

0 chunk returns 1 - 2500

1st chunk returns 2501 - 5000

2nd chunk returns 5001 - 7500

3rd chunk returns 7501 - 10000

Returns Returns the analytics data logged for the task in JSON format.
Sample output
{
   "totalRecords": 2,
   "taskLogDataList": [
   {
       "machineName": "WIN-2T0MO2IOVEQ",
       "runStatus": "CompletedSuccessfully",
       "userId": 1,
       "dateLogged": 1557124943026,
       "variables": "{\"v1\":\"2\" }"
   },
   {
       "machineName": "WIN-2T0MO2IOVEQ",
       "runStatus": "CompletedSuccessfully",
       "userId": 1,
       "dateLogged": 1557125511668,
       "variables": "{\"v1\":\"2\" }"
    }
  ]
}          
User role You must have the AAE_Bot Insight Admin role to access the API.

Retrieving bot run data

Description Use this API to get information about the bot run data, such as on which server it ran and whether it ran successfully or encountered an error.
Method GET
Syntax http://{Host}:{Port}/v2/botinsight/data/api/getbotrundata/{page}/{from}/{to}
Input parameters

fromdate: The start date of the period for which you want to fetch the data.

todate: The end date of the period for which you want to fetch the data. The default date is the current date.

chunk: Specifies the number of parts in which the information is retrieved. The default limit is 1000. For example, if you specify the limit as 2500 to retrieve 10000 records, then:

0 chunk returns 1 - 2500

1st chunk returns 2501 - 5000

2nd chunk returns 5001 - 7500

3rd chunk returns 7501 - 10000

Returns Returns the information about the bot run data in JSON format.
Sample output
{
   "totalRecords": 1,
   "botRunDataList": [
   {
      "id": 1,
      "userName": "birunner",
      "email": "aa@aa.com",
      "clientType": null,
      "hostName": "WIN-2T0MO2IOVEQ",
      "iPAddress": "172.31.5.55",
      "applicationPath": "C:\\Users\\Administrator\\Documents\\Automation Anywhere Files",
      "username_1": null,
      "fileName": "Firstbot.atmx",
      "fileType": null,
      "startTime": "2019-05-06 06:42:20.0",
      "endTime": "2019-05-06 06:42:24.0",
      "status": "COMPLETED",
      "totalLines": "3",
      "timeTaken": "4",
      "successIndicator": "0"
   }
  ]
}
User role You must have the AAE_Bot Insight Admin or AAE_Admin role to access the API.

Retrieving audit trial data

Description Use this API to get the audit data for all the users.
Method GET
Syntax http://{Host}:{Port}/v2/botinsight/data/api/getaudittraildata/{page}/{FromDateValue}/ {EndDateValue}
Input parameters page: Page number from which you want to fetch the data.

from: The start date of the period for which you want to fetch the data.

to: The end date of the period for which you want to fetch the data.

The default date is the current date.

Returns Returns the information about the audit data of a user in JSON format.
Sample output
{
   "totalRecords": 58,
   "auditTrailDataList": [
   {
      "activityType": "LOGIN",
      "createdBy": "0",
      "createdOn": "2019-05-06T13:21:11.000Z",
      "detail": "",
      "environmentName": "",
      "eventDescription": "User log in successfully",
      "hostName": "127.0.0.1",
      "id": "hzhOjWoB9hDUfTUPLNYU",
      "objectName": "N/A",
      "requestId": "21b8e569-34b3-4ff4-96c4-3c4121376b1d",
      "source": "Control Room",
      "status": "Successful",
      "userName": "superadmin"
   }
   {
      "activityType": "LOGOUT",
      "createdBy": "0",
      "createdOn": "2019-05-06T12:36:33.000Z",
      "detail": "",
      "environmentName": "",
      "eventDescription": "User log out successfully",
      "hostName": "172.31.5.55",
      "id": "hTgljWoB9hDUfTUPUNYY",
      "objectName": "N/A",
      "requestId": "1920f11b-78cc-48f3-a5f1-082dd8928374",
      "source": "Control Room",
      "status": "Successful",
      "userName": "superadmin"
   },
}          
User role You must have the AAE_Admin role to access the API.

Retrieving COE dashboard information

Description Use this API to retrieve the COE dashboard information.
Method GET
Header X-Authorization <<authentication token>>
Syntax (without parameters) http://<host>:<port>/analytics/rest/api/coe_dashboard
Syntax (with parameters) http://<host>:<port>/analytics/rest/api/​coe_dashboard?botname=ana&department=sample&​username=runner&botrunnermachinename​=ABL&units=per&limit=2&activitystatus=COMPLETED
Input parameters There are no input parameters.
Optional query parameters botname: Name of the bot.

botrunnermachinename: Name of the Bot Runner machine.

department: Name of the department.

username: Name of the user.

units: Specified unit.

limit: The number of records to be retrieved.

activitystatus: Select the activity status from the following list:
  • FAILED
  • RUN_PAUSED
  • UNKNOWN
  • COMPLETED
  • RUN_FAILED
  • RUN_ABORTED
  • RUN_TIMED_OUT
  • DEPLOY_FAILED
  • STOPPED
  • TIMED_OUT
Returns Returns the COE information in JSON format.
Sample output
{
        "bot_run_time": "16",
        "user_name": "birunner",
        "bot_runner_machine": "AABLR0468.AASPL-BRD.COM",
        "units": "Per Hour",
        "unitscount": [
            "Per Hour",
            "Transaction Count"
        ],
        "hotLinks": {
            "publishedDashboards": []
        },
        "money_saved": "100",
        "hours_saved": "10",
        "botname": "Analytics_ATM Reconciliation",
        "displayname": "Analytics_ATM Reconciliation",
        "name": " ",
        "id": "1",
        "department": "Sample Tasks",
        "application_path": "Automation Anywhere\\My Tasks\\Sample Tasks",
        "email": "aa@aa.com",
        "bot_id": "11"
    },
    {
        "bot_run_time": "38",
        "user_name": "birunner",
        "bot_runner_machine": "AABLR0468.AASPL-BRD.COM",
        "units": "Per Hour",
        "unitscount": [
            "Per Hour",
            "Transaction Count"
        ],
        "hotLinks": {
            "publishedDashboards": []
        },
        "money_saved": "100",
        "hours_saved": "10",
        "botname": "Analytics_MortgageProcessing",
        "displayname": "Analytics_MortgageProcessing",
        "name": " ",
        "id": "2",
        "department": "Sample Tasks",
        "application_path": "Automation Anywhere\\My Tasks\\Sample Tasks",
        "email": "aa@aa.com",
        "bot_id": "13"
    }
]
User Role Ensure that you have one of the following roles to access the API:
  • AAE_Bot Insight consumer
  • AAE_BASIC
  • AAE_Bot Insight Admin

Deleting business data

Description Use this API to delete logged data from either the production mode or the development mode for a particular Control Roominstance.
Method DELETE
Header X-Authorization <<authentication token>>
Request format http://<host>:<port>/v2/botinsight/data/deletetasklogdata
Input parameters

Node Name or Machine Name: Specifies the node name or the machine name.

Bot ID: Specifies the public ID of the bot

RunId: Specifies the ID that is generated by the bot.

Mode: Specifies the mode: <DEV> or <PROD>

From Date: Specifies the bot run start date.

To Date: Specifies the bot run end date.

Note: Log in as the AAE_Bot Insight Admin user to authorize the API.
Returns Returns the number of rows deleted along with the Bot ID.
JSON object input
{
   
    "botId" : "3fe7d5e0-0409-4a3c-a1f4-42ee13cf254d",
        "runId":"aa082f11-8ad9-4c57-a7e8-5d0e0925c485",
    "environment":"Prod",
    "fromDate":"2020-01-06T00:51:52",
    "toDate":"2020-03-30T22:51:53"
}
Sample Response

{
  "deleteCount": 0,
"botId": "string",
  "environmentName": "string"
}

User role You must have the AAE_Bot Insight Admin role to access the API.

Retrieving device schedule information

Description Use this API to retrieve device-specific metrics. The API provides information about the number of times a device was scheduled and details of bots running on the device.
Method GET
Header X-Authorization <<authentication token>>
Request format (without parameters) http://<host>:<port>/v2/botinsight/data/api/getdevicescheduleinfo
Request format (with parameters) http://<host>:<port>/v2/botinsight/data/api/getdevicescheduleinfo?fromDate=2000-05-05&toDate=2020-07-07&limit=1000
Optional query parameters

fromDate: The start date of the period for which you want to retrieve the data.

toDate: The end date of the period for which you want to retrieve the data. The default date is the current date.

limit: The number of records to be retrieved. The default limit is 1000.

Returns Returns information about the scheduled device and details of the bots running on the device.
Sample Response
{
  "totalRecords": 1,
  "deviceDashboardListData": [
    {
      "recurrenceType": "NONE",
      "automationName": "Analytics_ATM Reconciliation.20.09.21.16.01.00.superadmin",
      "deviceId": "2",
      "hostName": "AABLR0443.AASPL-BRD.COM",
      "nextRunDatetime": "2020-09-21 11:00:00.0",
      "botId": "11",
      "fileName": "Analytics_ATM Reconciliation.atmx"
    }
  ]
}
User role You must have the AAE_Bot Insight Admin or AAE_Admin role to access the API.
Send Feedback