List all existing environments
This page will soon be available only on the dedicated Dynatrace Managed Documentation site. Update your bookmarks.
This API call lists all existing environments.
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/environments
Parameter
Parameter | Type | Description | In | Required |
---|---|---|---|---|
nextPageKey | string | The cursor for the next page of results. You can find it in the nextPageKey field of the previous response. The first page is always returned if you don't specify the nextPageKey query parameter. When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters. | query | optional |
pageSize | integer | The amount of environments in a single response payload. The maximal allowed page size is 1000. If not set, 100 is used. | query | optional |
sort | string | The sort order. Possible sorts orders are:
| query | optional |
filter | string | Specifies the filter of the query. You can set one or several of the following criteria:
| query | optional |
includeConsumptionInfo | boolean | If true, consumption information (limits, usage) is returned for each environment. Returned usage is typically up to 1 hour old. To obtain fresher data, you can use includeUncachedConsumptionInfo parameter instead. | query | optional |
includeStorageInfo | boolean | If true, storage information (limits, usage) is returned for each environment. | query | optional |
includeUncachedConsumptionInfo | boolean | If true, uncached consumption information (limits, usage) is returned for each environment. Up to date consumption will be calculated. Calculation may be time consuming, so it's recommended to use includeConsumptionInfo parameter instead. If both this parameter and includeConsumptionInfo are set, includeUncachedConsumptionInfo will take priority. | query | optional |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | EnvironmentList | Successful operation. |
Response body objects
The EnvironmentList
object
A list of environments.
Element | Type | Description |
---|---|---|
totalCount | integer | The total number of entries in the result. |
pageSize | integer | The number of entries per page. |
nextPageKey | string | The cursor for the next page of results. Has the value of Use it in the nextPageKey query parameter to obtain subsequent pages of the result. |
environments | Environment[] | The list of environments. |
The Environment
object
Basic configuration for an environment.
Element | Type | Description |
---|---|---|
name | string | The display name of the environment. |
id | string | The ID of the environment. Has to match [a-zA-Z0-9_-]{1,70} |
trial | boolean | Specifies whether the environment is a trial environment or a non-trial environment. Creating a trial environment is only possible if your license allows that. The default value is false (non-trial). |
state | string | Indicates whether the environment is enabled or disabled. The default value is ENABLED.
|
tags | string[] | A set of tags that are assigned to this environment. Every tag can have a maximum length of 100 characters. |
creationDate | string | The creation date of the environment in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') |
quotas | EnvironmentQuotas | Environment level consumption and quotas information. Only returned if includeConsumptionInfo or includeUncachedConsumptionInfo param is true. If skipped when editing via PUT method then already set quotas will remain. |
storage | EnvironmentStorage | Environment level storage usage and limit information. Not returned if includeStorageInfo param is not true. If skipped when editing via PUT method then already set limits will remain. |
The EnvironmentQuotas
object
Environment level consumption and quotas information. Only returned if includeConsumptionInfo or includeUncachedConsumptionInfo param is true. If skipped when editing via PUT method then already set quotas will remain.
Element | Type | Description |
---|---|---|
hostUnits | HostUnitQuota | Host units consumption and quota information on environment level. If skipped when editing via PUT method then already set quota will remain. |
demUnits | DemUnitsQuota | DEM units consumption and quota information on environment level. Not set (and not editable) if DEM units is not enabled. If skipped when editing via PUT method then already set quotas will remain. |
userSessions | UserSessionsQuota | User sessions consumption and quota information on environment level. If skipped when editing via PUT method then already set quotas will remain. |
sessionProperties | SessionPropertiesQuota | User session properties consumption information on environment level. |
syntheticMonitors | SyntheticQuota | Synthetic monitors consumption and quota information on environment level. Not set (and not editable) if neither Synthetic nor DEM units is enabled. If skipped when editing via PUT method then already set quotas will remain. |
customMetrics | CustomMetricsQuota | Custom metrics consumption and quota information on environment level. Not set (and not editable) if Custom metrics is not enabled. Not set (and not editable) if Davis data units is enabled. If skipped when editing via PUT method then already set quota will remain. |
davisDataUnits | DavisDataUnitsQuota | Davis data units consumption and quota information on environment level. Not set (and not editable) if Davis data units is not enabled. If skipped when editing via PUT method then already set quotas will remain. |
logMonitoring | LogMonitoringQuota | Log monitoring consumption and quota information on environment level. Not set (and not editable) if Log monitoring is not enabled. Not set (and not editable) if Log monitoring is migrated to Davis data on license level. If skipped when editing via PUT method then already set quotas will remain. |
The HostUnitQuota
object
Host units consumption and quota information on environment level. If skipped when editing via PUT method then already set quota will remain.
Element | Type | Description |
---|---|---|
currentUsage | number | Current environment usage. |
maxLimit | integer | Concurrent environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
The DemUnitsQuota
object
DEM units consumption and quota information on environment level. Not set (and not editable) if DEM units is not enabled. If skipped when editing via PUT method then already set quotas will remain.
Element | Type | Description |
---|---|---|
consumedThisMonth | number | Monthly environment consumption. Resets each calendar month. |
consumedThisYear | number | Yearly environment consumption. Resets each year on license creation date anniversary. |
monthlyLimit | integer | Monthly environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
annualLimit | integer | Annual environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
The UserSessionsQuota
object
User sessions consumption and quota information on environment level. If skipped when editing via PUT method then already set quotas will remain.
Element | Type | Description |
---|---|---|
consumedUserSessionsWithMobileSessionReplayThisYear | number | Yearly Mobile user sessions with replay environment consumption. Resets each year on license creation date anniversary. |
consumedUserSessionsWithWebSessionReplayThisMonth | number | Monthly Web user sessions with replay environment consumption. Resets each calendar month. |
consumedUserSessionsWithMobileSessionReplayThisMonth | number | Monthly Mobile user sessions with replay environment consumption. Resets each calendar month. |
totalAnnualLimit | integer | Annual total User sessions environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
totalConsumedThisMonth | number | Monthly total User sessions environment consumption. Resets each calendar month. |
totalConsumedThisYear | number | Yearly total User sessions environment consumption. Resets each year on license creation date anniversary. |
totalMonthlyLimit | integer | Monthly total User sessions environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
consumedUserSessionsWithWebSessionReplayThisYear | number | Yearly Web user sessions with replay environment consumption. Resets each year on license creation date anniversary. |
consumedMobileSessionsThisMonth | number | Monthly Mobile user sessions environment consumption. Resets each calendar month. |
consumedMobileSessionsThisYear | number | Yearly Mobile user sessions environment consumption. Resets each year on license creation date anniversary. |
The SessionPropertiesQuota
object
User session properties consumption information on environment level.
Element | Type | Description |
---|---|---|
consumedThisMonth | number | Monthly environment consumption. Resets each calendar month. |
consumedThisYear | number | Yearly environment consumption. Resets each year on license creation date anniversary. |
The SyntheticQuota
object
Synthetic monitors consumption and quota information on environment level. Not set (and not editable) if neither Synthetic nor DEM units is enabled. If skipped when editing via PUT method then already set quotas will remain.
Element | Type | Description |
---|---|---|
consumedThisMonth | number | Monthly environment consumption. Resets each calendar month. |
consumedThisYear | number | Yearly environment consumption. Resets each year on license creation date anniversary. |
monthlyLimit | integer | Monthly environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
annualLimit | integer | Annual environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
The CustomMetricsQuota
object
Custom metrics consumption and quota information on environment level. Not set (and not editable) if Custom metrics is not enabled. Not set (and not editable) if Davis data units is enabled. If skipped when editing via PUT method then already set quota will remain.
Element | Type | Description |
---|---|---|
currentUsage | number | Current environment usage. |
maxLimit | integer | Concurrent environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
The DavisDataUnitsQuota
object
Davis data units consumption and quota information on environment level. Not set (and not editable) if Davis data units is not enabled. If skipped when editing via PUT method then already set quotas will remain.
Element | Type | Description |
---|---|---|
consumedThisMonth | number | Monthly environment consumption. Resets each calendar month. |
consumedThisYear | number | Yearly environment consumption. Resets each year on license creation date anniversary. |
monthlyLimit | integer | Monthly environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
annualLimit | integer | Annual environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
The LogMonitoringQuota
object
Log monitoring consumption and quota information on environment level. Not set (and not editable) if Log monitoring is not enabled. Not set (and not editable) if Log monitoring is migrated to Davis data on license level. If skipped when editing via PUT method then already set quotas will remain.
Element | Type | Description |
---|---|---|
consumedThisMonth | number | Monthly environment consumption. Resets each calendar month. |
consumedThisYear | number | Yearly environment consumption. Resets each year on license creation date anniversary. |
monthlyLimit | integer | Monthly environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
annualLimit | integer | Annual environment quota. Not set if unlimited. When updating via PUT method, skipping this field will set quota unlimited. |
The EnvironmentStorage
object
Environment level storage usage and limit information. Not returned if includeStorageInfo param is not true. If skipped when editing via PUT method then already set limits will remain.
Element | Type | Description |
---|---|---|
transactionStorage | TransactionStorage | Transaction storage usage and limit information on environment level. If skipped when editing via PUT method then already set limit will remain. |
sessionReplayStorage | SessionReplayStorage | Session replay storage usage and limit information on environment level. If skipped when editing via PUT method then already set limit will remain. |
symbolFilesFromMobileApps | SymbolFilesFromMobileApps | Symbol files from mobile apps storage usage and limit information on environment level. If skipped when editing via PUT method then already set limit will remain. |
logMonitoringStorage | LogMonitoringStorage | Log monitoring storage usage and limit information on environment level. Not editable when Log monitoring is not allowed by license or not configured on cluster level. If skipped when editing via PUT method then already set limit will remain. |
serviceRequestLevelRetention | ServiceRequestLevelRetention | Service request level retention settings on environment level. Service code level retention time can't be greater than service request level retention time and both can't exceed one year.If skipped when editing via PUT method then already set limit will remain. |
serviceCodeLevelRetention | ServiceCodeLevelRetention | Service code level retention settings on environment level. Service code level retention time can't be greater than service request level retention time and both can't exceed one year.If skipped when editing via PUT method then already set limit will remain. |
realUserMonitoringRetention | RealUserMonitoringRetention | Real user monitoring retention settings on environment level. Can be set to any value from 1 to 35 days. If skipped when editing via PUT method then already set limit will remain. |
syntheticMonitoringRetention | SyntheticMonitoringRetention | Synthetic monitoring retention settings on environment level. Can be set to any value from 1 to 35 days. If skipped when editing via PUT method then already set limit will remain. |
sessionReplayRetention | SessionReplayRetention | Session replay retention settings on environment level. Can be set to any value from 1 to 35 days. If skipped when editing via PUT method then already set limit will remain. |
logMonitoringRetention | LogMonitoringRetention | Log monitoring retention settings on environment level. Not editable when Log monitoring is not allowed by license or not configured on cluster level. Can be set to any value from 5 to 90 days. If skipped when editing via PUT method then already set limit will remain. |
userActionsPerMinute | UserActionsPerMinute | Maximum number of user actions generated per minute on environment level. Can be set to any value from 1 to 2147483646 or left unlimited. If skipped when editing via PUT method then already set limit will remain. |
transactionTrafficQuota | TransactionTrafficQuota | Maximum number of newly monitored entry point PurePaths captured per process/minute on environment level. Can be set to any value from 100 to 100000. If skipped when editing via PUT method then already set limit will remain. |
The TransactionStorage
object
Transaction storage usage and limit information on environment level. If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
retentionReductionPercentage | string | Percentage of truncation for new data. |
retentionReductionReason | string | Reason of truncation. |
maxLimit | integer | Maximum storage limit [bytes] |
currentlyUsed | integer | Currently used storage [bytes] |
The SessionReplayStorage
object
Session replay storage usage and limit information on environment level. If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
retentionReductionPercentage | string | Percentage of truncation for new data. |
retentionReductionReason | string | Reason of truncation. |
maxLimit | integer | Maximum storage limit [bytes] |
currentlyUsed | integer | Currently used storage [bytes] |
The SymbolFilesFromMobileApps
object
Symbol files from mobile apps storage usage and limit information on environment level. If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
maxLimit | integer | Maximum storage limit [bytes] |
currentlyUsed | integer | Currently used storage [bytes] |
The LogMonitoringStorage
object
Log monitoring storage usage and limit information on environment level. Not editable when Log monitoring is not allowed by license or not configured on cluster level. If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
maxLimit | integer | Maximum storage limit [bytes] |
currentlyUsed | integer | Currently used storage [bytes] |
The ServiceRequestLevelRetention
object
Service request level retention settings on environment level. Service code level retention time can't be greater than service request level retention time and both can't exceed one year.If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
maxLimitInDays | integer | Maximum retention limit [days] |
currentlyUsedInMillis | integer | Current data age [milliseconds] |
currentlyUsedInDays | integer | Current data age [days] |
The ServiceCodeLevelRetention
object
Service code level retention settings on environment level. Service code level retention time can't be greater than service request level retention time and both can't exceed one year.If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
maxLimitInDays | integer | Maximum retention limit [days] |
currentlyUsedInMillis | integer | Current data age [milliseconds] |
currentlyUsedInDays | integer | Current data age [days] |
The RealUserMonitoringRetention
object
Real user monitoring retention settings on environment level. Can be set to any value from 1 to 35 days. If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
maxLimitInDays | integer | Maximum retention limit [days] |
currentlyUsedInMillis | integer | Current data age [milliseconds] |
currentlyUsedInDays | integer | Current data age [days] |
The SyntheticMonitoringRetention
object
Synthetic monitoring retention settings on environment level. Can be set to any value from 1 to 35 days. If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
maxLimitInDays | integer | Maximum retention limit [days] |
currentlyUsedInMillis | integer | Current data age [milliseconds] |
currentlyUsedInDays | integer | Current data age [days] |
The SessionReplayRetention
object
Session replay retention settings on environment level. Can be set to any value from 1 to 35 days. If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
maxLimitInDays | integer | Maximum retention limit [days] |
currentlyUsedInMillis | integer | Current data age [milliseconds] |
currentlyUsedInDays | integer | Current data age [days] |
The LogMonitoringRetention
object
Log monitoring retention settings on environment level. Not editable when Log monitoring is not allowed by license or not configured on cluster level. Can be set to any value from 5 to 90 days. If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
maxLimitInDays | integer | Maximum retention limit [days] |
currentlyUsedInMillis | integer | Current data age [milliseconds] |
currentlyUsedInDays | integer | Current data age [days] |
The UserActionsPerMinute
object
Maximum number of user actions generated per minute on environment level. Can be set to any value from 1 to 2147483646 or left unlimited. If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
maxLimit | integer | Maximum traffic [units per minute] |
The TransactionTrafficQuota
object
Maximum number of newly monitored entry point PurePaths captured per process/minute on environment level. Can be set to any value from 100 to 100000. If skipped when editing via PUT method then already set limit will remain.
Element | Type | Description |
---|---|---|
maxLimit | integer | Maximum traffic [units per minute] |
Response body JSON model
1{2 "totalCount": 1,3 "pageSize": 1,4 "nextPageKey": "AQAAABQBAAAABQ==",5 "environments": [6 {7 "name": "example environment",8 "state": "ENABLED",9 "tags": [10 "tag1",11 "tag2"12 ],13 "trial": false14 }15 ]16}
Example
Lists the two newest enabled environments with their license consumption, sorted by name.
Curl
1curl -X GET "https://myManaged.cluster.com/api/cluster/v2/environments?pageSize=2&sort=-creationDate&filter=state%28ENABLED%29&includeConsumptionInfo=true" -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890"
Request URL
1https://myManaged.cluster.com/api/cluster/v2/environments?pageSize=2&sort=-creationDate&filter=state%28ENABLED%29&includeConsumptionInfo=true
Response body
1{2 "totalCount": 78,3 "pageSize": 2,4 "nextPageKey": "AAAAAQAAAAIBnldfkgldsjoeriKIDFL2AAABd3uuvIMBAA5zdGF0ZShFTkFCTEVEKQEADS1jcmVhdGlvbkRhdGU=",5 "environments": [6 {7 "name": "AndroidApps",8 "id": "be22c776-1414-00e0-a00a-00b0dcf56443321",9 "trial": false,10 "state": "ENABLED",11 "tags": [],12 "creationDate": "2021-02-09T11:03:17.732Z",13 "quotas": {14 "hostUnits": {15 "maxLimit": 10,16 "currentUsage": 017 },18 "demUnits": {19 "monthlyLimit": 50001,20 "annualLimit": null,21 "consumedThisMonth": 0,22 "consumedThisYear": 023 },24 "userSessions": {25 "totalMonthlyLimit": null,26 "totalAnnualLimit": null,27 "totalConsumedThisMonth": 0,28 "totalConsumedThisYear": 0,29 "consumedMobileSessionsThisMonth": 0,30 "consumedMobileSessionsThisYear": 0,31 "consumedUserSessionsWithWebSessionReplayThisMonth": 0,32 "consumedUserSessionsWithWebSessionReplayThisYear": 0,33 "consumedUserSessionsWithMobileSessionReplayThisMonth": 0,34 "consumedUserSessionsWithMobileSessionReplayThisYear": 035 },36 "sessionProperties": {37 "consumedThisMonth": 0,38 "consumedThisYear": 039 },40 "syntheticMonitors": {41 "monthlyLimit": null,42 "annualLimit": null,43 "consumedThisMonth": 0,44 "consumedThisYear": 045 },46 "customMetrics": null,47 "davisDataUnits": {48 "monthlyLimit": 18162,49 "annualLimit": null,50 "consumedThisMonth": 0,51 "consumedThisYear": 052 },53 "logMonitoring": null54 }55 },56 {57 "name": "Service Team",58 "id": "881c4134-0000-0a00-aa0a-5b03ab7a34ed",59 "trial": false,60 "state": "ENABLED",61 "tags": [],62 "creationDate": "2021-02-07T08:49:45.091Z",63 "quotas": {64 "hostUnits": {65 "maxLimit": null,66 "currentUsage": 067 },68 "demUnits": {69 "monthlyLimit": null,70 "annualLimit": null,71 "consumedThisMonth": 0,72 "consumedThisYear": 6273 },74 "userSessions": {75 "totalMonthlyLimit": null,76 "totalAnnualLimit": null,77 "totalConsumedThisMonth": 0,78 "totalConsumedThisYear": 0,79 "consumedMobileSessionsThisMonth": 0,80 "consumedMobileSessionsThisYear": 0,81 "consumedUserSessionsWithWebSessionReplayThisMonth": 0,82 "consumedUserSessionsWithWebSessionReplayThisYear": 0,83 "consumedUserSessionsWithMobileSessionReplayThisMonth": 0,84 "consumedUserSessionsWithMobileSessionReplayThisYear": 085 },86 "sessionProperties": {87 "consumedThisMonth": 0,88 "consumedThisYear": 089 },90 "syntheticMonitors": {91 "monthlyLimit": null,92 "annualLimit": null,93 "consumedThisMonth": 0,94 "consumedThisYear": 6295 },96 "customMetrics": null,97 "davisDataUnits": {98 "monthlyLimit": null,99 "annualLimit": null,100 "consumedThisMonth": 0,101 "consumedThisYear": 0102 },103 "logMonitoring": null104 }105 }106 ]107}
Response code
200