Upload a new Extension 2.0 in Dynatrace with the Extensions API and persist the package for later use.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/extensions/v2/extensions |
You upload a new Extension 2.0 with the request body. The operation returns 201 when Dynatrace accepts the extension and stores it.
To execute this request, you need a platform token or OAuth access token with extensions:definitions:write scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| body | string | Extension 2.0 zip file to upload. | body | Required |
RequestBody object| Code | Type | Description |
|---|---|---|
| 201 | Extension | Success. Extension 2.0 has been uploaded. |
| 400 | Error | Failed. The input file is invalid. |
| 409 | Error | Upload isn't possible yet. Try again in a few seconds. |
| 4XX | Error | Client error. |
| 5XX | Error | Server error. |
ExtensionUploadResponse object| Element | Type | Description |
|---|---|---|
| assetsInfo | Upload | Information about extension assets included |
| author | Author | Extension author |
| dataSources | string[] | Data sources that extension uses to gather data |
| extensionName | string | Extension name |
| featureSets | string[] | Available feature sets |
| featureSetsDetails | object | Details of feature sets |
| fileHash | string | SHA-256 hash of uploaded Extension file |
| minDynatraceVersion | string | Minimal Dynatrace version that works with the extension |
| minEECVersion | string | Minimal Extension Execution Controller version that works with the extension |
| variables | string[] | Custom variables used in extension configuration |
| version | string | Extension version |
UploadResponseAssetInfo objectInformation about extension assets included
| Element | Type | Description |
|---|---|---|
| assetType | string | - |
| count | integer | - |
Author objectExtension author
| Element | Type | Description |
|---|---|---|
| name | string | Author name |
FeatureSetDetails objectAdditional information about a Feature Set
| Element | Type | Description |
|---|---|---|
| description | string | Optional description for the feature set |
| displayName | string | Optional display name of the feature set |
| isRecommended | boolean | Marks the feature set as recommended (selected by default during activation) |
| metrics | Metric[] | Feature set metrics |
Metric objectMetric gathered by an extension
| Element | Type | Description |
|---|---|---|
| key | string | Metric key |
| metadata | Metric | Metric metadata |
MetricMetadata objectMetric metadata
| Element | Type | Description |
|---|---|---|
| description | string | A short description of the metric |
| displayName | string | The name of the metric in the user interface |
| unit | string | The unit of the metric |
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Error | - |
Error object| Element | Type | Description |
|---|---|---|
| code | integer | The HTTP status code. |
| details | Error | The error details. |
| message | string | The error message. |
ErrorDetails objectThe error details.
| Element | Type | Description |
|---|---|---|
| constraintViolations | Constraint | A list of constraint violations. |
ConstraintViolation objectA list of constraint violations.
| Element | Type | Description |
|---|---|---|
| location | string | - |
| message | string | - |
| parameterLocation | string | -The element can hold these values
|
| path | string | - |
{"assetsInfo": [{"assetType": "string","count": 1}],"author": {"name": "string"},"dataSources": ["string"],"extensionName": "string","featureSets": ["string"],"featureSetsDetails": {},"fileHash": "string","minDynatraceVersion": "string","minEECVersion": "string","variables": ["string"],"version": "1.2.3"}
{"error": {"code": 1,"details": {"constraintViolations": [{"location": "string","message": "string","parameterLocation": "HEADER","path": "string"}]},"message": "string"}}