ActiveGates API - POST an auto-update job
Creates a new auto-update job on the specified ActiveGate.
The job updates the ActiveGate to the specified version. You can fetch the list of available versions with the GET available versions of ActiveGate call.
The request consumes and produces an application/json
payload.
This request is an Early Adopter release and may be changed in non-compatible way.
POST |
|
Authentication
To execute this request, you need the Write ActiveGates (activeGates.write
) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
agId | string |
The ID of the required ActiveGate. |
path | required |
body | UpdateJob |
JSON body of the request, containing update-job parameters. |
body | optional |
Body format
The UpdateJob object
Configuration of the ActiveGate update job.
Element | Type | Description | Required |
---|---|---|---|
jobId | string |
The ID of the update job. |
optional |
jobState | string |
The status of the update job. |
optional |
updateMethod | string |
The method of updating the ActiveGate or its component. |
optional |
updateType | string |
The component to be updated. |
optional |
cancelable | boolean |
The job can ( |
optional |
startVersion | string |
The initial version of the ActiveGate. |
optional |
targetVersion | string |
The target version of the update. Specify the version in the To update to the latest available version, use the |
required |
timestamp | integer |
The timestamp of the update job completion. The |
optional |
agType | string |
The type of the ActiveGate. |
optional |
environments | string[] |
A list of environments (specified by IDs) the ActiveGate can connect to. |
optional |
error | string |
The information about update error. |
optional |
duration | integer |
The duration of the update, in milliseconds. |
optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request. See the Example expandable section for working sample request.
{
"jobId": "-3524498778810258605",
"jobState": "SUCCEED",
"updateMethod": "AUTOMATIC",
"updateType": "ACTIVE_GATE",
"cancelable": true,
"startVersion": "1.185.0.20200201-120000",
"targetVersion": "1.190.0.20200301-130000",
"timestamp": 1582031917814,
"agType": "ENVIRONMENT",
"environments": [
"string"
],
"error": "string",
"duration": 3608000
}
Response
Response codes
Code | Description |
---|---|
201 | Success. The update-job have been created. |
400 | Failed. The input is invalid. |
Response body
The UpdateJob object
Configuration of the ActiveGate update job.
Element | Type | Description |
---|---|---|
jobId | string | The ID of the update job. |
jobState | string | The status of the update job. |
updateMethod | string | The method of updating the ActiveGate or its component. |
updateType | string | The component to be updated. |
cancelable | boolean | The job can ( |
startVersion | string | The initial version of the ActiveGate. |
targetVersion | string | The target version of the update. Specify the version in the To update to the latest available version, use the |
timestamp | integer | The timestamp of the update job completion. The |
agType | string | The type of the ActiveGate. |
environments | string[] | A list of environments (specified by IDs) the ActiveGate can connect to. |
error | string | The information about update error. |
duration | integer | The duration of the update, in milliseconds. |
{
"jobId": "-3524498778810258605",
"jobState": "SUCCEED",
"updateMethod": "AUTOMATIC",
"updateType": "ACTIVE_GATE",
"cancelable": true,
"startVersion": "1.185.0.20200201-120000",
"targetVersion": "1.190.0.20200301-130000",
"timestamp": 1582031917814,
"agType": "ENVIRONMENT",
"environments": [
"string"
],
"error": "string",
"duration": 3608000
}
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.
This request is an Early Adopter release and may be changed in non-compatible way.
POST |
|
Authentication
To execute this request, you need the Write ActiveGates (activeGates.write
) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.
Response
Response codes
Code | Description |
---|---|
204 | Validated. The submitted update-job is valid. Response doesn't have a body. |
400 | Failed. The input is invalid. |
Response body
A successful request doesn't return any content.
Example
In this example, the request creates an update job to update the ActiveGate with the ID of 1812885988 to the 1.198.0.20200630-163221 version.
The API token is passed in the Authorization header.
Curl
curl -L -X POST 'https://mySampleEnv.live.dynatrace.com/api/v2/activeGates/1812885988/updateJobs' \
-H 'Authorization: Api-Token abcdefjhij1234567890' \
-H 'Content-Type: application/json' \
--data-raw '{
"targetVersion": "1.198.0.20200630-163221"
}'
Request URL
https://mySampleEnv.live.dynatrace.com/api/v2/activeGates/1812885988/updateJobs
Request body
{
"targetVersion": "1.198.0.20200630-163221"
}
Response body
{
"jobId": "-7240069678607892845",
"jobState": "PENDING",
"updateMethod": null,
"updateType": null,
"cancelable": true,
"startVersion": "1.195.5.20200522-174041",
"targetVersion": "1.198.0.20200630-163221",
"timestamp": null,
"agType": "ENVIRONMENT",
"environments": [
"mySampleEnv"
],
"error": null,
"duration": null
}
Response code
201