Extensions 2.0 API - POST an extension file
Uploads an Extensions 2.0 extension 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/v2/extensions |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/extensions | |
Environment and Cluster ActiveGate (default port 9999) | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/extensions |
Authentication
To execute this request, you need an access token with extensions.write
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
file | .zip file | Extension 2.0 package file (*.zip ) to be uploaded. Must contain only extension zip and .zip.sig files. | body | required |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | ExtensionUploadResponseDto | The extension is valid |
201 | ExtensionUploadResponseDto | Success. The extension 2.0 has been uploaded. |
400 | ErrorEnvelope | Failed. The input file is invalid. |
409 | ErrorEnvelope | Upload not possible yet, please try again in a few seconds. |
Response body objects
The ExtensionUploadResponseDto
object
Element | Type | Description |
---|---|---|
assetsInfo | AssetInfo[] | Information about extension assets included |
author | AuthorDto | 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 |
The AssetInfo
object
Assets types and its count
Element | Type | Description |
---|---|---|
assetType | string | - |
count | integer | - |
The AuthorDto
object
Extension author
Element | Type | Description |
---|---|---|
name | string | Author name |
The FeatureSetDetails
object
Additional information about a Feature Set
Element | Type | Description |
---|---|---|
metrics | MetricDto[] | Feature set metrics |
The MetricDto
object
Metric gathered by an extension
Element | Type | Description |
---|---|---|
key | string | Metric key |
metadata | MetricMetadataDto | Metric metadata |
The MetricMetadataDto
object
Metric 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 |
Response body JSON model
1{2 "assetsInfo": [3 {4 "assetType": "string",5 "count": 16 }7 ],8 "author": {9 "name": "string"10 },11 "dataSources": [12 "string"13 ],14 "extensionName": "string",15 "featureSets": [16 "string"17 ],18 "featureSetsDetails": {},19 "fileHash": "string",20 "minDynatraceVersion": "string",21 "minEECVersion": "string",22 "variables": [23 "string"24 ],25 "version": "1.2.3"26}