- 入门指南
- 身份验证
- 作用域和权限
- 平台管理 API
- Identity Server 的 API 速率限制
- 检索分区全局 ID 以供 API 使用
- 警示
- 获取租户消耗情况摘要
- 获取按租户划分的租户消耗摘要
- 按文件夹获取租户消耗量
- Get Tenant Consumption by Process
- 按服务获取租户的每日消耗量
Consumption breakdown by process for a specific tenant, with pagination, sorting, filtering, and optional per-service breakdown.
Use this endpoint to retrieve a consumption breakdown by process for a specific tenant.
Unlike Get Tenant Consumption Summary, this endpoint does not require organization administrator permissions. A user with tenant-scoped license viewing permission for the tenant can call it.
API 端点
POST {accessURL}/lease_/api/usage/{organizationId}/tenants/consumption-by-process
将所有端点路径中的{accessURL}替换为您的云平台的基本 URL:
| Cloud Platform | 访问 URL |
|---|---|
| Test Cloud | https://cloud.uipath.com/ |
| Test Cloud 公共部门版 | https://govcloud.uipath.us/ |
| Test Cloud 专用版 | https://{customURL}.dedicated.uipath.com/ |
当您登录到产品时,您的组织名称将显示在访问 URL 后面的 URL 中,例如 {accessURL}/{organizationName}/...。
请求标头
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
To obtain the {access_token}, make sure to authenticate through the Resource Owner Password Credentials (ROPC) method described in Authentication methods.
路径参数
| 路径参数 | 数据类型 | 描述 |
|---|---|---|
organizationId (必填) | 字符串 (GUID) | 租户所在组织的 ID。 |
请求正文
The request body specifies the tenant, date range, and optional filters, pagination, and sorting options.
{
"tenantId": "string",
"startDate": 0,
"endDate": 0,
"aggregateByOwnership": false,
"processNameFilter": "string",
"processType": "string",
"folderKeys": ["string"],
"skip": 0,
"take": 50,
"sortBy": "string",
"sortDescending": true,
"includeServiceBreakdown": false
}
{
"tenantId": "string",
"startDate": 0,
"endDate": 0,
"aggregateByOwnership": false,
"processNameFilter": "string",
"processType": "string",
"folderKeys": ["string"],
"skip": 0,
"take": 50,
"sortBy": "string",
"sortDescending": true,
"includeServiceBreakdown": false
}
tenantIdis required. The ID of the tenant for which to retrieve consumption.startDateandendDateare Unix timestamps in seconds. Both bounds are inclusive. Values provided in milliseconds are rejected with a400 Bad Requesterror indicating that seconds are expected.aggregateByOwnership是可选的(默认值:false)。当设置为true时,消耗量按流程拥有的文件夹而不是运行位置汇总。processNameFilteris optional. Filters results by process name.processTypeis optional. Filters results by process type.folderKeysis optional. Provide a list of folder GUIDs to limit results to specific folders.skipis optional (default:0). Pagination offset.takeis optional (default:50). Page size.sortByis optional (default:runs). Eitherrunsor a unit type code (AIU,AGU,PLTU,RU,SPR,TEU,HEAL,APICALLS).sortDescendingis optional (default:true). Sort direction.includeServiceBreakdownis optional (default:false). When set totrue, each process includes a per-service breakdown.
响应
200 OK
Returns the consumption breakdown by process for the specified tenant.
totalCountis the number of processes matching the filters, before pagination.consumedUnitslists the unit type codes present in the results.- Each item in
itemsincludesprocessKey,processName,processType,folderKey,runs, andconsumption(an array of{ "unit": string, "quantity": number }objects). consumptionByServiceis included on each item only whenincludeServiceBreakdownistrue, as an array of{ "service": string, "unitBreakdown": [{ "unit": string, "quantity": number }] }objects.subProcessesis optional and, when present, uses the same shape asitems.
请求示例
调用应类似于以下示例 (cURL):
curl --location --request POST 'https://cloud.uipath.com/lease_/api/usage/11111111-1111-1111-1111-111111111111/tenants/consumption-by-process' \
--header 'Authorization: Bearer <your-access-token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"tenantId": "4b8f2f6e-1c33-4c8a-9f4e-2c1a7d3b5e90",
"startDate": 1754006400,
"endDate": 1756684799,
"sortBy": "runs",
"includeServiceBreakdown": true
}'
curl --location --request POST 'https://cloud.uipath.com/lease_/api/usage/11111111-1111-1111-1111-111111111111/tenants/consumption-by-process' \
--header 'Authorization: Bearer <your-access-token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"tenantId": "4b8f2f6e-1c33-4c8a-9f4e-2c1a7d3b5e90",
"startDate": 1754006400,
"endDate": 1756684799,
"sortBy": "runs",
"includeServiceBreakdown": true
}'
Here's the response body for a successful consumption by process retrieval:
{
"totalCount": 1,
"consumedUnits": ["RU", "AIU"],
"items": [
{
"processKey": "9d3c1a2b-7e45-4f10-b2aa-0c6d8e914f77",
"processName": "InvoiceProcessing",
"processType": "Process",
"folderKey": "2f6e4b8f-1c33-4c8a-9f4e-2c1a7d3b5e90",
"runs": 128,
"consumption": [
{ "unit": "RU", "quantity": 12.5 },
{ "unit": "AIU", "quantity": 340 }
],
"consumptionByService": [
{ "service": "Orchestrator", "unitBreakdown": [{ "unit": "RU", "quantity": 12.5 }] },
{ "service": "Document Understanding", "unitBreakdown": [{ "unit": "AIU", "quantity": 340 }] }
]
}
]
}
{
"totalCount": 1,
"consumedUnits": ["RU", "AIU"],
"items": [
{
"processKey": "9d3c1a2b-7e45-4f10-b2aa-0c6d8e914f77",
"processName": "InvoiceProcessing",
"processType": "Process",
"folderKey": "2f6e4b8f-1c33-4c8a-9f4e-2c1a7d3b5e90",
"runs": 128,
"consumption": [
{ "unit": "RU", "quantity": 12.5 },
{ "unit": "AIU", "quantity": 340 }
],
"consumptionByService": [
{ "service": "Orchestrator", "unitBreakdown": [{ "unit": "RU", "quantity": 12.5 }] },
{ "service": "Document Understanding", "unitBreakdown": [{ "unit": "AIU", "quantity": 340 }] }
]
}
]
}