automation-cloud
latest
false
  • 入门指南
    • 关于本指南
    • 可用资源:
    • API 端点 URL 结构
    • 枚举列表
  • 身份验证
    • 身份验证方法
    • 外部应用程序 (OAuth)
    • 其他 API 访问方法
  • 作用域和权限
  • 平台管理 API
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

Automation Cloud API 指南

上次更新日期 2025年11月24日

获取审核事件

Retrieve the audit logs for your organization. The APIs differ depending on the logging experience.

统一的日志记录体验

The unified logging experience uses these API endpoints and provides two scopes:

  • Organization-level: /orgaudit_/
  • Tenant-level: /tenantaudit_/

These APIs return audit information across UiPath services onboarded to the unified framework.

API 端点

For retrieving audit logs in the unified logging experience, you can use two different endpoints:
  • Metadata: Retrieves all available audit event types, structured as a hierarchy of sources, categories, and activities.
    范围API 端点
    组织级别GET https://cloud.uipath.com/{org-name}/orgaudit_/api/query/sources
    租户级别GET https://cloud.uipath.com/{org-name}/{tenant-name}/tenantaudit_/api/query/sources
  • Query events: Retrieves audit events for the specified scope, with advanced filtering.
    范围API 端点
    组织级别GET https://cloud.uipath.com/{org-name}/orgaudit_/api/query/events
    租户级别GEThttps://cloud.uipath.com/{org-name}/{tenant-name}/tenantaudit_/api/query/events

作用域

Requires one of the following scopes:

  • PM.Audit
  • PM.Audit.Read

请求标头

--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'

查询参数

参数数据类型描述
from (可选) DatetimeStart of time interval.
to (可选) DatetimeEnd of time interval.
source (可选) Array [String]List of event sources (as returned by the Metadata API).
target (可选) Array [String]List of event categories.
type (可选) Array [String]List of activity types.
userIds (可选) Array [String]List of user identifiers.
searchTerm (可选) 字符串Keyword or term to search for.
status (可选) 整数
  • 0 = succeeded
  • 1 = failed.
maxCount (可选) 整数Maximum number of records to return.

响应

200 OK

Returns a JSON object with:

  • List of audit events

  • next link for pagination showing newer events
  • previous link for pagination showing older events
Example response
{
  "auditEvents": [
    {
      "id": "string",
      "createdOn": "2025-03-24T18:35:38.122Z",
      "organizationId": "string",
      "organizationName": "string",
      "tenantId": "string",
      "tenantName": "string",
      "actorId": "string",
      "actorName": "string",
      "actorEmail": "string",
      "eventType": "string",
      "eventSource": "string",
      "eventTarget": "string",
      "eventDetails": "string",
      "eventSummary": "string",
      "status": 0,
      "clientInfo": {
        "ipAddress": "string",
        "ipCountry": "string"
      }
    }
  ],
  "next": "string",
  "previous": "string"
}{
  "auditEvents": [
    {
      "id": "string",
      "createdOn": "2025-03-24T18:35:38.122Z",
      "organizationId": "string",
      "organizationName": "string",
      "tenantId": "string",
      "tenantName": "string",
      "actorId": "string",
      "actorName": "string",
      "actorEmail": "string",
      "eventType": "string",
      "eventSource": "string",
      "eventTarget": "string",
      "eventDetails": "string",
      "eventSummary": "string",
      "status": 0,
      "clientInfo": {
        "ipAddress": "string",
        "ipCountry": "string"
      }
    }
  ],
  "next": "string",
  "previous": "string"
}

Example requests

  • Organization level
    curl --location 'https://cloud.uipath.com/{org-name}/orgaudit_/api/query/events?status=0&from=2024-12-24T19%3A11%3A46.403Z&to=2025-03-24T19%3A11%3A46.403Z' \
    --header 'Authorization: Bearer {token}'curl --location 'https://cloud.uipath.com/{org-name}/orgaudit_/api/query/events?status=0&from=2024-12-24T19%3A11%3A46.403Z&to=2025-03-24T19%3A11%3A46.403Z' \
    --header 'Authorization: Bearer {token}'
    
  • Tenant level
    curl --location 'https://cloud.uipath.com/{org-name}/{tenant-name}/tenantaudit_/api/query/events?status=0&from=2024-12-24T19%3A11%3A46.403Z&to=2025-03-24T19%3A11%3A46.403Z' \
    --header 'Authorization: Bearer {token}'curl --location 'https://cloud.uipath.com/{org-name}/{tenant-name}/tenantaudit_/api/query/events?status=0&from=2024-12-24T19%3A11%3A46.403Z&to=2025-03-24T19%3A11%3A46.403Z' \
    --header 'Authorization: Bearer {token}'
    

传统日志记录体验

Retrieves audit logs for an organization based on its name.

API 端点

GET https://cloud.uipath.com/audit_/api/auditlogs/partitionGlobalId

作用域

Requires one of the following scopes:

  • PM.Audit
  • PM.Audit.Read

请求标头

--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'

查询参数

查询参数

数据类型

描述

language

(可选)

字符串

以缩写形式指定可用的显示语言。

例如 frdeenja 等。

top

(可选)

Int32

显示审核的前 N 个条目。

skip

(可选)

Int32

跳过显示前 N 个审核条目。

sortBy

(可选)

字符串

指定用于对审核条目进行排序的 DTO 属性。

例如 categoryemailcreatedOn 等。

sortOrder

(可选)

字符串

指定排序顺序。

例如,升序 (asc) 或降序 (desc)。

api-version

(可选)

字符串

指定您正在使用的 API 版本。

响应

200 OK

返回查询的审核事件。

请求示例

假设您收集了构建 API 调用所需的所有信息。

  • 您的 {baseURL} 为:https://cloud.uipath.com/{organizationName}
  • 您的 {access_token} 为:1234(出于长度考虑)。
  • 您需要设置以下查询参数:

    • language = en
    • top = 2,显示前两个条目
    • skip = 2,跳过前两个条目
    • sortBy = createdOn,按创建名称对条目进行排序
    • sortOrder = asc,根据条目从旧到新的顺序排序

调用应类似于以下示例 (cURL):

curl --location --request GET ' https://cloud.uipath.com/{organizationName}/audit_/api/auditlogs?language=en&top=2&skip=2&sortBy=createdOn&sortOrder=asc' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'curl --location --request GET ' https://cloud.uipath.com/{organizationName}/audit_/api/auditlogs?language=en&top=2&skip=2&sortBy=createdOn&sortOrder=asc' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'

以下是成功检索审核条目的响应正文:

{
    "totalCount": 29,
    "results": [
        {
            "createdOn": "2021-10-14T13:10:15.1964174+00:00",
            "category": "User",
            "action": "Login",
            "auditLogDetails": "{\r\n \"userName\": \"System Administrator admin\",\r\n \"email\": \"\"\r\n}", 
            "userName": "System Administrator",
            "email": "",
            "message": "User 'System Administrator admin' logged in",
            "detailsVersion": "1.0",
            "source": "Cis"
        },
....
        {
            "createdOn": "2021-10-14T12:41:00.3268964+00:00",
            "category": "User",
            "action": "Login",
            "auditLogDetails": "{\r\n \"userName\": \"System Administrator admin\",\r\n \"email\": \"\"\r\n}", 
            "userName": "System Administrator",
            "email": "",
            "message": "User 'System Administrator admin' logged in",
            "detailsVersion": "1.0",
            "source": "Cis"
        }
    ]
}{
    "totalCount": 29,
    "results": [
        {
            "createdOn": "2021-10-14T13:10:15.1964174+00:00",
            "category": "User",
            "action": "Login",
            "auditLogDetails": "{\r\n \"userName\": \"System Administrator admin\",\r\n \"email\": \"\"\r\n}", 
            "userName": "System Administrator",
            "email": "",
            "message": "User 'System Administrator admin' logged in",
            "detailsVersion": "1.0",
            "source": "Cis"
        },
....
        {
            "createdOn": "2021-10-14T12:41:00.3268964+00:00",
            "category": "User",
            "action": "Login",
            "auditLogDetails": "{\r\n \"userName\": \"System Administrator admin\",\r\n \"email\": \"\"\r\n}", 
            "userName": "System Administrator",
            "email": "",
            "message": "User 'System Administrator admin' logged in",
            "detailsVersion": "1.0",
            "source": "Cis"
        }
    ]
}

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2025 UiPath。保留所有权利。