- Primeros pasos
- Autenticación
- Ámbitos y permisos
- API de gestión de plataformas
Guía de la API de Test Cloud
Use this endpoint to retrieve a daily breakdown of consumption by service for a specific tenant.
Punto final de API
POST {accessURL}/lease_/api/usage/{organizationId}/tenants/daily-consumption-by-service
Sustituye {accessURL} en todas las rutas de los puntos finales por la URL base de tu plataforma en la nube:
| Cloud Platform | URL de acceso |
|---|---|
| Test Cloud | https://cloud.uipath.com/ |
| Test Cloud Sector Público | https://govcloud.uipath.us/ |
| Test Cloud Dedicado | https://{customURL}.dedicated.uipath.com/ |
Solicitar encabezados.
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
Para obtener el {access_token}, asegúrate de autenticarte a través del método ROPC descrito aquí.
Parámetros de ruta
| Parámetros de ruta | Tipo de datos | Descripción |
|---|---|---|
organizationId (obligatorio) | Cadena (GUID) | El ID de la organización en la que reside su tenant. |
Solicitar cuerpo
The request body specifies the tenant, date range, consumable code, and optional filters. For a detailed list of consumable codes, refer to Consumables.
{
"tenantId": "string",
"startDate": 0,
"endDate": 0,
"consumableCode": "string",
"aggregateByOwnership": false,
"folderKeys": ["string"]
}
{
"tenantId": "string",
"startDate": 0,
"endDate": 0,
"consumableCode": "string",
"aggregateByOwnership": false,
"folderKeys": ["string"]
}
startDateandendDateare Unix timestamps in milliseconds.aggregateByOwnershipis optional (default:false). When set totrue, consumption is aggregated by the folder that owns the process rather than where it ran.folderKeysis optional. Provide a list of folder GUIDs to filter results to specific folders only.
Respuesta
200 OK
Returns a list of daily consumption records grouped by service for the specified tenant.
Solicitud de ejemplo
La llamada debe parecerse al siguiente ejemplo (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"
}'
Here's the response body for a successful daily consumption retrieval:
{
"items": [
{
"date": "2024-01-15",
"service": "string",
"consumedAmount": 0
}
]
}
{
"items": [
{
"date": "2024-01-15",
"service": "string",
"consumedAmount": 0
}
]
}