- Erste Schritte
- Authentication
- Scopes und Berechtigungen
- Plattformverwaltungs-APIs
- API-Ratenlimits für Identity Server
- Abrufen von partitionGlobalId zur API-Verwendung
- Warnungen
- Zusammenfassung des Mandantenverbrauchs abrufen
- Zusammenfassung des Mandantenverbrauchs nach Mandant abrufen
- Rufen Sie den Mandantenverbrauch nach Ordner ab
- Mandantenverbrauch nach Prozess abrufen
- Rufen Sie den täglichen Verbrauch des Mandanten nach Dienst ab
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 Platform | Zugriffs-URL |
|---|---|
| Automation Cloud | https://cloud.uipath.com/ |
| Automation Cloud – Öffentlicher Sektor | https://govcloud.uipath.us/ |
| Automatisierung – cloudgeeignet | https://{customURL}.dedicated.uipath.com/ |
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'
Um das {access_token} zu erhalten, müssen Sie sich mit der hier beschriebenen ROPC-Methode authentifizieren.
Pfadparameter
| Pfadparameter | Datentyp | Beschreibung |
|---|---|---|
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
}
| Feld | Datentyp | Beschreibung |
|---|---|---|
startDate (erforderlich) | Long | Start of the date range, as a Unix timestamp in seconds. Values in milliseconds are rejected with a 400 Bad Request error. |
endDate (erforderlich) | Long | End of the date range, as a Unix timestamp in seconds. Values in milliseconds are rejected with a 400 Bad Request error. |
consumableCode (erforderlich) | String | The consumable to summarize. For robot units, use RU. |
includeAllocation | Boolescher | Defaults to false. When true, the response includes the tenant's allocated quantity for the consumable over the date range. |
tenantId | Zeichenfolge (GUID) | Don't send this field. The {tenantId} path parameter determines the tenant and overrides any value in the body. |
includeTopUpBreakdown | Boolescher | Not 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.
| Feld | Datentyp | Beschreibung |
|---|---|---|
allocated | Nummer | The tenant's allocated quantity for the consumable. Returned only when includeAllocation is true. |
consumedFromOrgWithoutTenant | Nummer | Always 0 on this endpoint, because consumption without tenant context isn't attributed to any tenant. |
consumedByTopUp | Nummer | Always null on this endpoint, because top-up breakdown isn't supported per tenant. |
tenantConsumptionItems[].tenantId | Zeichenfolge (GUID) | The ID of the tenant. |
tenantConsumptionItems[].consumedFromTenantPool | Nummer | Units consumed from the tenant's allocation. |
tenantConsumptionItems[].consumedFromOrgPool | Nummer | Units consumed from the organization pool. |
tenantConsumptionItems[].consumedByTopUp | Nummer | Always null on this endpoint. |
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
}
]
}