閱讀及檢閱 Automation Anywhere 文件

Automation Anywhere Automation 360

關閉內容

內容

開啟內容

稽核 API

  • 已更新:2021/01/20

    稽核 API

    使用審計 API 爲指定的日期過濾器、排序機制和分頁輸入組合請求審計數據。

    先決條件

    註: 您可以在中查看, Control Room APIs Community Edition但 API 功能受限。您需要授權 Automation 360 版本才能存取 API 的完整功能。
    • 使用 驗證 API 來產生 JSON Web Token 。
    • 具有 AAE_Admin 角色的用戶或具有 “查看所有人”審計日誌操作 權限的用戶可以查看 Control Room的審計日誌。

    程序

    1. 使用 驗證 API 來產生 JSON Web Token 。
    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 回應碼
    傳送意見反饋