UiPath Documentation
test-cloud
latest
false
Test Cloud API guide

Get Tenant Consumption Summary

POST endpoint for retrieving the consumption summary for all tenants in an organization, grouped by tenant with tenant-pool and organization-pool breakdown.

As an organization admin, use this endpoint to retrieve the consumption summary for all tenants in your organization.

API endpoint

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

Replace {accessURL} in all endpoint paths with the base URL for your cloud platform:

Cloud platformAccess URL
Test Cloudhttps://cloud.uipath.com/
Test Cloud Public Sectorhttps://govcloud.uipath.us/
Test Cloud Dedicatedhttps://{customURL}.dedicated.uipath.com/
Note:

Your organization's name appears in the URL right after the access URL when you're logged into the product, for example {accessURL}/{organizationName}/....

Request headers

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

To obtain the {access_token}, make sure to authenticate through the ROPC method described here.

Path parameters

Path paramData typeDescription
organizationId (required)String (GUID)The ID of the organization for which to retrieve the consumption summary.

Request body

The request body specifies the date range and the consumable code for which to retrieve the summary. For a detailed list of consumable codes, refer to Consumables.

{
  "startDate": 0,
  "endDate": 0,
  "consumableCode": "string",
  "tenantId": "string",
  "includeTopUpBreakdown": false,
  "includeAllocation": false
}
{
  "startDate": 0,
  "endDate": 0,
  "consumableCode": "string",
  "tenantId": "string",
  "includeTopUpBreakdown": false,
  "includeAllocation": false
}
Note:
  • startDate and endDate are Unix timestamps in seconds. Both bounds are inclusive. Values provided in milliseconds are rejected with a 400 Bad Request error indicating that seconds are expected.
  • tenantId is optional. When provided, limits the summary to this tenant.
  • includeTopUpBreakdown is optional (default: false). When set to true, the response includes the consumption drawn from top-up units (consumedByTopUp fields).
  • includeAllocation is optional (default: false). When set to true, the response includes the allocated amount for the queried consumable (allocated field).

Responses

200 OK

Returns the consumption summary across all tenants in the organization.

Example request

The call should resemble the following example (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": 1704067200,
  "endDate": 1706745600,
  "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": 1704067200,
  "endDate": 1706745600,
  "consumableCode": "consumption_unit_code"
}'

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

Note:
  • consumedByTopUp is included at the top level and within each tenantConsumptionItems entry only when includeTopUpBreakdown is true.
  • allocated is included at the top level only when includeAllocation is true.
{
  "consumedFromOrgWithoutTenant": 0,
  "consumedByTopUp": 0,
  "allocated": 0,
  "tenantConsumptionItems": [
    {
      "tenantId": "string",
      "consumedFromTenantPool": 0,
      "consumedFromOrgPool": 0,
      "consumedByTopUp": 0
    },
    {
      "tenantId": "string",
      "consumedFromTenantPool": 0,
      "consumedFromOrgPool": 0,
      "consumedByTopUp": 0
    }
  ]
}
{
  "consumedFromOrgWithoutTenant": 0,
  "consumedByTopUp": 0,
  "allocated": 0,
  "tenantConsumptionItems": [
    {
      "tenantId": "string",
      "consumedFromTenantPool": 0,
      "consumedFromOrgPool": 0,
      "consumedByTopUp": 0
    },
    {
      "tenantId": "string",
      "consumedFromTenantPool": 0,
      "consumedFromOrgPool": 0,
      "consumedByTopUp": 0
    }
  ]
}
  • API endpoint
  • Request headers
  • Path parameters
  • Request body
  • Responses
  • 200 OK
  • Example request

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated