UiPath Documentation
automation-cloud
latest
false

Automation Cloud API 指南

获取租户消耗情况摘要

作为组织管理员,可以使用此端点检索组织中所有租户的消耗摘要。

API 端点

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

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

Cloud Platform访问 URL
Automation Cloudhttps://cloud.uipath.com/
Automation Cloud 公共部门https://govcloud.uipath.us/
Automation 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。

请求正文

请求正文指定要检索摘要的日期范围和消耗性代码。有关消耗品代码的详细列表,请参阅消耗品

{
  "startDate": 0,
  "endDate": 0,
  "consumableCode": "string"
}
{
  "startDate": 0,
  "endDate": 0,
  "consumableCode": "string"
}
备注:

startDateendDate是以毫秒为单位的 Unix 时间戳。

响应

200 OK

返回组织中所有租户的消耗情况摘要。

请求示例

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

curl --location --request POST 'https://cloud.uipath.com/lease_/api/usage/11111111-1111-1111-1111-111111111111/tenants/consumption-summary' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
  "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-summary' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
  "startDate": 1704067200000,
  "endDate": 1706745600000,
  "consumableCode": "consumption_unit_code"
}'

以下是成功获取摘要检索的响应正文:

{
  "consumedFromOrgWithoutTenant": 0,
  "tenantConsumptionItems": [
    {
      "tenantId": "string",
      "consumedFromTenantPool": 0,
      "consumedFromOrgPool": 0
    }
  ]
}
{
  "consumedFromOrgWithoutTenant": 0,
  "tenantConsumptionItems": [
    {
      "tenantId": "string",
      "consumedFromTenantPool": 0,
      "consumedFromOrgPool": 0
    }
  ]
}
  • API 端点
  • 请求标头
  • 路径参数
  • 请求正文
  • 响应
  • 200 OK
  • 请求示例

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新