• Home
  • API
  • Account management
  • Dynatrace Platform Subscription
  • Usage
  • GET usage per environment

Dynatrace Platform Subscription API - GET usage per environment

Gets the usage data for a Dynatrace Platform Subscription split by monitoring environment.

The request produces an application/json payload.

GET

https://api.dynatrace.com/sub/v2/accounts/{accountUuid}/subscriptions/{subscriptionUuid}/environments/usage

Authentication

To execute this request, you need the Allow read access for usage and consumption resources (account-uac-read) scope assigned to your token. To learn how to obtain and use it, see Authentication.

Parameters

ParameterTypeDescriptionInRequired
accountUuidstring

The ID of the required account.

You can find the UUID on the Account > Account management API page, during creation of an OAuth client.

pathrequired
subscriptionUuidstring

The UUID of the requested subscription

pathrequired
startTimestring

Date as ISO string

queryrequired
endTimestring

Date as ISO string

queryrequired
environmentIdsstring[]-queryoptional
capabilityKeysstring[]-queryoptional

Response

Response codes

CodeTypeDescription
200SubscriptionEnvironmentUsageListDto-
400

The request was unacceptable, often due to missing a required parameter

401

The bearer token is incorrect/expired or the requested account information does not match the bearer token

403

Access denied

404

The requested resource was not found

500

Something went wrong on Account Management API's end

Response body objects

The SubscriptionEnvironmentUsageListDto object

ElementTypeDescription
dataSubscriptionEnvironmentUsageDto[]

Subscription usage data

lastModifiedTimestring

The time the subscription data was last modified in 2021-05-01T15:11:00Z format.

The SubscriptionEnvironmentUsageDto object

ElementTypeDescription
environmentIdstring

The id of the environment

usageSubscriptionUsageDto[]

A list of subscription usage for the environment.

The SubscriptionUsageDto object

ElementTypeDescription
capabilityKeystring

The capability key

capabilityNamestring

The name of the capability

startTimestring

The start time of the capability usage in 2021-05-01T15:11:00Z format.

endTimestring

The end time of the capability usage in 2021-05-01T15:11:00Z format.

valuenumber

The usage for the capability

unitMeasurestring

The unit of measure for the capability usage

Response body JSON model

json
{ "data": [ { "environmentId": "string", "usage": [ { "capabilityKey": "string", "capabilityName": "string", "startTime": "string", "endTime": "string", "value": 1, "unitMeasure": "string" } ] } ], "lastModifiedTime": "string" }