Methods
The public API for the consumption log is small, consisting of three endpoints for fetching data.
Endpoints¶
POST/api/consumptionlog/log/list
- List logs filtered and aggregated according to the input from the body.
- Body content
{ "from": "2022-08-02T11:39:15.525Z", "to": "2022-08-02T11:39:15.525Z", "aggregateBy": { "Time": "string", "ProjectId": "string", "ResourceId": "string", "OperationId": "string", "BillingReference": "string" }, "projectId": "string", "operationId": "string", "metricType": "string", "resourceId": "string", "billingReference": "string", "billingReferenceTag": "string", "sortBy": "Id", "sortOrder": "Asc|Desc", "offset": 0, "limit": 0, "tenantId": "string" }
-
Example Output
POST{ "offset": 0, "limit": 0, "data": [ { "tenantId": "string", "projectId": "string", "resourceId": "string", "validFrom": "2022-08-02T11:39:15.528Z", "validTo": "2022-08-02T11:39:15.528Z", "unit": "string", "value": 0, "operationId": "string", "metricType": "string", "billingInformation": { "billingReference": "string", "billingReferenceTag": "string", "billingReferenceType": "string" } } ] }
/api/consumptionlog/log/my-list
-
List the calling users logs filtered and aggregated according to the input from the body.
- Body content
{ "from": "2022-08-02T11:39:15.525Z", "to": "2022-08-02T11:39:15.525Z", "aggregateBy": { "Time": "string", "ProjectId": "string", "ResourceId": "string", "OperationId": "string", "BillingReference": "string" }, "projectId": "string", "operationId": "string", "metricType": "string", "resourceId": "string", "billingReference": "string", "billingReferenceTag": "string", "sortBy": "Id", "sortOrder": "Asc", "offset": 0, "limit": 0, "tenantId": "string" }
- Example Output
{ "offset": 0, "limit": 0, "data": [ { "tenantId": "string", "projectId": "string", "resourceId": "string", "validFrom": "2022-08-02T11:39:15.528Z", "validTo": "2022-08-02T11:39:15.528Z", "unit": "string", "value": 0, "operationId": "string", "metricType": "string", "billingInformation": { "billingReference": "string", "billingReferenceTag": "string", "billingReferenceType": "string" } } ] }
POST/api/consumptionlog/log/{id}
- Retrieve a particular consumption log based on the id.
- Example Output
{ "id": 0, "validFrom": "2022-08-02T11:45:41.428Z", "validTo": "2022-08-02T11:45:41.428Z", "createdAt": "2022-08-02T11:45:41.428Z", "projectId": "string", "operationId": "string", "clientId": "string", "clientName": "string", "clientVersion": "string", "tags": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "tenantId": "string", "resourceId": "string", "metricType": "string", "unit": "string", "value": 0, "billingInformation": { "billingReference": "string", "billingReferenceTag": "string", "billingReferenceType": "string" } }