PingOne Platform APIs

Promotion variables

Use promotion variables to account for environment-specific differences, such as third-party integrations or URLs. You can specify configuration resource property values for either the source or target environment. The source environment property values will be substituted for the target environment property values by the promotion.

A promotion changes only the corresponding target environment property values with the promotion variables you set for the source environment. 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.

Not all properties for configuration resources can be used as promotion variables. Refer to Variable Resources for the listing of supported configuration resources and properties.

To use promotion variables, you need to:

  1. Specify the configuration resource to be promoted in a snapshot.

  2. Define the variable or variables to be used for a source or target environment configuration resource property. Refer to Variable Definitions.

  3. Declare the variables to be used by the promotion operation. Refer to Variable Declarations.

A few things to be aware of:

  • The variables are scoped only to the specified configuration resources, and are not applied to any dependent resources.

  • Variables are not versioned with a snapshot, so for each promotion operation, you need to ensure the variable settings for a configuration resource are correct.

  • Any configuration resources that you change directly without updating the variables will be overwritten by a subsequent promotion operation. This is because the promotion operation will use the existing variable set.

Promotion variables errors

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

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

400

INVALID_DATA

INVALID_DATA

Message: The request could not be completed. One or more validation errors were in the request.

When and details

When: The service could not read or write the promotion variable definition or declaration in its datastore

Details: Describes the datastore failure with target variableDefinition or variableDeclaration.

400

INVALID_DATA

CONSTRAINT_VIOLATION

Message: The request could not be completed. One or more validation errors were in the request.

When and details

When: A create, update, or delete promotion variable declaration request omits the resource relationship or supplies a blank or null resource ID, or a create or update request supplies a variables map that is empty or whose values are not ${promotionVariable:<name>} references to valid variable definition names

Details: Resource ID cannot be empty, null, or missing. with target variableDeclaration, or the failing variable rule with target variables, such as Variable Declaration cannot have empty or missing variables. or a message stating that variable names must not contain special characters ( \ # ? & = % : @ / < > | ^ ~ { } [ ] ' " ` ) or spaces, and must be 255 characters or fewer.

400

INVALID_DATA

INVALID_VALUE

Message: The request could not be completed. One or more validation errors were in the request.

When and details

When: A POST or PUT promotion variable definition request supplies a name that is not 1-255 ASCII characters, or a value that is not a valid value for the definition

Details: Describes the failing property with target variableDefinition.

400

INVALID_DATA

UNIQUENESS_VIOLATION

Message: The request could not be completed. One or more validation errors were in the request.

When and details

When: A POST or PUT promotion variable definition request specifies a name that already exists in the environment, or a POST promotion variable declaration request declares a resource that is already declared

Details: Variable definition '<name>' already exists in environment '<environmentId>' with target variableDefinition, or Variable Declaration with Resource Id: '<resourceId>' already exists in Environment: '<environmentId>' with target variableDeclaration

400

REQUEST_FAILED

None

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

When and details

When: The service could not read or write the promotion variable declaration in its datastore

Details: Describes the failing operation with target variableDeclaration.

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:promotionVariable permission (GET operations), the promotion:create:promotionVariable permission (POST), the promotion:update:promotionVariable permission (PUT or PATCH), or the promotion:delete:promotionVariable permission (DELETE)

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

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 variable definition name or the declaration resource ID in the request URL does not exist in the environment

Details: Failed to retrieve variable definition with name '<name>' for environment '<environmentId>' with target variableDefinition, or Unable to find Variable Declaration with Environment Id: '<environmentId>' and Resource Id: '<resourceId>' with target variableDeclaration