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

CodeTypeDescription
200LicenseConsumption

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

ElementTypeDescription
clusterUuidstring

Cluster identifier

timeFrameStartstring

Consumption data export timeframe start

timeFrameEndstring

Consumption data export timeframe end

environmentBillingEntriesEnvironmentLicenseConsumption[]

Environments' consumptions

The EnvironmentLicenseConsumption object

Describes license consumption for the environment

ElementTypeDescription
environmentUuidstring

Environment identifier

visitsinteger

Count of consumed user sessions

mobileSessionsinteger

Count of consumed mobile user sessions

totalRUMUserPropertiesUsedinteger

Count of defined user session properties

newProblemsinteger

Not used

hostUsagesHostConsumption[]

Monitored hosts' consumption

downloadsDownloadsDto[]

Not used

syntheticUsagesSyntheticUsageDto[]

Not used

syntheticBillingUsageSyntheticBillingUsageDto[]

Synthetic monitoring consumption

customMetricsCustomMetricDto[]

Custom metrics consumption

davisDataUnitsDavisDataUnitsUsageDto[]

Davis Data Units consumption

trialboolean

Environment type flag

internalUseboolean

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

highAvailabilityClusterboolean

Indicates if cluster has redundancy by the high availability feature.

logStorageUsageBytesinteger

Count of Log monitoring storage usage in bytes

logUploadVolumeBytesinteger

Count of Log monitoring upload volume in bytes

sessionReplaysinteger

Count of consumed user session replays

mobileSessionReplaysinteger

Count of consumed mobile user session replays

The HostConsumption object

Describes license consumption by the monitored host.

ElementTypeDescription
osiIdinteger

Host identifier

hostNamestring

Not used

hostCategorystring

Host unit size symbol

agentUsagesAgentConsumption[]

Agent details

infrastructureOnlyboolean

Infrastructure-only monitoring mode

paasboolean

Application-only monitoring mode

passMemoryLimitinteger

Container memory limit

vendorTypeIdinteger

Platform as a Service vendor identifier

hostMemoryBytesinteger

Host's RAM in bytes

premiumLogAnalyticsboolean

Premium Log monitoring

hasContainersboolean

Host running containers

The AgentConsumption object

Describes license consumption by the OneAgent.

ElementTypeDescription
networkTrafficinteger

Not used

agentIdinteger

Agent unique identifier

agentTypeIdinteger

Agent type ID; 1 for OS agent

agentUsageRecordsAgentActivity[]

Agent activity periods within an hour

The AgentActivity object

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

ElementTypeDescription
startTimestring

Agent running start time within an hour

endTimestring

Agent running end time within an hour

The DownloadsDto object

Not used

ElementTypeDescription
typestring-
downloadCountinteger-
versionstring-
firstDownloadTimestring-

The SyntheticUsageDto object

Not used

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

The SyntheticBillingUsageDto object

Synthetic monitoring consumption

ElementTypeDescription
monitorTypeIdinteger

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

testIdinteger

Unique Synthetic monitor identifier

publicExecutionsinteger

Count of executions from public locations

privateExecutionsinteger

Count of executions from private locations

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

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