Snapshot Execution (Pipeline Stage Execution) data can be retrieved using this REST service. This service provides the current status of a snapshot and information about its progress through the pipeline.
Authentication - Use Basic Authentication for this API.
GET
This GET service will return the JSON representation of a snapshot execution given a snapshot Id.
In the case of replays, only the latest execution will be returned.
API URL
http://host:port/flexdeploy/rest/v1/releases/{releaseId}/snapshot/{snapshotId}/execution
Request
Parameter | Type | Required | Description |
---|---|---|---|
snapshotId | URL | Yes | Path parameter for the snapshot Id which is used to return a snapshot |
releaseId | URL | Yes | Path parameter for the release Id which contains the snapshot that will be returned |
gateName | Query | No | If given, environmentExecutions will only be returned if gateName is present in one of them. All environmentExecutions that have been run will be returned. This will indicate that a gate matching that name was already passed, or is currently waiting for a schedule or approval. |
stepName | Query | No | If given, environmentExecutions will only be returned if stepName is present in one of them. All environmentExecutions that have been run will be returned. This will indicate that a step matching that name was already passed, or is currently running. |
environmentId | Query | No | If given, environmentExecutions will be filtered to only this environment. This filter is done before filtering for gate and step names. If a gate or step name is passed in with this parameter, that gate or step must be present in this stage or the environmentExecutions array will always come back containing 0 elements. |
Response
Snapshot Execution JSON objects can having the following attributes:
Attribute | Type | Description |
---|---|---|
snapshotId | Long | The id of the snapshot |
snapshotName | String | The name of the snapshot, which is generated based on the time of creation |
snapshotStatus | String | The status of the snapshot. Possible values are:
|
description | String | The description of the snapshot |
snapshotVersions | List<SnapshotVersionPojo> | The version information about the projects/packages contained within this snapshot |
Elements of snapshotVersions has following attributes:
Attribute | Type | Description |
---|---|---|
projectId | Long | The id of the project |
projectStreamId | Long | The id of the Stream which the project/package was built from |
projectVersionId | Long | The version id of the project |
packageName | String | The name of the package (partial deployment projects only) |
requestAllFiles | Boolean | Whether or not the project includes all files (partial deployment projects only) |
snapshotVersionStatus | String | The current status of the individual project version within the snapshot. Possible values are:
|
Response Codes
HTTP Code | Description |
---|---|
200 | Snapshot Execution was found and returned |
400 | Bad request (Snapshot wasn't in given releaseId) |
401 | Unauthorized (User may not be signed in or user may not have read access to this release) |
500 | Unexpected internal server error |
Example
If a snapshot in our database had an id of 10005 and releaseId of 14321 and a GET request was sent to http://host:port/flexdeploy/rest/v1/releases/14321/snapshot/10005
A Snapshot Execution JSON object will be returned with snapshot execution information: