Retrieve license consumption
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
Response body objects
The LicenseConsumption
object
Describes an hour of license consumption for each environment in the cluster
Cluster identifier
Consumption data export timeframe start
Consumption data export timeframe end
The EnvironmentLicenseConsumption
object
Describes license consumption for the environment
Environment identifier
Count of consumed user sessions
Count of consumed mobile user sessions
Count of defined user session properties
Not used
Environment type flag
Environment is intended for internal use (e.g. self-monitoring)
Indicates if cluster has redundancy by the high availability feature.
Count of Log monitoring storage usage in bytes
Count of Log monitoring upload volume in bytes
Count of consumed user session replays
Count of consumed mobile user session replays
The HostConsumption
object
Describes license consumption by the monitored host.
Host identifier
Not used
Host unit size symbol
Infrastructure-only monitoring mode
Application-only monitoring mode
Container memory limit
Platform as a Service vendor identifier
Host's RAM in bytes
Premium Log monitoring
Host running containers
The AgentConsumption
object
Describes license consumption by the OneAgent.
Not used
Agent unique identifier
Agent type ID; 1 for OS agent
The AgentActivity
object
Describes a period of time when OneAgent was actively consuming a license.
Agent running start time within an hour
Agent running end time within an hour
The DownloadsDto
object
Not used
The SyntheticUsageDto
object
Not used
The SyntheticBillingUsageDto
object
Synthetic monitoring consumption
Synthetic monitor type ID; 1 for browser monitor, 2 for HTTP monitor
Unique Synthetic monitor identifier
Count of executions from public locations
Count of executions from private locations
The CustomMetricDto
object
Custom metrics consumption
Custom metric definition source name
Count of custom metrics
The DavisDataUnitsUsageDto
object
Davis Data Units consumption.
Davis Data Units pool name
Count of consumed Davis Data Units
Response body JSON model
{"clusterUuid": "string","timeFrameStart": "string","timeFrameEnd": "string","environmentBillingEntries": [{"environmentUuid": "string","visits": 1,"mobileSessions": 1,"totalRUMUserPropertiesUsed": 1,"newProblems": 1,"hostUsages": [{"osiId": 1,"hostName": "string","hostCategory": "string","agentUsages": [{"networkTraffic": 1,"agentId": 1,"agentTypeId": 1,"agentUsageRecords": [{"startTime": "string","endTime": "string"}]}],"infrastructureOnly": true,"paas": true,"passMemoryLimit": 1,"vendorTypeId": 1,"hostMemoryBytes": 1,"premiumLogAnalytics": true,"hasContainers": true}],"downloads": [{"type": "string","downloadCount": 1,"version": "string","firstDownloadTime": "string"}],"syntheticUsages": [{"monitorDefinitionId": "string","monitorDescription": "string","monitorTypeId": 1,"successCount": 1,"failureCount": 1,"syntheticActionCount": 1,"performedSyntheticActions": 1}],"syntheticBillingUsage": [{"monitorTypeId": 1,"testId": 1,"publicExecutions": 1,"privateExecutions": 1}],"customMetrics": [{"source": "JMX, Dynatrace API","total": 1}],"davisDataUnits": [{"pool": "Metrics, Serverless Functions, Log","total": 1}],"trial": true,"internalUse": true,"highAvailabilityCluster": true,"logStorageUsageBytes": 1,"logUploadVolumeBytes": 1,"sessionReplays": 1,"mobileSessionReplays": 1}]}
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