- Démarrage
- Authentification
- Étendues et autorisations
- API de gestion de plate-forme
Guide de l'API Test Cloud
Use this endpoint to retrieve a consumption breakdown by folder for a specific tenant.
Point de terminaison de l’API
POST {accessURL}/lease_/api/usage/{organizationId}/tenants/consumption-by-folder
Remplacez {accessURL} dans tous les chemins de point de terminaison par l'URL de base de votre plate-forme cloud :
| Cloud Platform | URL d'accès |
|---|---|
| Test Cloud | https://cloud.uipath.com/ |
| Test Cloud Secteur Public | https://govcloud.uipath.us/ |
| Test Cloud dédié | https://{customURL}.dedicated.uipath.com/ |
En-têtes de requête.
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
Pour obtenir le {access_token}, assurez-vous de vous authentifier via l'une des méthodes ROPC décrite ici.
Paramètres de chemin d'accès
| Paramètre du chemin d'accès | Type de données | Description |
|---|---|---|
organizationId (requis) | Chaîne (GUID) | L'ID de l'organisation dans laquelle réside votre locataire. |
Corps de la requête
The request body specifies the tenant, date range, consumable code, and optional aggregation mode. For a detailed list of consumable codes, refer to Consumables.
{
"tenantId": "string",
"startDate": 0,
"endDate": 0,
"consumableCode": "string",
"aggregateByOwnership": false
}
{
"tenantId": "string",
"startDate": 0,
"endDate": 0,
"consumableCode": "string",
"aggregateByOwnership": false
}
startDateandendDateare Unix timestamps in milliseconds.aggregateByOwnershipis optional (default:false). When set totrue, consumption is aggregated by the folder that triggered the process execution rather than where it ran.
Réponses
200 OK
Returns a list of consumption records grouped by folder for the specified tenant.
Exemple de requête
L’appel doit ressembler à l’exemple suivant (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": 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-by-folder' \
--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 consumption by folder retrieval:
{
"items": [
{
"folderKey": "string",
"folderName": "string",
"parentFolderKey": "string",
"consumedBySelf": 0,
"processCountSelf": 0
}
]
}
{
"items": [
{
"folderKey": "string",
"folderName": "string",
"parentFolderKey": "string",
"consumedBySelf": 0,
"processCountSelf": 0
}
]
}