UiPath Documentation
automation-cloud
latest
false
Automation Cloud-API-Handbuch
Wichtig :
Bitte beachten Sie, dass dieser Inhalt teilweise mithilfe von maschineller Übersetzung lokalisiert wurde. Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

Zusammenfassung des Mandantenverbrauchs nach Mandant abrufen

POST endpoint for retrieving the consumption summary for a specific tenant, with breakdown by tenant-pool and organization-pool usage and an optional allocated quantity.

Verwenden Sie diesen Endpunkt, um die Verbrauchszusammenfassung für einen bestimmten Mandanten in Ihrer Organisation abzurufen.

API-Endpunkt​

POST {accessURL}/lease_/api/usage/{organizationId}/tenants/{tenantId}/consumption-summary

Ersetzen Sie {accessURL} in allen Endpunktpfaden durch die Basis-URL für Ihre Cloud-Plattform:

Cloud PlatformZugriffs-URL
Automation Cloudhttps://cloud.uipath.com/
Automation Cloud – Öffentlicher Sektorhttps://govcloud.uipath.us/
Automatisierung – cloudgeeignethttps://{customURL}.dedicated.uipath.com/
Hinweis:

Der Name Ihrer Organisation wird in der URL direkt nach der Zugriffs-URL angezeigt, wenn Sie beim Produkt angemeldet sind, z. B. {accessURL}/{organizationName}/....

Anforderungsheader​

--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
Hinweis:

Um das {access_token} zu erhalten, müssen Sie sich mit der hier beschriebenen ROPC-Methode authentifizieren.

Pfadparameter​

PfadparameterDatentypBeschreibung
organizationId (erforderlich)Zeichenfolge (GUID)Die ID der Organisation, in der sich Ihr Mandant befindet.
tenantId (erforderlich)Zeichenfolge (GUID)Die ID des Mandanten, für den die Verbrauchszusammenfassung abgerufen werden soll.

Anforderungstext​

Der Anforderungstext gibt den Datumsbereich und den Verbrauchscode an, für den die Zusammenfassung abgerufen werden soll. Der Mandant wird durch den Pfadparameter {tenantId} bestimmt. Eine detaillierte Liste der Verbrauchscodes finden Sie unter Verbrauchsmaterialien.

{
  "startDate": 0,
  "endDate": 0,
  "consumableCode": "string",
  "includeAllocation": false
}
{
  "startDate": 0,
  "endDate": 0,
  "consumableCode": "string",
  "includeAllocation": false
}
FeldDatentypBeschreibung
startDate (erforderlich)LongStart of the date range, as a Unix timestamp in seconds. Values in milliseconds are rejected with a 400 Bad Request error.
endDate (erforderlich)LongEnd of the date range, as a Unix timestamp in seconds. Values in milliseconds are rejected with a 400 Bad Request error.
consumableCode (erforderlich)StringThe consumable to summarize. For robot units, use RU.
includeAllocationBoolescherDefaults to false. When true, the response includes the tenant's allocated quantity for the consumable over the date range.
tenantIdZeichenfolge (GUID)Don't send this field. The {tenantId} path parameter determines the tenant and overrides any value in the body.
includeTopUpBreakdownBoolescherNot supported on this endpoint and always treated as false. To retrieve top-up consumption, use Get Tenant Consumption Summary.

Antworten​

200 OK​

Returns the consumption summary for the specified tenant and, when requested, the tenant's allocated quantity.

FeldDatentypBeschreibung
allocatedNummerThe tenant's allocated quantity for the consumable. Returned only when includeAllocation is true.
consumedFromOrgWithoutTenantNummerAlways 0 on this endpoint, because consumption without tenant context isn't attributed to any tenant.
consumedByTopUpNummerAlways null on this endpoint, because top-up breakdown isn't supported per tenant.
tenantConsumptionItems[].tenantIdZeichenfolge (GUID)The ID of the tenant.
tenantConsumptionItems[].consumedFromTenantPoolNummerUnits consumed from the tenant's allocation.
tenantConsumptionItems[].consumedFromOrgPoolNummerUnits consumed from the organization pool.
tenantConsumptionItems[].consumedByTopUpNummerAlways null on this endpoint.
Hinweis:

Handle a null value in allocated as unknown, not as zero. allocated is null when the tenant has no license for the queried consumable, or when the date range spans more than one allocation period, such as a 90-day range when allocations are set monthly. A value of 0 means the tenant's allocation is zero.

Beispielanforderung​

Der Aufruf sollte dem folgenden Beispiel ähneln (cURL):

curl --location --request POST 'https://cloud.uipath.com/lease_/api/usage/11111111-1111-1111-1111-111111111111/tenants/22222222-2222-2222-2222-222222222222/consumption-summary' \
--header 'Authorization: Bearer <your-access-token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "startDate": 1704067200,
  "endDate": 1706745600,
  "consumableCode": "consumption_unit_code",
  "includeAllocation": true
}'
curl --location --request POST 'https://cloud.uipath.com/lease_/api/usage/11111111-1111-1111-1111-111111111111/tenants/22222222-2222-2222-2222-222222222222/consumption-summary' \
--header 'Authorization: Bearer <your-access-token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "startDate": 1704067200,
  "endDate": 1706745600,
  "consumableCode": "consumption_unit_code",
  "includeAllocation": true
}'

Hier ist der Antworttext für einen erfolgreichen Abruf einer Verbrauchszusammenfassung:

{
  "consumedFromOrgWithoutTenant": 0,
  "consumedByTopUp": null,
  "allocated": 200,
  "tenantConsumptionItems": [
    {
      "tenantId": "string",
      "consumedFromTenantPool": 150,
      "consumedFromOrgPool": 0,
      "consumedByTopUp": null
    }
  ]
}
{
  "consumedFromOrgWithoutTenant": 0,
  "consumedByTopUp": null,
  "allocated": 200,
  "tenantConsumptionItems": [
    {
      "tenantId": "string",
      "consumedFromTenantPool": 150,
      "consumedFromOrgPool": 0,
      "consumedByTopUp": null
    }
  ]
}
  • API-Endpunkt​
  • Anforderungsheader​
  • Pfadparameter​
  • Anforderungstext​
  • Antworten​
  • 200 OK​
  • Beispielanforderung​

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support

Möchten Sie lernen? UiPath Academy

Haben Sie Fragen? UiPath-Forum

Auf dem neuesten Stand bleiben