UiPath Documentation
test-cloud
latest
false
Important :
La localisation du contenu nouvellement publié peut prendre 1 à 2 semaines avant d’être disponible.

Guide de l'API Test Cloud

Get Tenant Daily Consumption by Service

Use this endpoint to retrieve a daily breakdown of consumption by service for a specific tenant.

Point de terminaison de l’API

POST {accessURL}/lease_/api/usage/{organizationId}/tenants/daily-consumption-by-service

Remplacez {accessURL} dans tous les chemins de point de terminaison par l'URL de base de votre plate-forme cloud :

Cloud PlatformURL d'accès
Test Cloudhttps://cloud.uipath.com/
Test Cloud Secteur Publichttps://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'
Remarque :

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èsType de donnéesDescription
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 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"]
}
Remarque :
  • startDate and endDate are Unix timestamps in milliseconds.
  • aggregateByOwnership is optional (default: false). When set to true, consumption is aggregated by the folder that owns the process rather than where it ran.
  • folderKeys is optional. Provide a list of folder GUIDs to filter results to specific folders only.

Réponses

200 OK

Returns a list of daily consumption records grouped by service 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/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
    }
  ]
}
  • Point de terminaison de l’API
  • En-têtes de requête.
  • Paramètres de chemin d'accès
  • Corps de la requête
  • Réponses
  • 200 OK
  • Exemple de requête

Cette page vous a-t-elle été utile ?

Connecter

Besoin d'aide ? Assistance

Vous souhaitez apprendre ? UiPath Academy

Vous avez des questions ? UiPath Forum

Rester à jour