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

Code
Type
Description
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

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

Monitored hosts' consumption

downloads

Not used

syntheticUsages

Not used

syntheticBillingUsage

Synthetic monitoring consumption

customMetrics

Custom metrics consumption

davisDataUnits

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

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

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

{
"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