阅读和查看 Automation Anywhere 文档

Automation Anywhere Automation 360

关闭内容

内容

打开内容

审计 API

  • 已更新:1/20/2021
    • Automation 360 v.x
    • 管理
    • RPA 工作区
    • API 文档

审计 API

使用审计 API 可请求日期筛选器、排序机制和分页的给定输入组合的审计数据。

先决条件

注: 您可以在 Control Room APIs 中查看 Community Edition,但 API 功能有限。您需要获得许可证的 Automation 360 Edition 才能访问 API 的全部功能。
  • 使用身份验证 API 生成 JSON Web 令牌。请参阅身份验证 API
  • 具有 AAE_管理员 角色的用户或具有查看所有审核日志操作权限的用户可以查看 Control Room 的审核日志。

过程

  1. 使用身份验证 API 生成 JSON Web 令牌。请参阅身份验证 API
  2. 应用筛选器执行基本条件查询和分页控制,以处理网页。
    有三个与筛选相关的基本功能:筛选条件、排序列和分页参数。

    API 请求正文中的筛选器

  3. 使用 POST 方法和端点 URL: <your_control_room_url>/v1/audit/messages/list.
    以下示例请求 2019 年 12 月的失败的登录尝试。

    请求正文:

    {
      "sort": [
        {
          "field": "createdOn",
          "direction": "desc"
        }
      ],
      "filter": {
        "operator": "and",
        "operands": [
          {
            "operator": "gt",
            "field": "createdOn",
            "value": "2019-12-01T00:00:00.001Z"
          },
          {
            "operator": "lt",
            "field": "createdOn",
            "value": "2019-12-31T23:59:59.999Z"
          },
          {
            "operator": "eq",
            "field": "status",
            "value": "Unsuccessful"
          },
          {
            "operator": "substring",
            "field": "activityType",
            "value": "LOGIN"
          },
          {
            "operator": "substring",
            "field": "userName",
            "value": "joe.typical@myemiil.com"
          }
        ]
      },
      "fields": [],
      "page": {
        "length": "1000",
        "offset": "0"
      }
    }
  4. 发送请求
    此示例的响应返回日期筛选器、排序和分页的数据。如果请求中没有使用筛选,则成功的响应将返回指定 Control Room 的所有页面。
    响应正文:
    {
      "page": {
        "offset": 0,
        "total": 731064850,
        "totalFilter": 9
      },
      "list": [
        {
          "id": "XlHj6G4BFXSpOOji5B7S",
          "eventDescription": "User does not exist in Control Room.",
          "activityType": "LOGIN",
          "environmentName": "",
          "hostName": "12.xxx.xx.x",
          "userName": "joe.typical@myemiil.com",
          "status": "Unsuccessful",
          "source": "Control Room",
          "objectName": "N/A",
          "detail": "",
          "createdOn": "2019-12-09T04:21:19Z",
          "requestId": "04965c2e-82e0-4ce4-a88d-bebe1dc3a2a8",
          "createdBy": "0"
        },
        {
          "id": "g1Hj6G4BFXSpOOji2Rwx",
          "eventDescription": "User does not exist in Control Room.",
          "activityType": "LOGIN",
          "environmentName": "",
          "hostName": "12.xxx.xx.x",
          "userName": "joe.typical@myemiil.com",
          "status": "Unsuccessful",
          "source": "Control Room",
          "objectName": "N/A",
          "detail": "",
          "createdOn": "2019-12-09T04:21:16Z",
          "requestId": "61672553-477d-4012-ab47-2a27f6553c4e",
          "createdBy": "0"
        },
        ..............................
        {
          "id": "ETyk6G4BFXSpOOjiaJjt",
          "eventDescription": "User does not exist in Control Room.",
          "activityType": "LOGIN",
          "environmentName": "",
          "hostName": "12.xxx.xx.x",
          "userName": "joe.typical@myemiil.com",
          "status": "Unsuccessful",
          "source": "Control Room",
          "objectName": "N/A",
          "detail": "",
          "createdOn": "2019-12-09T03:11:58Z",
          "requestId": "ebeb01de-1f81-4a7c-8978-405806e146bd",
          "createdBy": "0"
        }
      ]
    }
REST API 用 HTTP 响应代码响应每个请求。 有关响应代码,请参阅API 响应代码
发送反馈