PingOne Platform APIs

Promotions

A promotion includes, at a minimum, source and target environment references, automatically generated source and target snapshots, the resource or resources to promote to the target environment, and a promotion plan for the promotion operation. You need to have the Environment Admin role for both the source and target environments. You can optionally include a specific source environment snapshot to use, as well as a mapping of the source environment configuration resource or resources to the target environment configuration resource or resources.

Currently, you can promote configurations only to environments within the same PingOne tenant.

A PingOne admin having Environment Admin permissions can review the promotion plan, and update the promotion mapping and variable definitions or declarations as needed. The promotion plan is then regenerated based on the updates. Use the Read One Promotion or Read All Promotions to view the promotion plan.

If you do not set any promotion variables, the configuration resource or resources that you specify for the source or target environment will be used as is, and cannot be changed during the promotion operation. Refer to Promotion Variables for more information.

When you choose to start the promotion operation, the promotion plan supplies the promotion operation instructions to the Promotions service. The Promotions service then:

  • Filters out any configuration resources that haven’t changed, and calls the required target environment API using the new or altered resources.

  • Sets the promotion’s startedAt and status values.

  • Collects any errors into a JSON array, and returns the errors.

  • Updates the promotion’s completedAt and status values when the promotion operation is complete.

Promotions data model

Property Type Required Mutable Description

createdAt

Date

N/A

Read-only

The date and time the promotion was created.

completedAt

Date

N/A

Read-only

The date and time the promotion operation completed.

description

String

Optional

Mutable

A description of the promotion to be performed.

excludedResources

Object[]*

Optional

Mutable

An array of JSON objects. *Optionally, this can be an array of strings. Contains the resource identifiers, and resource URLs for the configuration resources to be excluded from promotion.

nextPromotion

Object

Optional

Read-only

Contains the identifier of the next promotion, if any.

previousPromotion

Object

Optional

Read-only

Contains the identifier of the previous promotion, if any.

promotionErrors

Object[]

N/A

Read-only

An array of JSON objects correlating the configuration resource identifier in the source environment to the error messages from the target environment.

promotionPlan

Object[]

N/A

Read-only

An array of JSON objects containing the promotion plan generated. The promotion plan is generated by the POST operation, but is returned only by either of the Read Promotion operations. For a DELETE operation, the payload property in the response will be empty.

promotionPlan.deleteStepsDependencies

Object[]

Optional

Mutable

An array of JSON objects containing the dependencies for the delete steps in the promotion plan.

promotionPlan.steps

Object[]

N/A

Read-only

An array of JSON objects identifying the resource or resources, the configuration of the resource or resources, and the target environment or environments.

promotionPlan.promotedSourceResourceIds

Object[]

N/A

Read-only

An array of JSON objects containing the identifiers of the source resources that have been promoted.

promotionPlan.promotedTargetResourceIds

Object[]

N/A

Read-only

An array of JSON objects containing the identifiers of the target resources that have been promoted.

promotionSteps

Object[]

N/A

Read-only

An array of JSON objects identifying the number of steps, their origin, and execution status.

promotionSteps.action

Object

N/A

Read-only

Contains the action associated with each promotion step (POST, PUT, DELETE).

promotionSteps.executionStatus

Object

N/A

Read-only

Contains the execution status for each promotion step.

promotionSteps.payload

Object

N/A

Read-only

Contains the source resource name and ID for each promotion step.

promotionSteps.resourceUrl

Object

N/A

Read-only

Contains the resource URL for each promotion step.

promotionSteps.sourceResource

Object

N/A

Read-only

Contains the source resource name and ID for each promotion step.

promotionSteps.sourceResource.name

String

N/A

Read-only

Contains the source resource name for the promotion step.

promotionSteps.sourceResource.id

String

N/A

Read-only

Contains the source resource ID for the promotion step.

promotionSteps.totalDistance

Object

N/A

Read-only

Contains the source resource name and ID for each promotion step.

number, origin (SELECTED_RESOURCE, EVALUATED_AS_REQUIRED, EVALUATED_AS_OPTIONAL, UNEVALUATED) and executionStatus (READY, IN_PROGRESS, COMPLETED, ERROR).

action can also be DELETE (docs show only POST/PUT).

resourceMapping

Map

Optional

Mutable

A mapping of the configuration resource identifiers in the source environment to the configuration resource identifiers in the target environment.

selectedResources

Object[]*

Optional

Mutable

An array of JSON objects. *Optionally, this can be an array of strings. Contains the resource identifiers, and resource URLs for the configuration resources selected for promotion. If this is omitted, the entire current environment is used (the environment ID is injected.)

sourceEnvironment

Object

Optional

Mutable

Contains the identifier of the source environment.

sourceEnvironment.id

String

Required/Optional

Mutable

The identifier of the source environment.

sourceSnapshot

Object

Optional

Mutable

Contains the identifier of the snapshot to use as the promotion source.

sourceSnapshot.id

String

Required/Optional

Mutable

The identifier of the snapshot to use as the promotion source. If not specified, the Configuration Management service automatically generates a snapshot of the source environment at the time of the POST request, and uses that snapshot as the promotion source.

startedAt

Date

N/A

Read-only

The date and time the promotion operation started.

status

String

N/A

Read-only

An enumeration indicating the status of the promotion. This can be: NEW, PREPARING, ADDITIONAL_SNAPSHOTS_REQUESTED, READY, IN_PROGRESS, VALIDATION_FAILED, COMPLETED, ERROR, ROLLED_BACK, ROLLBACK_NEW, ROLLBACK_PREPARING.

targetEnvironment

Object

Required

Immutable

A JSON object containing the identifier of the target environment.

targetEnvironment.id

String

Required

Immutable

The identifier of the target environment.

targetSnapshot

Object

N/A

Read-only

A JSON object containing the identifier of the target snapshot.

targetSnapshot.id

String

Required

Immutable

The identifier of the target snapshot.

variables

String

Optional

Mutable

The variables associated with the promotion.

Rolling back a promotion

You can roll back promotions as needed (whether they failed or were successful), restoring the environment to its prior state.

A rollback cannot be undone, so be sure to review the limitations and considerations before you use it.

Limitations and considerations

  • You can roll back only the most recent promotion to the target environment. You can’t select a subset of resources to roll back, nor can you roll back a completed rollback.

  • A promotion can sometimes affect resources that weren’t part of the promotion plan. For example, if you promote the deletion of a policy that was assigned to an application, the promotion also deletes the association between the application and the policy in the target environment. To restore the target environment to its previous state, a rollback must not only restore the deleted policy, but also restore the association between the policy and the application. In this case, the application is considered an indirectly affected resource, and is included in the rollback.

  • If you update promoted resources in the target environment after the initial promotion and before the rollback, those changes can be overwritten by the rollback.

Promotions errors

In addition to the general error codes, promotion operations can return the following errors:

HTTP status Top‑level code Detail code When it happens and what the response contains

400

INVALID_REQUEST

None

Message: The request could not be completed. The request was malformed or invalid.

When and details

When: A POST Create Promotion request would put the environment over its maximum number of promotions, a PATCH Update Promotion request targets a promotion that is not in the READY or VALIDATION_FAILED state, a POST /{promotionId} Execute Promotion request targets a promotion that is not in the READY or VALIDATION_FAILED state, or a POST /{promotionId} Rollback Promotion request targets a promotion that is not in the COMPLETED or ERROR state

Details: For the promotions limit, Environment has reached the maximum number of promotions (<maximum>). Please delete a previous promotion and then try again. with target promotion. For the state conflicts, Can’t update promotion in status '<status>', Can’t execute promotion in status '<status>', or Can’t rollback promotion in status='<status>' with target promotion.

400

INVALID_REQUEST

INVALID_VALUE

Message: The request could not be completed. The request was malformed or invalid.

When and details

When: A GET Read One Promotion, Read Promotion Plan Steps, or Read Promotion Status request supplies an expand query parameter with a value other than resourceGraph

Details: Invalid query string parameter value provided for expand: <value> with target expand

400

REQUEST_FAILED

None

Message: The request could not be completed. There was an issue processing the request.

When and details

When: The Promotions service could not read or write the promotion in its datastore, or a POST Create Promotion request failed because the call to the Snapshots service failed

Details: Describes the failing operation; the datastore error message from the service is returned.

401

ACCESS_FAILED

None

Message: The request could not be completed. You do not have access to this resource.

When and details

When: The access token is missing, invalid, or expired

Details: None.

403

ACCESS_FAILED

INSUFFICIENT_PERMISSIONS

Message: You do not have permissions or are not licensed to make this request.

When and details

When: The actor lacks the promotion:read:promotion permission (GET operations), the promotion:create:promotion permission (POST Create Promotion or Rollback Promotion), the promotion:execute:promotion permission (Execute Promotion), the promotion:update:promotion permission (PATCH), or the promotion:delete:promotion permission (DELETE)

Details: You do not have permission to access this resource. with target targetEnvironment

403

ACCESS_FAILED

LICENSE_EXCEEDED

Message: The request exceeded your license limit.

When and details

When: The environment referenced by the request is disabled, or the Configuration Management capability is not enabled for the environment

Details: Environment is disabled: <environmentId> or Configuration management is not enabled for environment: <environmentId> with no target

404

NOT_FOUND

None

Message: The request could not be completed. The requested resource was not found.

When and details

When: The promotion ID in the request URL does not identify a promotion in the environment

Details: Failed to retrieve promotion with id: '<promotionId>' with target promotion

500

UNEXPECTED_ERROR

None

Message: There was an unexpected error with the service. Please try again later.

When and details

When: A DELETE Delete Promotion request failed because the service datastore was temporarily unavailable

Details: None.