Plugins API - POST a new plugin's endpoint
Creates a new endpoint for the specified ActiveGate plugin.
The request consumes and produces an application/json
payload.
POST | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/plugins/{id}/endpoints |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/plugins/{id}/endpoints | |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/plugins/{id}/endpoints |
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 plugin where you want to create an endpoint. | path | required |
body | RemotePluginEndpoint | The JSON body of the request. Contains parameters of the new plugin endpoint. | body | optional |
Request body objects
The RemotePluginEndpoint
object
Configuration of a plugin endpoint.
Element | Type | Description | Required |
---|---|---|---|
activeGatePluginModule | EntityShortRepresentation | The short representation of a Dynatrace entity. | required |
enabled | boolean | The endpoint is enabled ( | optional |
id | string | The ID of the endpoint. | optional |
name | string | The name of the endpoint, displayed in Dynatrace. | optional |
pluginId | string | The ID of the plugin to which the endpoint belongs. | optional |
properties | object | The list of endpoint parameters. Each parameter is a property-value pair. | optional |
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 "activeGatePluginModule": {3 "id": "-8844900174269363000"4 },5 "enabled": true,6 "id": "-2183662974968812535",7 "name": "Demo endpoint",8 "pluginId": "custom.remote.python.demo",9 "properties": {10 "dropdownProperty": "two",11 "password": "",12 "serverIp": "127.0.0.1",13 "username": "dynatrace"14 }15}
Response
Response codes
Code | Type | Description |
---|---|---|
201 | EntityShortRepresentation | Success. The plugin endpoint has been created. Response contains the ID of the new endpoint. |
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/plugins/{id}/endpoints/validator |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/plugins/{id}/endpoints/validator | |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/plugins/{id}/endpoints/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. |
Example
In this example, the request creates a new endpoint for the SAP plugin which has the ID of custom.remote.python.sap.
The API token is passed in the Authorization header.
Curl
1curl -X POST \2 https://mySampleEnv.live.dynatrace.com/api/config/v1/plugins/custom.remote.python.sap/endpoints \3 -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \4 -H 'Content-Type: application/json' \5 -d '{6 "pluginId": "custom.remote.python.sap",7 "name": "RESTtest",8 "enabled": false,9 "properties": {10 "clientno": "001",11 "serverIp": "127.0.0.1",12 "password": "",13 "instance": "00",14 "username": "DT"15 },16 "activeGatePluginModule": {17 "id": "1768386982494938781"18 }19}'
Request URL
1https://mySampleEnv.live.dynatrace.com/api/config/v1/plugins/custom.remote.python.sap/endpoints
Request body
1{2 "pluginId": "custom.remote.python.sap",3 "name": "RESTtest",4 "enabled": false,5 "properties": {6 "clientno": "001",7 "serverIp": "192.168.0.1",8 "password": "",9 "instance": "00",10 "username": "DT"11 },12 "activeGatePluginModule": {13 "id": "1768386982494938781"14 }15}
Response body
1{2 "id": "8757307336635955682"3}
Response code
201
Result
The new endpoint looks like this in the UI: