- Primeros pasos
- Autenticación
- Ámbitos y permisos
- API de gestión de plataformas
Recupera el desglose de consumo por carpeta para un tenant específico, con agregación opcional por propiedad de carpeta.
Utiliza este punto final para recuperar un desglose del consumo por carpeta para un tenant específico.
Punto final de API
POST {accessURL}/lease_/api/usage/{organizationId}/tenants/consumption-by-folder
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 |
|---|---|
| Automation Cloud | https://cloud.uipath.com/ |
| Sector público de Automation Cloud | https://govcloud.uipath.us/ |
| Automation Cloud dedicado | https://{customURL}.dedicated.uipath.com/ |
El nombre de su organización aparece en la URL justo después de la URL de acceso cuando ha iniciado sesión en el producto, por ejemplo, {accessURL}/{organizationName}/....
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
El cuerpo de la solicitud especifica el tenant, el intervalo de fechas, el código consumible y el modo de agregación opcional. Para obtener una lista detallada de códigos de consumibles, consulta Consumibles.
{
"tenantId": "string",
"startDate": 0,
"endDate": 0,
"consumableCode": "string",
"aggregateByOwnership": false,
"processPersonalWorkspaces": false,
"alwaysIncludeFolderKeys": ["string"]
}
{
"tenantId": "string",
"startDate": 0,
"endDate": 0,
"consumableCode": "string",
"aggregateByOwnership": false,
"processPersonalWorkspaces": false,
"alwaysIncludeFolderKeys": ["string"]
}
tenantIdis required. The ID of the tenant for which to retrieve consumption.startDateandendDateare Unix timestamps in seconds. Both bounds are inclusive. Values provided in milliseconds are rejected with a400 Bad Requesterror indicating that seconds are expected.aggregateByOwnershipes opcional (predeterminado:false). Cuando se establece entrue, el consumo se agrega por la carpeta que desencadenó la ejecución del proceso en lugar de donde se ejecutó.processPersonalWorkspacesis optional (default:false). When set totrue, personal workspaces are included in the folder breakdown as individual items, grouped under a syntheticPersonalWorkspacesRootparent. Only workspaces with consumption in the queried window are returned. Consumption in folders that no longer exist is returned as synthetic items flagged withisDeletedFolder.alwaysIncludeFolderKeysis optional. Provide a list of folder GUIDs to include in the response even if they have zero consumption in the queried window. Unknown keys are ignored.
Respuesta
200 OK
Devuelve una lista de registros de consumo agrupados por carpeta para el tenant especificado.
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/consumption-by-folder' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"tenantId": "string",
"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-by-folder' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"tenantId": "string",
"startDate": 1704067200,
"endDate": 1706745600,
"consumableCode": "consumption_unit_code"
}'
Este es el cuerpo de la respuesta para un consumo correcto mediante recuperación de carpetas:
isPersonalWorkspaceistruewhen the item is a personal workspace.isDeletedFolderistruewhen the item represents consumption from a deleted folder.
{
"items": [
{
"folderKey": "string",
"folderName": "string",
"parentFolderKey": "string",
"consumedBySelf": 0,
"processCountSelf": 0,
"isPersonalWorkspace": false,
"isDeletedFolder": false
}
]
}
{
"items": [
{
"folderKey": "string",
"folderName": "string",
"parentFolderKey": "string",
"consumedBySelf": 0,
"processCountSelf": 0,
"isPersonalWorkspace": false,
"isDeletedFolder": false
}
]
}