UiPath Documentation
test-cloud
latest
false
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

Test Cloud API 指南

Get Tenant Consumption by Folder

Use this endpoint to retrieve a consumption breakdown by folder for a specific tenant.

API 端点

POST {accessURL}/lease_/api/usage/{organizationId}/tenants/consumption-by-folder

将所有端点路径中的{accessURL}替换为您的云平台的基本 URL:

Cloud Platform访问 URL
Test Cloudhttps://cloud.uipath.com/
Test Cloud 公共部门版https://govcloud.uipath.us/
Test Cloud 专用版https://{customURL}.dedicated.uipath.com/

请求标头

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

要获取{access_token} ,请确保通过此处描述的 ROPC 方法进行身份验证。

路径参数

路径参数数据类型描述
organizationId (必填)字符串 (GUID)租户所在组织的 ID。

请求正文

The request body specifies the tenant, date range, consumable code, and optional aggregation mode. For a detailed list of consumable codes, refer to Consumables.

{
  "tenantId": "string",
  "startDate": 0,
  "endDate": 0,
  "consumableCode": "string",
  "aggregateByOwnership": false
}
{
  "tenantId": "string",
  "startDate": 0,
  "endDate": 0,
  "consumableCode": "string",
  "aggregateByOwnership": false
}
备注:
  • startDate and endDate are Unix timestamps in milliseconds.
  • aggregateByOwnership is optional (default: false). When set to true, consumption is aggregated by the folder that triggered the process execution rather than where it ran.

响应

200 OK

Returns a list of consumption records grouped by folder for the specified tenant.

请求示例

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

curl --location --request POST 'https://cloud.uipath.com/lease_/api/usage/11111111-1111-1111-1111-111111111111/tenants/consumption-by-folder' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
  "tenantId": "string",
  "startDate": 1704067200000,
  "endDate": 1706745600000,
  "consumableCode": "consumption_unit_code"
}'
curl --location --request POST 'https://cloud.uipath.com/lease_/api/usage/11111111-1111-1111-1111-111111111111/tenants/consumption-by-folder' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
  "tenantId": "string",
  "startDate": 1704067200000,
  "endDate": 1706745600000,
  "consumableCode": "consumption_unit_code"
}'

Here's the response body for a successful consumption by folder retrieval:

{
  "items": [
    {
      "folderKey": "string",
      "folderName": "string",
      "parentFolderKey": "string",
      "consumedBySelf": 0,
      "processCountSelf": 0
    }
  ]
}
{
  "items": [
    {
      "folderKey": "string",
      "folderName": "string",
      "parentFolderKey": "string",
      "consumedBySelf": 0,
      "processCountSelf": 0
    }
  ]
}
  • API 端点
  • 请求标头
  • 路径参数
  • 请求正文
  • 响应
  • 200 OK
  • 请求示例

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新