Azure credentials API - POST new credentials
Creates a new Azure credentials configuration.
The body must not provide an ID. The Dynatrace server automatically assigns an ID.
The request consumes and produces an application/json
payload.
POST |
|
Authentication
To execute this request, you need the Write configuration (WriteConfig
) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | AzureCredentialsCreation |
The JSON body of the request. Contains parameters of the new Azure credentials configuration. |
body | optional |
Body format
The AzureCredentialsCreation object
Configuration of Azure app-level credentials.
Element | Type | Description | Required |
---|---|---|---|
metadata | ConfigurationMetadata | optional | |
id | string |
The Dynatrace entity ID of the Azure credentials configuration. |
optional |
label | string |
The unique name of the Azure credentials configuration. Allowed characters are letters, numbers, and spaces. Also the special characters |
required |
appId | string |
The Application ID (also referred to as Client ID) |
required |
directoryId | string |
The Directory ID (also referred to as Tenant ID) |
required |
key | string |
The secret key associated with the Application ID. For security reasons, GET requests return this field as Submit your key on creation or update of the configuration. If the field is omitted during an update, the old value remains unaffected. |
required |
active | boolean |
The monitoring is enabled ( If not set on creation, the If the field is omitted during an update, the old value remains unaffected. |
optional |
autoTagging | boolean |
The automatic capture of Azure tags is on ( |
required |
monitorOnlyTaggedEntities | boolean |
Monitor only resources that have specified Azure tags ( |
required |
monitorOnlyTagPairs | CloudTag[] |
A list of Azure tags to be monitored. You can specify up to 10 tags. A resource tagged with any of the specified tags is monitored. Only applicable when the monitorOnlyTaggedEntities parameter is set to |
required |
supportingServices | AzureSupportingService[] |
A list of Azure supporting services to be monitored. For each service there's a sublist of its metrics and the metrics' dimensions that should be monitored. All of these elements (services, metrics, dimensions) must have corresponding static definitions on the server. |
optional |
The AzureSupportingService object
A supporting service to be monitored.
Element | Type | Description | Required |
---|---|---|---|
name | string |
The name of the supporting service. |
optional |
monitoredMetrics | AzureMonitoredMetric[] |
A list of metrics to be monitored for this service. It must include all the recommended metrics. |
optional |
The AzureMonitoredMetric object
A metric of supporting service to be monitored.
Element | Type | Description | Required |
---|---|---|---|
name | string |
The name of the metric of the supporting service. |
optional |
dimensions | string[] |
A list of metric's dimensions names. It must include all the recommended dimensions. |
optional |
The CloudTag object
A cloud tag.
Element | Type | Description | Required |
---|---|---|---|
name | string |
The name of the tag. |
optional |
value | string |
The value of the tag. If set to |
optional |
The ConfigurationMetadata object
Metadata useful for debugging
Element | Type | Description | Required |
---|---|---|---|
configurationVersions | integer[] |
A Sorted list of the version numbers of the configuration. |
optional |
currentConfigurationVersions | string[] |
A Sorted list of string version numbers of the configuration. |
optional |
clusterVersion | string |
Dynatrace server version. |
optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request. See the Example expandable section for working sample request.
{
"metadata": {
"configurationVersions": [
"integer"
],
"currentConfigurationVersions": [
"string"
],
"clusterVersion": "1.192.1"
},
"id": "string",
"label": "string",
"appId": "string",
"directoryId": "string",
"key": "string",
"active": true,
"autoTagging": true,
"monitorOnlyTaggedEntities": true,
"monitorOnlyTagPairs": [
{
"name": "string",
"value": "string"
}
],
"supportingServices": [
{
"name": "string",
"monitoredMetrics": [
{
"name": "string",
"dimensions": [
"string"
]
}
]
}
]
}
Response
Response codes
Code | Description |
---|---|
201 | Success. The new Azure credentials configuration has been created. The response body contains the ID of the configuration. |
400 | Failed. The input is invalid. |
Response body
The EntityShortRepresentation object
The short representation of a Dynatrace entity.
Element | Type | Description |
---|---|---|
id | string | The ID of the Dynatrace entity. |
name | string | The name of the Dynatrace entity. |
description | string | A short description of the Dynatrace entity. |
{
"id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a",
"name": "Dynatrace entity",
"description": "Dynatrace entity for the REST API example\n"
}
Validate payload
We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.
The request consumes an application/json
payload.
POST |
|
Authentication
To execute this request, you need the Write configuration (WriteConfig
) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.
Response
Response codes
Code | Description |
---|---|
204 | Validated. The submitted configuration is valid. The response doesn't have a body. |
400 | Failed. The input is invalid. |
Response body
A successful request doesn't return any content.
Example
In this example, the request creates a new configuration of Azure app-level credentials.
The API token is passed in the Authorization header.
Because the request body is lengthy, it is truncated in this example Curl section. See the full body in the Request body section.
Curl
curl -X POST \
https://mySampleEnv.live.dynatrace.com/api/config/v1/azure/credentials \
-H 'Authorization: Api-Token abcdefjhij1234567890' \
-H 'Content-Type: application/json' \
-d '{<truncated - see the Request body section >}'
Request URL
https://mySampleEnv.live.dynatrace.com/api/config/v1/azure/credentials
Request body
{
"label": "Booking application",
"appId": "c4431dec-34fe-4d4c-ad93-aea38b4f944e",
"directoryId": "f836b63d-8c92-4ad8-a314-bb1eeka46aa1",
"key": "fzksjdfsjdfghsrtgbh",
"active": true,
"autoTagging": true,
"monitorOnlyTaggedEntities": true,
"monitorOnlyTagPairs": [
{
"name": "bookingApp",
"value": "mobile"
},
{
"name": "bookingApp",
"value": "browser"
}
]
}
Response body
{
"id": "AZURE_CREDENTIALS-357FDA338DAAF338",
"name": "Booking application"
}
Response code
201