Dynatrace platform subscription API v1 - GET environments
Lists all Dynatrace environments of an account.
The request produces an application/json
payload.
GET |
|
Authentication
To execute this request, you need the Allow read access for usage and consumption resources (account-uac-read
) scope assigned to your token. To learn how to obtain and use it, see Authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
accountUuid | string | The ID of the required account. You can find the UUID on the Account > Account management API page, during creation of an OAuth client. | path | required |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | ClaEnvironmentListDto | Success. The response contains a list of the account's environments. |
Response body objects
The ClaEnvironmentListDto
object
Element | Type | Description |
---|---|---|
totalCount | number | The number of entries in the list. |
records | ClaEnvironmentDto[] | A list of environments of the account. |
The ClaEnvironmentDto
object
Element | Type | Description |
---|---|---|
environmentUuid | string | The ID of the environments. |
Response body JSON model
{"totalCount": 1,"records": [{"environmentUuid": "string"}]}
Example
In this example, the request lists all environments of the 2b794097-8ad2-4b32-b923-0131da2eeddf account.
curl --request GET \--url 'https://api.dynatrace.com/sub/v1/accounts/2b794097-8ad2-4b32-b923-0131da2eeddf/environments' \--header 'Authorization: Bearer abcdefjhij1234567890'
Request URL
https://api.dynatrace.com/sub/v1/accounts/2b794097-8ad2-4b32-b923-0131da2eeddf/environments
Response body
{"totalCount": 1,"records": [{"environmentUuid": "mySampleEnv"}]}