Usage Transparency API
Number of APIs: 7
This API also allows platform and third party applications to record application usages by users/assets/tenants for billing, reporting, quota checking purposes.
While adding the usages - UTS accepts all the data that is sent, provided it is in valid format and payload does not exceed the limit of usages count per request. - In case rules are configured for the usage units, the corresponding usage data is verified against the rule. - If verification fails, the data will be rejected and is not aggregated. - If /usagesJobs endpoint was used for sending the data, caller can query for the status of the data. - A rule is necessary in case the usages are to be billed.
Limitations
- The number of usages that can be added to UTS in a single request is limited to 200, regardless of whether usages are for single or multiple users.
- Tenants can query the status of up to 1000 recent jobs that they created to add the usages to UTS.
- The amount of operations performed that can be performed are limited per time, and may be throttled.
Terms
- Rule - Rules are created in UTS to define which valid data will be accepted as usage.
- KPI - KPI are created in UTS to defined how the accepted usage data will be aggregated and made available for consumer.
Generic Errors
The following generic error codes might occur at any of the specified operations. Generic errors are prefixed with 'mdsp.core.generic.'.
- 204: noContent
- 400: invalidParameter
- 400: invalidRequestBodyProperty
- 400: missingParameter
- 400: missingRequestBodyProperty
- 401: unauthorized
- 403: forbidden
- 404: noMatch
- 413: payloadTooLarge
- 415: unsupportedMediaType
- 429: tooManyRequests
- 500: internalServerError
-
Get monthly aggregated usages of rule enabled for consumer tenant. GET {{baseUrl}}/aggregatedMonthlyConsumerUsage?month=<string>&year=<string>&provider=<string>&application=<string>&KPIName=<string>
-
Get monthly aggregated usages for rule enabled to consumer tenants. GET {{baseUrl}}/aggregatedMonthlyProviderUsage?month=<string>&year=<string>&consumer=<string>&application=<string>&KPIName=<string>&page=0&size=20
-
Send application specific usages to UTS backend. POST {{baseUrl}}/usages
-
usagesJobs-{id} - Retrieve the status of processing of usages that were added by the job. GET {{baseUrl}}/usagesJobs/:id?page=1&size=200
-
usagesJobs-{id} - Retrieve the processing errors related the usages added by the job. GET {{baseUrl}}/usagesJobs/:id/errors?errorClass=<string>&page=1&size=10
-
usagesJobs - Add usages for one or more tenants, users and applications to UTS for storage and processing. POST {{baseUrl}}/usagesJobs
-
usagesJobs - Query status of processing for the jobs that added the usages. GET {{baseUrl}}/usagesJobs?date=<string>&tenant=<string>&application=<string>&unit=<string>&page=1&size=10