Uploads a ZIP plugin file to your Dynatrace environment.
The request consumes a multipart/form-data payload and produces an application/json payload.
| POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/plugins |
| POST | Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/plugins |
To execute this request, you need an access token with WriteConfig scope.
To learn how to obtain and use it, see Tokens and authentication.
| Code | Type | Description |
|---|---|---|
| 201 | Entity | Success. Plugin has been uploaded. Response contains the ID of the plugin. |
| 400 | Error | Failed. The input is invalid. |
EntityShortRepresentation objectThe 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. |
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Error | - |
Error object| Element | Type | Description |
|---|---|---|
| code | integer | The HTTP status code |
| constraintViolations | Constraint | A list of constraint violations |
| message | string | The error message |
ConstraintViolation objectA list of constraint violations
| Element | Type | Description |
|---|---|---|
| location | string | - |
| message | string | - |
| parameterLocation | string | -The element can hold these values
|
| path | string | - |
{"description": "Dynatrace entity for the REST API example","id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a","name": "Dynatrace entity"}
{"error": {"code": 1,"constraintViolations": [{"location": "string","message": "string","parameterLocation": "HEADER","path": "string"}],"message": "string"}}
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 | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/plugins/validator |
| POST | Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/plugins/validator |
To execute this request, you need an access token with WriteConfig scope.
To learn how to obtain and use it, see Tokens and authentication.
| Code | Type | Description |
|---|---|---|
| 204 | - | Validated. The submitted plugin is valid. Response doesn't have a body. |
| 400 | Error | Failed. The input is invalid. |
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Error | - |
Error object| Element | Type | Description |
|---|---|---|
| code | integer | The HTTP status code |
| constraintViolations | Constraint | A list of constraint violations |
| message | string | The error message |
ConstraintViolation objectA list of constraint violations
| Element | Type | Description |
|---|---|---|
| location | string | - |
| message | string | - |
| parameterLocation | string | -The element can hold these values
|
| path | string | - |
{"error": {"code": 1,"constraintViolations": [{"location": "string","message": "string","parameterLocation": "HEADER","path": "string"}],"message": "string"}}
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 -X POST \https://mySampleEnv.live.dynatrace.com/api/config/v1/plugins/ \-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \-H 'content-type: multipart/form-data' \-F 'file=@C:\temp\custom.remote.python.simple_math.zip'
https://mySampleEnv.live.dynatrace.com/api/config/v1/plugins/
{"id": "custom.remote.python.simple_math"}
201