Extensions API - POST a new extension's instance
Creates a new instance for the specified extension.
The request consumes and produces an application/json
payload.
POST | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/extensions/{id}/instances |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/extensions/{id}/instances | |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/extensions/{id}/instances |
Authentication
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
id | string | The ID of the extension | path | required |
body | ExtensionConfigurationDto | The JSON body of the request. Contains new configuration of the extension. | body | optional |
Request body objects
The ExtensionConfigurationDto
object
Element | Type | Description | Required |
---|---|---|---|
activeGate | EntityShortRepresentation | The short representation of a Dynatrace entity. | optional |
enabled | boolean | The extension is enabled ( | required |
endpointId | string | The ID of the endpoint. | optional |
endpointName | string | The name of the endpoint, displayed in Dynatrace. | optional |
extensionId | string | The ID of the extension. | optional |
hostId | string | The ID of the host on which the extension runs. | optional |
properties | object | The list of extension parameters. Each parameter is a key-value pair. | optional |
useGlobal | boolean | Allows to skip current configuration and use global one. | required |
The EntityShortRepresentation
object
The short representation of a Dynatrace entity.
Element | Type | Description | Required |
---|---|---|---|
description | string | A short description of the Dynatrace entity. | optional |
id | string | The ID of the Dynatrace entity. | required |
name | string | The name of the Dynatrace entity. | optional |
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
1{2 "activeGate": {3 "id": "7835970235169136995",4 "name": "ActiveGate Host Name"5 },6 "enabled": true,7 "hostId": "HOST-01A7DEFA5340A86D",8 "id": "custom.remote.python.demo",9 "properties": {10 "dropdownProperty": "three",11 "password": "",12 "serverIp": "127.0.0.1",13 "username": "dynatrace"14 },15 "useGlobal": false16}
Response
Response codes
Code | Type | Description |
---|---|---|
201 | EntityShortRepresentation | Success. The extension configuration has been created. Response contains the ID of the new configuration. |
400 | ErrorEnvelope | Failed. The input is invalid |
Response body objects
The EntityShortRepresentation
object
The short representation of a Dynatrace entity.
Element | Type | Description |
---|---|---|
description | string | A short description of the Dynatrace entity. |
id | string | The ID of the Dynatrace entity. |
name | string | The name of the Dynatrace entity. |
Response body JSON model
1{2 "description": "Dynatrace entity for the REST API example",3 "id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a",4 "name": "Dynatrace entity"5}
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 | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/extensions/{id}/instances/validator |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/extensions/{id}/instances/validator | |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/extensions/{id}/instances/validator |
Authentication
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Response
Response codes
Code | Type | Description |
---|---|---|
204 | - | Validated. The submitted configuration is valid. Response doesn't have a body. |
400 | ErrorEnvelope | Failed. The input is invalid |