Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Example of createdOndate and userName filters in Audit API

  • Updated: 1/19/2021
    • Automation 360 v.x
    • Build
    • RPA Workspace
    • Examples

Example of createdOndate and userName filters in Audit API

Create a filter that retrieves audit log entries for a specified date range for a user with a specific value in the userName field.

Use filtering to help narrow your results. The following example identifies unsuccessful login attempts for users with the value "john,doe" in the userName field from December 1, 2020 through December 31, 2020.
Request body:
{
  "sort": [
    {
      "field": "createdOn",
      "direction": "desc"
    }
  ],
  "filter": {
    "operator": "and",
    "operands": [
      {
        "operator": "gt",
        "field": "createdOn",
        "value": "2020-12-01T00:00:00.001Z"
      },
      {
        "operator": "lt",
        "field": "createdOn",
        "value": "2020-12-31T23:59:59.999Z"
      },
      {
        "operator": "eq",
        "field": "status",
        "value": "Unsuccessful"
      },
      {
        "operator": "substring",
        "field": "activityType",
        "value": "LOGIN"
      },
      {
        "operator": "substring",
        "field": "userName",
        "value": "john,doe"
      }
    ]
  },
  "page": {
    "length": "1000",
    "offset": "0"
  }
}

This request identified three audit log entries out of 731,148.339 entries from this Control Room log entries.

Response body:

{
  "page": {
    "offset": 0,
    "total": 731148339,
    "totalFilter": 3
  },
  "list": [
    {
      "id": "kLjB8G4BFXSpOOjiomK1",
      "eventDescription": "User does not exist in Control Room.",
      "activityType": "LOGIN",
      "environmentName": "",
      "hostName": "50.xxx.xxx.xx",
      "userName": "john,doe@mycompany.com",
      "status": "Unsuccessful",
      "source": "Control Room",
      "objectName": "N/A",
      "detail": "",
      "createdOn": "2020-12-10T17:00:52Z",
      "requestId": "3c0f8e47-5820-43e8-b2b3-83b2f1cb86c9",
      "createdBy": "0"
    },
    {
      "id": "SLjB8G4BFXSpOOjikl5i",
      "eventDescription": "User does not exist in Control Room.",
      "activityType": "LOGIN",
      "environmentName": "",
      "hostName": "50.xxx.xxx.xx",
      "userName": "john,doe@mycompany.com",
      "status": "Unsuccessful",
      "source": "Control Room",
      "objectName": "N/A",
      "detail": "",
      "createdOn": "2020-12-10T17:00:48Z",
      "requestId": "eba3e5a7-0034-440a-a786-110a84fea7c9",
      "createdBy": "0"
    },
    {
      "id": "7bjB8G4BFXSpOOjicEGO",
      "eventDescription": "User does not exist in Control Room.",
      "activityType": "LOGIN",
      "environmentName": "",
      "hostName": "50.xxx.xxx.xx",
      "userName": "john,doe",
      "status": "Unsuccessful",
      "source": "Control Room",
      "objectName": "N/A",
      "detail": "",
      "createdOn": "2020-12-10T17:00:39Z",
      "requestId": "64184450-aad5-4024-bcf5-491fb5276d0c",
      "createdBy": "0"
    }
  ]
}
The REST API responds to each request with an HTTP response code. For response codes, see API response codes.
Send Feedback