Plugins API - POST a plugin ZIP file
Uploads a ZIP plugin file to your Dynatrace environment.
The request consumes a multipart/form-data
payload and produces an application/json
payload.
POST | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/plugins |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/plugins | |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/plugins |
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 |
---|---|---|---|---|
file | ZIP file | Plugin ZIP file to be uploaded. The file name must match the name field in the For example, for the plugin whose name is | body | required |
overrideAlerts | Boolean | Use plugin-defined thresholds for alerts ( Plugin-defined thresholds are stored in the If not set, user-defined thresholds are used. | query | optional |
Response
Response codes
Code | Type | Description |
---|---|---|
201 | EntityShortRepresentation | Success. Plugin has been uploaded. Response contains the ID of the plugin. |
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/validator |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/plugins/validator | |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/plugins/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 plugin is valid. Response doesn't have a body. |
400 | ErrorEnvelope | Failed. The input is invalid. |
Example
In this example the request uploads the custom.remote.python.simple_math.zip
file, which is stored in the C:\temp\
directory, to the mySampleEnv environment.
The API token is passed in the Authorization header.
The response code of 201 confirms a successful upload. The ID of the plugin is returned.
Curl
1curl -X POST \2 https://mySampleEnv.live.dynatrace.com/api/config/v1/plugins/ \3 -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \4 -H 'content-type: multipart/form-data' \5 -F 'file=@C:\temp\custom.remote.python.simple_math.zip'
Request URL
1https://mySampleEnv.live.dynatrace.com/api/config/v1/plugins/
Response body
1{2 "id": "custom.remote.python.simple_math"3}
Response code
201