Retrieve license consumption
This page will soon be available only on the dedicated Dynatrace Managed Documentation site. Update your bookmarks.
This API call exports license consumption data for an hour in JSON format.
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
Code | Type | Description |
---|---|---|
200 | LicenseConsumption | Success |
400 | - | Bad request. Provided timestamp is incorrect. |
500 | - | Operation failed |
Response body objects
The LicenseConsumption
object
Describes an hour of license consumption for each environment in the cluster
Element | Type | Description |
---|---|---|
clusterUuid | string | Cluster identifier |
timeFrameStart | string | Consumption data export timeframe start |
timeFrameEnd | string | Consumption data export timeframe end |
environmentBillingEntries | EnvironmentLicenseConsumption[] | Environments' consumptions |
The EnvironmentLicenseConsumption
object
Describes license consumption for the environment
Element | Type | Description |
---|---|---|
environmentUuid | string | Environment identifier |
visits | integer | Count of consumed user sessions |
mobileSessions | integer | Count of consumed mobile user sessions |
totalRUMUserPropertiesUsed | integer | Count of defined user session properties |
newProblems | integer | Not used |
hostUsages | HostConsumption[] | Monitored hosts' consumption |
downloads | DownloadsDto[] | Not used |
syntheticUsages | SyntheticUsageDto[] | Not used |
syntheticBillingUsage | SyntheticBillingUsageDto[] | Synthetic monitoring consumption |
customMetrics | CustomMetricDto[] | Custom metrics consumption |
davisDataUnits | DavisDataUnitsUsageDto[] | Davis Data Units consumption |
trial | boolean | Environment type flag |
internalUse | boolean | Environment is intended for internal use (e.g. self-monitoring) |
highAvailabilityCluster | boolean | Indicates if cluster has redundancy by the high availability feature. |
logStorageUsageBytes | integer | Count of Log monitoring storage usage in bytes |
logUploadVolumeBytes | integer | Count of Log monitoring upload volume in bytes |
sessionReplays | integer | Count of consumed user session replays |
mobileSessionReplays | integer | Count of consumed mobile user session replays |
The HostConsumption
object
Describes license consumption by the monitored host.
Element | Type | Description |
---|---|---|
osiId | integer | Host identifier |
hostName | string | Not used |
hostCategory | string | Host unit size symbol |
agentUsages | AgentConsumption[] | Agent details |
infrastructureOnly | boolean | Infrastructure-only monitoring mode |
paas | boolean | Application-only monitoring mode |
passMemoryLimit | integer | Container memory limit |
vendorTypeId | integer | Platform as a Service vendor identifier |
hostMemoryBytes | integer | Host's RAM in bytes |
premiumLogAnalytics | boolean | Premium Log monitoring |
hasContainers | boolean | Host running containers |
The AgentConsumption
object
Describes license consumption by the OneAgent.
Element | Type | Description |
---|---|---|
networkTraffic | integer | Not used |
agentId | integer | Agent unique identifier |
agentTypeId | integer | Agent type ID; 1 for OS agent |
agentUsageRecords | AgentActivity[] | Agent activity periods within an hour |
The AgentActivity
object
Describes a period of time when OneAgent was actively consuming a license.
Element | Type | Description |
---|---|---|
startTime | string | Agent running start time within an hour |
endTime | string | Agent running end time within an hour |
The DownloadsDto
object
Not used
Element | Type | Description |
---|---|---|
type | string | - |
downloadCount | integer | - |
version | string | - |
firstDownloadTime | string | - |
The SyntheticUsageDto
object
Not used
Element | Type | Description |
---|---|---|
monitorDefinitionId | string | - |
monitorDescription | string | - |
monitorTypeId | integer | - |
successCount | integer | - |
failureCount | integer | - |
syntheticActionCount | integer | - |
performedSyntheticActions | integer | - |
The SyntheticBillingUsageDto
object
Synthetic monitoring consumption
Element | Type | Description |
---|---|---|
monitorTypeId | integer | Synthetic monitor type ID; 1 for browser monitor, 2 for HTTP monitor |
testId | integer | Unique Synthetic monitor identifier |
publicExecutions | integer | Count of executions from public locations |
privateExecutions | integer | Count of executions from private locations |
The CustomMetricDto
object
Custom metrics consumption
Element | Type | Description |
---|---|---|
source | string | Custom metric definition source name |
total | integer | Count of custom metrics |
The DavisDataUnitsUsageDto
object
Davis Data Units consumption.
Element | Type | Description |
---|---|---|
pool | string | Davis Data Units pool name |
total | number | Count of consumed Davis Data Units |
Response body JSON model
1{2 "clusterUuid": "string",3 "timeFrameStart": "string",4 "timeFrameEnd": "string",5 "environmentBillingEntries": [6 {7 "environmentUuid": "string",8 "visits": 1,9 "mobileSessions": 1,10 "totalRUMUserPropertiesUsed": 1,11 "newProblems": 1,12 "hostUsages": [13 {14 "osiId": 1,15 "hostName": "string",16 "hostCategory": "string",17 "agentUsages": [18 {19 "networkTraffic": 1,20 "agentId": 1,21 "agentTypeId": 1,22 "agentUsageRecords": [23 {24 "startTime": "string",25 "endTime": "string"26 }27 ]28 }29 ],30 "infrastructureOnly": true,31 "paas": true,32 "passMemoryLimit": 1,33 "vendorTypeId": 1,34 "hostMemoryBytes": 1,35 "premiumLogAnalytics": true,36 "hasContainers": true37 }38 ],39 "downloads": [40 {41 "type": "string",42 "downloadCount": 1,43 "version": "string",44 "firstDownloadTime": "string"45 }46 ],47 "syntheticUsages": [48 {49 "monitorDefinitionId": "string",50 "monitorDescription": "string",51 "monitorTypeId": 1,52 "successCount": 1,53 "failureCount": 1,54 "syntheticActionCount": 1,55 "performedSyntheticActions": 156 }57 ],58 "syntheticBillingUsage": [59 {60 "monitorTypeId": 1,61 "testId": 1,62 "publicExecutions": 1,63 "privateExecutions": 164 }65 ],66 "customMetrics": [67 {68 "source": "JMX, Dynatrace API",69 "total": 170 }71 ],72 "davisDataUnits": [73 {74 "pool": "Metrics, Serverless Functions, Log",75 "total": 176 }77 ],78 "trial": true,79 "internalUse": true,80 "highAvailabilityCluster": true,81 "logStorageUsageBytes": 1,82 "logUploadVolumeBytes": 1,83 "sessionReplays": 1,84 "mobileSessionReplays": 185 }86 ]87}
Example
In this example, you request an hour of license data on Monday, 10 January 2022 10:00:00 GMT (1641808800000)
Curl
1curl -X GET "https://myManaged.cluster.com/api/cluster/v2/license/consumption/hour?startTs=1641810541000"2 -H "accept: application/json; charset=utf-8"3 -H "Authorization: Api-Token abcdefjhij1234567890"
Request URL
1https://myManaged.cluster.com/api/cluster/v2/license/consumption/hour?startTs=1641808800000
Response body
1{2 "clusterUuid": "02ed02ed-02ed-02ed-02ed-02ed02ed02ed",3 "timeFrameStart": 1641808800000,4 "timeFrameEnd": 1641812400000,5 "environmentBillingEntries": [6 {7 "environmentUuid": "590939093-9093-9093-9093-909390903909",8 "visits": 323,9 "mobileSessions": 101,10 "totalRUMUserPropertiesUsed": 10,11 "newProblems": 0,12 "hostUsages": [13 {14 "osiId": -5174977934749450000,15 "hostName": null,16 "hostCategory": "L",17 "agentUsages": [18 {19 "networkTraffic": null,20 "agentId": 2000000008,21 "agentTypeId": 1,22 "agentUsageRecords": [23 {24 "startTime": 1641808800000,25 "endTime": 164181240000026 }27 ]28 }29 ],30 "infrastructureOnly": false,31 "paas": false,32 "passMemoryLimit": 0,33 "vendorTypeId": null,34 "hostMemoryBytes": 8538218496,35 "premiumLogAnalytics": true,36 "hasContainers": false37 }38 ],39 "downloads": [],40 "syntheticUsages": [],41 "syntheticBillingUsage": [],42 "customMetrics": null,43 "davisDataUnits": [44 {45 "pool": "Metrics",46 "total": 3147 },48 {49 "pool": "Log",50 "total": 23351 },52 {53 "pool": "Events",54 "total": 12355 },56 {57 "pool": "Traces",58 "total": 15.4636959 },60 {61 "pool": "Serverless",62 "total": 463 }64 ],65 "trial": false,66 "internalUse": false,67 "highAvailabilityCluster": false,68 "logStorageUsageBytes": 0,69 "logUploadVolumeBytes": 0,70 "sessionReplays": 3123,71 "mobileSessionReplays": 123272 }73 ]74}
Response code
200