- Introdução
- Autenticação
- Escopos e permissões
- APIs de gestão de plataforma
Guia da API do Test Cloud
As an organization admin, use this endpoint to retrieve the consumption summary for all tenants in your organization.
Ponto de Extremidade da API
POST {accessURL}/lease_/api/usage/{organizationId}/tenants/consumption-summary
Substitua {accessURL} em todos os caminhos do ponto de extremidade pelo URL base para sua plataforma de nuvem:
| Cloud Platform | URL de acesso |
|---|---|
| Test Cloud | https://cloud.uipath.com/ |
| Test Cloud para o Setor Público | https://govcloud.uipath.us/ |
| Test Cloud Dedicado | https://{customURL}.dedicated.uipath.com/ |
Cabeçalhos de solicitação.
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
Para obter o {access_token}, certifique-se de se autenticar por meio do método ROPC, descrito aqui.
Parâmetros do caminho
| Parâmetro do caminho | Tipo de dados | Description |
|---|---|---|
organizationId (obrigatório) | String (GUID) | The ID of the organization for which to retrieve the consumption summary. |
Corpo da Solicitação
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"
}
{
"startDate": 0,
"endDate": 0,
"consumableCode": "string"
}
startDate and endDate are Unix timestamps in milliseconds.
Resposta
200 OK
Returns the consumption summary across all tenants in the organization.
Exemplo de solicitação
A chamada deve ser semelhante ao seguinte exemplo (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"
}'
Here's the response body for a successful consumption summary retrieval:
{
"consumedFromOrgWithoutTenant": 0,
"tenantConsumptionItems": [
{
"tenantId": "string",
"consumedFromTenantPool": 0,
"consumedFromOrgPool": 0
}
]
}
{
"consumedFromOrgWithoutTenant": 0,
"tenantConsumptionItems": [
{
"tenantId": "string",
"consumedFromTenantPool": 0,
"consumedFromOrgPool": 0
}
]
}