Export license data for 1 hour

This API call exports aggregated hourly license usage of all your environments as a ZIP file for an hour.

This API is only compatible with Dynatrace classic licensing and does not contain billed usage.

Authentication

To execute this request, you need the Service Provider API (ServiceProviderAPI) permission assigned to your API token. Generate your API token via Cluster Management Console (CMC). To learn how to obtain and use it, see Cluster API - Authentication.

Endpoint

/api/cluster/v2/license/consumption/hour

Response format

The request produces an application/json payload.

Response

Response codes

CodeTypeDescription
200LicenseConsumption

Success

400-

Bad request. Provided timestamp is incorrect.

422-

Incompatible licensing model.

500-

Operation failed

Response body objects

The LicenseConsumption object

Describes an hour of license consumption for each environment in the cluster

ElementTypeDescription
clusterUuidstring

Cluster identifier

environmentBillingEntriesEnvironmentLicenseConsumption[]

Environments' consumptions

timeFrameEndstring

Consumption data export timeframe end

timeFrameStartstring

Consumption data export timeframe start

The EnvironmentLicenseConsumption object

Describes license consumption for the environment

ElementTypeDescription
customMetricsCustomMetricDto[]

Custom metrics consumption

davisDataUnitsDavisDataUnitsUsageDto[]

Davis Data Units consumption

downloadsDownloadsDto[]

Not used

environmentUuidstring

Environment identifier

highAvailabilityClusterboolean

Indicates if cluster has redundancy by the high availability feature.

hostUsagesHostConsumption[]

Monitored hosts' consumption

internalUseboolean

Environment is intended for internal use (e.g. self-monitoring)

logStorageUsageBytesinteger

Count of Log monitoring storage usage in bytes

logUploadVolumeBytesinteger

Count of Log monitoring upload volume in bytes

mobileSessionReplaysinteger

Count of consumed mobile user session replays

mobileSessionsinteger

Count of consumed mobile user sessions

newProblemsinteger

Not used

sessionReplaysinteger

Count of consumed user session replays

syntheticBillingUsageSyntheticBillingUsageDto[]

Synthetic monitoring consumption

syntheticUsagesSyntheticUsageDto[]

Not used

totalRUMUserPropertiesUsedinteger

Count of defined user session properties

trialboolean

Environment type flag

visitsinteger

Count of consumed user sessions

The CustomMetricDto object

Custom metrics consumption

ElementTypeDescription
sourcestring

Custom metric definition source name

totalinteger

Count of custom metrics

The DavisDataUnitsUsageDto object

Davis Data Units consumption.

ElementTypeDescription
poolstring

Davis Data Units pool name

totalnumber

Count of consumed Davis Data Units

The DownloadsDto object

Not used

ElementTypeDescription
downloadCountinteger-
firstDownloadTimestring-
typestring-
versionstring-

The HostConsumption object

Describes license consumption by the monitored host.

ElementTypeDescription
agentUsagesAgentConsumption[]

Agent details

hasContainersboolean

Host running containers

hostCategorystring

Host unit size symbol

hostMemoryBytesinteger

Host's RAM in bytes

hostNamestring

Not used

infrastructureOnlyboolean

Infrastructure-only monitoring mode

osiIdinteger

Host identifier

paasboolean

Application-only monitoring mode

passMemoryLimitinteger

Container memory limit

premiumLogAnalyticsboolean

Premium Log monitoring

vendorTypeIdinteger

Platform as a Service vendor identifier

The AgentConsumption object

Describes license consumption by the OneAgent.

ElementTypeDescription
agentIdinteger

Agent unique identifier

agentTypeIdinteger

Agent type ID; 1 for OS agent

agentUsageRecordsAgentActivity[]

Agent activity periods within an hour

networkTrafficinteger

Not used

The AgentActivity object

Describes a period of time when OneAgent was actively consuming a license.

ElementTypeDescription
endTimestring

Agent running end time within an hour

startTimestring

Agent running start time within an hour

The SyntheticBillingUsageDto object

Synthetic monitoring consumption

ElementTypeDescription
monitorTypeIdinteger

Synthetic monitor type ID; 1 for browser monitor, 2 for HTTP monitor

privateExecutionsinteger

Count of executions from private locations

publicExecutionsinteger

Count of executions from public locations

testIdinteger

Unique Synthetic monitor identifier

The SyntheticUsageDto object

Not used

ElementTypeDescription
failureCountinteger-
monitorDefinitionIdstring-
monitorDescriptionstring-
monitorTypeIdinteger-
performedSyntheticActionsinteger-
successCountinteger-
syntheticActionCountinteger-

Response body JSON models

{
"clusterUuid": "string",
"environmentBillingEntries": [
{
"customMetrics": [
{
"source": "JMX, Dynatrace API",
"total": 1
}
],
"davisDataUnits": [
{
"pool": "Metrics, Serverless Functions, Log",
"total": 1
}
],
"downloads": [
{
"downloadCount": 1,
"firstDownloadTime": "string",
"type": "string",
"version": "string"
}
],
"environmentUuid": "string",
"highAvailabilityCluster": true,
"hostUsages": [
{
"agentUsages": [
{
"agentId": 1,
"agentTypeId": 1,
"agentUsageRecords": [
{
"endTime": "string",
"startTime": "string"
}
],
"networkTraffic": 1
}
],
"hasContainers": true,
"hostCategory": "string",
"hostMemoryBytes": 1,
"hostName": "string",
"infrastructureOnly": true,
"osiId": 1,
"paas": true,
"passMemoryLimit": 1,
"premiumLogAnalytics": true,
"vendorTypeId": 1
}
],
"internalUse": true,
"logStorageUsageBytes": 1,
"logUploadVolumeBytes": 1,
"mobileSessionReplays": 1,
"mobileSessions": 1,
"newProblems": 1,
"sessionReplays": 1,
"syntheticBillingUsage": [
{
"monitorTypeId": 1,
"privateExecutions": 1,
"publicExecutions": 1,
"testId": 1
}
],
"syntheticUsages": [
{
"failureCount": 1,
"monitorDefinitionId": "string",
"monitorDescription": "string",
"monitorTypeId": 1,
"performedSyntheticActions": 1,
"successCount": 1,
"syntheticActionCount": 1
}
],
"totalRUMUserPropertiesUsed": 1,
"trial": true,
"visits": 1
}
],
"timeFrameEnd": "string",
"timeFrameStart": "string"
}

Example

In this example, you request an hour of license data on Monday, 10 January 2022 10:00:00 GMT (1641808800000)

Curl

curl -X GET "https://myManaged.cluster.com/api/cluster/v2/license/consumption/hour?startTs=1641810541000"
-H "accept: application/json; charset=utf-8"
-H "Authorization: Api-Token abcdefjhij1234567890"

Request URL

https://myManaged.cluster.com/api/cluster/v2/license/consumption/hour?startTs=1641808800000

Response body

{
"clusterUuid": "02ed02ed-02ed-02ed-02ed-02ed02ed02ed",
"timeFrameStart": 1641808800000,
"timeFrameEnd": 1641812400000,
"environmentBillingEntries": [
{
"environmentUuid": "590939093-9093-9093-9093-909390903909",
"visits": 323,
"mobileSessions": 101,
"totalRUMUserPropertiesUsed": 10,
"newProblems": 0,
"hostUsages": [
{
"osiId": -5174977934749450000,
"hostName": null,
"hostCategory": "L",
"agentUsages": [
{
"networkTraffic": null,
"agentId": 2000000008,
"agentTypeId": 1,
"agentUsageRecords": [
{
"startTime": 1641808800000,
"endTime": 1641812400000
}
]
}
],
"infrastructureOnly": false,
"paas": false,
"passMemoryLimit": 0,
"vendorTypeId": null,
"hostMemoryBytes": 8538218496,
"premiumLogAnalytics": true,
"hasContainers": false
}
],
"downloads": [],
"syntheticUsages": [],
"syntheticBillingUsage": [],
"customMetrics": null,
"davisDataUnits": [
{
"pool": "Metrics",
"total": 31
},
{
"pool": "Log",
"total": 233
},
{
"pool": "Events",
"total": 123
},
{
"pool": "Traces",
"total": 15.46369
},
{
"pool": "Serverless",
"total": 4
}
],
"trial": false,
"internalUse": false,
"highAvailabilityCluster": false,
"logStorageUsageBytes": 0,
"logUploadVolumeBytes": 0,
"sessionReplays": 3123,
"mobileSessionReplays": 1232
}
]
}

Response code

200