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.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/v2/activeGates/{agId}/updateJobs
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v2/activeGates/{agId}/updateJobs

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 Required
targetVersion string The target version of the update.

Specify the version in the <major>.<minor>.<revision>.<timestamp> format.

To update to the latest available version, use the latest value.
required

Response format

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.

The jobState element can hold these values.
updateMethod string

The method of updating the ActiveGate or its component.

The updateMethod element can hold these values.
updateType string

The component to be updated.

The updateType element can hold these values.
cancelable boolean

The job can (true) or can't (false) be cancelled at the moment.

startVersion string

The initial version of the ActiveGate.

targetVersion string

The target version of the update.

Specify the version in the <major>.<minor>.<revision>.<timestamp> format.

To update to the latest available version, use the latest value.

timestamp integer

The timestamp of the update job completion.

The null value means the job is still running.

agType string

The type of the ActiveGate.

The agType element can hold these values.
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.

Possible values

Possible values for the agType element in the UpdateJob object:

  • CLUSTER
  • ENVIRONMENT
  • ENVIRONMENT_MULTI

Possible values for the updateType element in the UpdateJob object:

  • ACTIVE_GATE
  • REMOTE_PLUGIN_AGENT
  • SYNTHETIC
  • Z_REMOTE

Possible values for the updateMethod element in the UpdateJob object:

  • AUTOMATIC
  • MANUAL_INSTALLATION
  • ON_DEMAND

Possible values for the jobState element in the UpdateJob object:

  • FAILED
  • IN_PROGRESS
  • PENDING
  • ROLLBACK
  • SKIPPED
  • SUCCEED

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.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/v2/activeGates/{agId}/updateJobs/validator
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v2/activeGates/{agId}/updateJobs/validator

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 codes

Code Description
204 Validated. The submitted update-job is valid. Response doesn't have a body.
400 Failed. The input is invalid.

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