Skip to main content

Usage Count By Cloud Type V1

POST 

/license/api/v1/usage

Returns a breakdown of resources used per account for a single cloud type.

You can request usage data in one of the following formats;

  • Receive paginated usage data in the response object
  • Download usage data in a CSV file

By default, you will receive your paginated usage data in the response object. You can control the number of items in the response object through the limit request body parameter. If data beyond what's in the response object is available, the response object attribute nextPageToken will provide a token you can set in the request parameter pageToken of your next request to get the next page of usage data.

To download the usage data in a CSV file, set the following:

  • Request header: Accept: application/octet-stream
  • Request body parameter: csvHeaderRequired = true.

The following example curl command requests usage data in a CSV file:

curl --location --request POST 'https://api.prismacloud.io/license/api/v1/usage' \
--header 'x-redlock-auth:<your JWT>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/octet-stream' \
--data-raw '{
"timeRange": {
"type": "relative",
"value": {
"amount": 1,
"unit": "month"
}
},
"accountIds": [
"123456789987",
"987654321123"
],
"cloudType": "AWS",
"csvHeaderRequired": true
}'

Request

Responses

Table query paginated Api response.