PingOne Platform APIs

Snapshots

A snapshot is a point in time representation of any configuration resource in PingOne. A snapshot is triggered when the request POST {{apiPath}}/v1/environments/{{envID}}/snapshots is called. The configuration resource, and all of its dependencies, are then stored by the Snapshot service.

The snapshots are stored and indexed using the original identifier (ID) of the configuration resource. For example, an applications snapshot will be stored using the ID of the application.

Subsequent calls to the request POST {{apiPath}}/v1/environments/{{envID}}/snapshots for the same configuration resource generates a new version of the configuration resource each time the request is called. You can retrieve the version history of any configuration resource using the original identifier of the resource. The snapshot created for a configuration resource is used to promote (apply) the configuration resource from the source environment to another environment.

When you create a new promotion, the snapshot contains source and target environments with all their dependencies, all resources for each environment. To get the snapshot with all dependencies for the environment, you need to read the snapshot embedded in the promotion. For this, you’ll use GET {{apiPath}}/v1/environments/{{envID}}/snapshots/{{configResourceID}}/embeddedSnapshots or GET {{apiPath}}/v1/environments/{{envID}}/snapshots/{{configResourceID}}/versions/{{snapshotID}}/embeddedSnapshots.

However, when you read a snapshot without using embeddedSnapshots, you’ll get a snapshot of the environments without all of the dependencies. For example, using GET {{apiPath}}/v1/environments/{{envID}}/snapshots/{{configResourceID}} doesn’t include all of the source and target environment dependencies.

You need to create a snapshot if you want to assign promotion variables.

Snapshots data model

Property Type Required Mutable Description

baseResourceURL

String

Required

Mutable

The URL of the resource to use. The form is: "https://api.pingone.com/v1/environments/{{envId}}/{{resourceName}}/{{resourceId}}", where "resourceName" is the name of the configuration resource to snapshot.

createdAt

Date

N/A

Read-only

The date and time at which the resource was created (ISO 8601 format).

completedAt

Date

N/A

Read-only

The date and time at which the snapshot creation was completed (ISO 8601 format).

configuration

Object

N/A

Read-only

The JSON representation of the configuration resource. Any attributes containing sensitive information in plain text (such as, display names, client secrets, passwords) are masked in the responses, and aren’t available to any caller, even administrators. If the configuration resource has been deleted, this will be empty (null).

errorCode

String

N/A

Read-only

If an error occurs while creating the snapshot, it’s returned here.

id

String

N/A

Read-only

The identifier of the configuration.

resource.id

String

Optional

Mutable

The identifier of the configuration resource used for the snapshot.

resourceUrl

String

Optional

Mutable

The URL of the configuration resource.

referencedResources

String[]

Optional

Mutable

The list of identifiers for any dependent or referenced configuration resources. The dependent or referenced resources can be only one level down in the possible tree of such resources.

snapshotId

String

N/A

Read-only

The identifier of the snapshot.

startedAt

Date

N/A

Read-only

The date and time at which the snapshot creation was started (ISO 8601 format).

status

String

N/A

Read-only

The status of the snapshot creation process. This can be any one of: COMPLETE, WAITING, IN_PROGRESS, ERROR.

updatedAt

Date

N/A

Read-only

The date and time at which the resource was last updated (ISO 8601 format).

versionedAt

Date

N/A

Read-only

The date and time of the updatedAt property on the original resource. For deleted events, this will be the date and time the event was published.

Snapshots errors

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

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

400

INVALID_REQUEST

INVALID_PARAMETER

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

When and details

When: A snapshot request references an environment, resource, or snapshot ID that cannot be parsed as a UUID

Details: A query string parameter or value is not valid for this request. with target snapshot

400

INVALID_REQUEST

INVALID_VALUE

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

When and details

When: A POST /snapshots or Read All Versions request supplies an expand query parameter with a value other than all, or a snapshot import request supplies a resourceUrl from which no resource type can be extracted

Details: Invalid query string parameter value provided for expand: <value> with target expand, or Invalid resourceURL provided: <url> with target resourceUrl

400

INVALID_REQUEST

REQUEST_FAILED

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

When and details

When: A GET Read All Variable Resources request supplies a resourceFilter value the resource does not support, or a mode value that is not valid

Details: Describes the failing parameter with target resourceFilter or mode.

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 in its datastore

Details: Describes the datastore failure 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: A POST /snapshots request could not generate the snapshot for the resource URL, or a snapshot import request could not import the snapshot

Details: <resourceUrl> snapshot was NOT successfully created. or <resourceUrl> was NOT successfully imported. with target baseResourceUrl

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:snapshot permission (GET operations), the promotion:create:snapshot permission (snapshot generation or import), or the promotion:read:decryptedSnapshot permission (decrypted snapshot reads), or the snapshot import feature is not enabled for the environment

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 snapshot or dependent snapshot referenced by the request does not exist, or a Read All Versions request finds no snapshots for the resource

Details: Failed to retrieve snapshot for resourceId: '<resourceId>' and snapshotId: '<snapshotId>' or Failed to retrieve snapshots for resourceId: '<resourceId>'. No snapshots were found. with target snapshot. A dependent-snapshot failure returns the service’s message for the missing dependency.