Plugins API - PUT an endpoint of a plugin
Updates properties of the specified endpoint of the ActiveGate plugin.
The request consumes an application/json
payload.
PUT | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/plugins/{id}/endpoints/{endpointId} |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/plugins/{id}/endpoints/{endpointId} | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/plugins/{id}/endpoints/{endpointId} |
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 update an endpoint. If you set the plugin ID in the body as well, it must match this ID. | path | required |
endpointId | string | The ID of the endpoint to be updated. If you set the endpoint ID in the body as well, it must match this ID. | path | required |
body | Remote | The JSON body of the request. Contains updated parameters of the plugin endpoint. | body | optional |
Request body objects
The RemotePluginEndpoint
object
Configuration of a plugin endpoint.
Element | Type | Description | Required |
---|---|---|---|
id | string | The ID of the endpoint. | optional |
pluginId | string | The ID of the plugin to which the endpoint belongs. | optional |
name | string | The name of the endpoint, displayed in Dynatrace. | optional |
enabled | boolean | The endpoint is enabled ( | optional |
properties | object | The list of endpoint parameters. Each parameter is a property-value pair. | optional |
activeGatePluginModule | Entity | The short representation of a Dynatrace entity. | required |
The EntityShortRepresentation
object
The short representation of a Dynatrace entity.
Element | Type | Description | Required |
---|---|---|---|
id | string | The ID of the Dynatrace entity. | required |
name | string | The name of the Dynatrace entity. | optional |
description | string | A short description 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.
{
"id": "-2183662974968812535",
"pluginId": "custom.remote.python.demo",
"name": "Demo endpoint",
"enabled": true,
"properties": {
"serverIp": "127.0.0.1",
"password": "",
"username": "dynatrace",
"dropdownProperty": "two"
},
"activeGatePluginModule": {
"id": "-8844900174269363000"
}
}
Response
Response codes
Code | Type | Description |
---|---|---|
204 | Success. The endpoint has been updated. Response doesn't have a body. | |
400 | ErrorEnvelope | Failed. The input is invalid. |
Example
In this example, the request updates the RESTtest endpoint of the SAP plugin which has the ID of custom.remote.python.sap. It makes the following changes to the endpoint:
- name to
RESTtest - updated
- serverIp to
192.168.1.1
- activeGatePluginModule to l-009 which has the ID of
6121289130553435111
The API token is passed in the Authorization header.
You can download or copy the example request body to try it out on your own.
The original endpoint has the following parameters:
Curl
curl -X PUT \
https://mySampleEnv.live.dynatrace.com/api/config/v1/plugins/custom.remote.python.sap/endpoints/8757307336635955682 \
-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \
-H 'Content-Type: application/json' \
-d '{
"name": "RESTtest - updated",
"enabled": false,
"properties": {
"clientno": "001",
"serverIp": "192.168.1.1",
"password": "",
"instance": "00",
"username": "DT"
},
"activeGatePluginModule": {
"id": "6121289130553435111"
}
}'
Request URL
https://mySampleEnv.live.dynatrace.com/api/config/v1/plugins/custom.remote.python.sap/endpoints/8757307336635955682
Request body
{
"name": "RESTtest - updated",
"enabled": false,
"properties": {
"clientno": "001",
"serverIp": "192.168.1.1",
"password": "",
"instance": "00",
"username": "DT"
},
"activeGatePluginModule": {
"id": "6121289130553435111"
}
}
Response code
204
Result
The updated endpoint looks like this in the UI: