test-cloud
latest
false
Test Cloud API 指南
- 入门指南
- 身份验证
- 作用域和权限
- 平台管理 API
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。
POST 端点,用于按特定租户的服务检索每日消耗明细,并可选择文件夹和所有权筛选器。
使用此端点可按服务检索特定租户的每日消耗细分。
API 端点
POST {accessURL}/lease_/api/usage/{organizationId}/tenants/daily-consumption-by-service
将所有端点路径中的{accessURL}替换为您的云平台的基本 URL:
| Cloud Platform | 访问 URL |
|---|---|
| Test Cloud | https://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。 |
请求正文
请求正文指定租户、日期范围、消耗品代码和可选筛选器。有关消耗品代码的详细列表,请参阅消耗品。
{
"tenantId": "string",
"startDate": 0,
"endDate": 0,
"consumableCode": "string",
"aggregateByOwnership": false,
"folderKeys": ["string"]
}
{
"tenantId": "string",
"startDate": 0,
"endDate": 0,
"consumableCode": "string",
"aggregateByOwnership": false,
"folderKeys": ["string"]
}
备注:
startDate和endDate是以毫秒为单位的 Unix 时间戳。aggregateByOwnership是可选的(默认值:false)。当设置为true时,消耗量按流程拥有的文件夹而不是运行位置汇总。folderKeys是可选项。提供文件夹 GUID 列表,以仅筛选特定文件夹的结果。
响应
200 OK
返回指定租户按服务分组的每日消耗记录列表。
请求示例
调用应类似于以下示例 (cURL):
curl --location --request POST 'https://cloud.uipath.com/lease_/api/usage/11111111-1111-1111-1111-111111111111/tenants/daily-consumption-by-service' \
--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/daily-consumption-by-service' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"tenantId": "string",
"startDate": 1704067200000,
"endDate": 1706745600000,
"consumableCode": "consumption_unit_code"
}'
以下是成功检索每日消耗量后的响应正文:
{
"items": [
{
"date": "2024-01-15",
"service": "string",
"consumedAmount": 0
}
]
}
{
"items": [
{
"date": "2024-01-15",
"service": "string",
"consumedAmount": 0
}
]
}