- Erste Schritte
- Authentication
- Scopes und Berechtigungen
- Plattformverwaltungs-APIs
POST-Endpunkt zum Abrufen der Verbrauchszusammenfassung für alle Mandanten in einer Organisation, gruppiert nach Mandant mit Mandantenpool- und Organisationspoolaufschlüsselung.
Verwenden Sie als Organisationsadministrator diesen Endpunkt, um die Verbrauchszusammenfassung für alle Mandanten in Ihrer Organisation abzurufen.
API-Endpunkt
POST {accessURL}/lease_/api/usage/{organizationId}/tenants/consumption-summary
Ersetzen Sie {accessURL} in allen Endpunktpfaden durch die Basis-URL für Ihre Cloud-Plattform:
| Cloud Platform | Zugriffs-URL |
|---|---|
| Test Cloud | https://cloud.uipath.com/ |
| Test Cloud Public Sector | https://govcloud.uipath.us/ |
| Test Cloud Dedicated. | 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, für die die Verbrauchszusammenfassung abgerufen werden soll. |
Anforderungstext
Der Anforderungstext gibt den Datumsbereich und den Verbrauchscode an, für den die Zusammenfassung abgerufen werden soll. Eine detaillierte Liste der Verbrauchscodes finden Sie unter Verbrauchsmaterialien.
{
"startDate": 0,
"endDate": 0,
"consumableCode": "string",
"tenantId": "string",
"includeTopUpBreakdown": false,
"includeAllocation": false
}
{
"startDate": 0,
"endDate": 0,
"consumableCode": "string",
"tenantId": "string",
"includeTopUpBreakdown": false,
"includeAllocation": false
}
startDateandendDateare Unix timestamps in seconds. Both bounds are inclusive. Values provided in milliseconds are rejected with a400 Bad Requesterror indicating that seconds are expected.tenantIdis optional. When provided, limits the summary to this tenant.includeTopUpBreakdownis optional (default:false). When set totrue, the response includes the consumption drawn from top-up units (consumedByTopUpfields).includeAllocationis optional (default:false). When set totrue, the response includes the allocated amount for the queried consumable (allocatedfield).
Antworten
200 OK
Gibt die Zusammenfassung des Verbrauchs für alle Mandanten in der Organisation zurück.
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/consumption-summary' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"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-summary' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"startDate": 1704067200,
"endDate": 1706745600,
"consumableCode": "consumption_unit_code"
}'
Hier ist der Antworttext für einen erfolgreichen Abruf einer Verbrauchszusammenfassung:
consumedByTopUpis included at the top level and within eachtenantConsumptionItemsentry only whenincludeTopUpBreakdownistrue.allocatedis included at the top level only whenincludeAllocationistrue.
{
"consumedFromOrgWithoutTenant": 0,
"consumedByTopUp": 0,
"allocated": 0,
"tenantConsumptionItems": [
{
"tenantId": "string",
"consumedFromTenantPool": 0,
"consumedFromOrgPool": 0,
"consumedByTopUp": 0
},
{
"tenantId": "string",
"consumedFromTenantPool": 0,
"consumedFromOrgPool": 0,
"consumedByTopUp": 0
}
]
}
{
"consumedFromOrgWithoutTenant": 0,
"consumedByTopUp": 0,
"allocated": 0,
"tenantConsumptionItems": [
{
"tenantId": "string",
"consumedFromTenantPool": 0,
"consumedFromOrgPool": 0,
"consumedByTopUp": 0
},
{
"tenantId": "string",
"consumedFromTenantPool": 0,
"consumedFromOrgPool": 0,
"consumedByTopUp": 0
}
]
}