Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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

ParameterTypeRequiredDescription
snapshotIdURLYesPath parameter for the snapshot Id which is used to return a snapshot
releaseIdURLYesPath parameter for the release Id which contains the snapshot that will be returned
gateNameQueryNo

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.

stepNameQueryNo

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.

environmentIdQueryNo

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:

AttributeTypeDescription

snapshotId

LongThe id of the snapshot
snapshotNameStringThe name of the snapshot, which is generated based on the time of creation
snapshotStatusString

The status of the snapshot. Possible values are:

  • COMPLETED - The snapshot was successfully assembled, but has not yet been sent to pipeline for execution.
  • FAILED - The snapshot failed to be assembled (which could mean the underlying build failed).
  • FAILED TO INITIATE - The snapshot was assembled, but failed to be sent to the pipeline for execution.
  • INITIATED - The snapshot has been sent to the pipeline for execution.
  • PENDING - The snapshot is in the process of being assembled and sent to the pipeline for execution.
descriptionStringThe description of the snapshot
snapshotVersionsList<SnapshotVersionPojo>The version information about the projects/packages contained within this snapshot

Elements of snapshotVersions has following attributes:

AttributeTypeDescription
projectIdLongThe id of the project
projectStreamIdLongThe id of the Stream which the project/package was built from
projectVersionIdLongThe version id of the project
packageNameStringThe name of the package (partial deployment projects only)
requestAllFilesBooleanWhether or not the project includes all files (partial deployment projects only)
snapshotVersionStatusString

The current status of the individual project version within the snapshot. Possible values are:

  • PENDING - The project is has not yet been built for the snapshot. 
  • SUBMITTED - The project is currently being built for the snapshot.
  • COMPLETED - The project has been built successfully for the snapshot.
  • FAILED - The project has failed to build.
  • EXISTING - The snapshot is utilizing an already built version of the project.

Response Codes

HTTP CodeDescription
200Snapshot Execution was found and returned
400Bad request (Snapshot wasn't in given releaseId)
401Unauthorized (User may not be signed in or user may not have read access to this release)
500Unexpected 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:

{
"pipelineExecutionId": 10404,
"snapshotId": 10401,
"pipelineExecutionStatus": "RUNNING",
"pipelineEnvironmentStatuses": [
  {
"environmentId": 11701,
"environmentCode": "E",
"stageExecutionStatus": "SUCCESSFUL",
"environmentName": "e",
"currentGateName": null,
"currentStepName": null,
"stageExecutionId": 10405,
"stepExecutions": [
  {
"stepName": "asdfasdf",
"stepType": "STAGE_DEPLOY_ALL_STEP",
"stepStatus": "SUCCESSFUL",
"stepDescription": null,
"waitDuration": null,
"roleName": null,
"cronExpression": null,
"wait_till_date": null,
"stepOrder": 1
}
],
"environmentSortOrder": 1,
"gateExecutions": [
  {
"gateName": "asdf",
"gateType": "STAGE_EXT_APPROVAL_GATE",
"gateStatus": "SUCCESSFUL",
"gateDescription": null,
"cronExpression": null,
"roleName": null,
"gateOrder": 1
},
  {
"gateName": "qwewerq",
"gateType": "STAGE_SCHEDULED_GATE",
"gateStatus": "SUCCESSFUL",
"gateDescription": "qwerqwerqwerqwerqwer",
"cronExpression": "* * 12 * * ?",
"roleName": "asdfasdfasdf",
"gateOrder": 2
},
  {
"gateName": "arraswer",
"gateType": "STAGE_APPROVAL_GATE",
"gateStatus": "SUCCESSFUL",
"gateDescription": "asdferasdf",
"cronExpression": null,
"roleName": null,
"gateOrder": 3
}
],
},
  {
"environmentId": 11112,
"environmentCode": "D",
"stageExecutionStatus": "SUCCESSFUL",
"environmentName": "d",
"currentGateName": null,
"currentStepName": null,
"stageExecutionId": 10411,
"stepExecutions": [
  {
"stepName": "s",
"stepType": "STAGE_DEPLOY_ALL_STEP",
"stepStatus": "SUCCESSFUL",
"stepDescription": null,
"waitDuration": null,
"roleName": null,
"cronExpression": null,
"wait_till_date": null,
"stepOrder": 1
},
  {
"stepName": "d22",
"stepType": "STAGE_DEPLOY_ALL_STEP",
"stepStatus": "SUCCESSFUL",
"stepDescription": null,
"waitDuration": null,
"roleName": null,
"cronExpression": null,
"wait_till_date": null,
"stepOrder": 2
},
  {
"stepName": "ggg",
"stepType": "STAGE_GROUP_STEP",
"stepStatus": "SUCCESSFUL",
"stepDescription": null,
"waitDuration": null,
"roleName": null,
"cronExpression": null,
"wait_till_date": null,
"stepOrder": 2
},
  {
"stepName": "d2",
"stepType": "STAGE_DEPLOY_ALL_STEP",
"stepStatus": "SUCCESSFUL",
"stepDescription": null,
"waitDuration": null,
"roleName": null,
"cronExpression": null,
"wait_till_date": null,
"stepOrder": 2.1
},
  {
"stepName": "test1",
"stepType": "STAGE_TEST_ALL_STEP",
"stepStatus": "SUCCESSFUL",
"stepDescription": null,
"waitDuration": null,
"roleName": null,
"cronExpression": null,
"wait_till_date": null,
"stepOrder": 3
}
],
"environmentSortOrder": 2,
"gateExecutions": [],
},
  {
"environmentId": 11703,
"environmentCode": "G",
"stageExecutionStatus": "RUNNING_STEPS",
"environmentName": "g",
"currentGateName": null,
"currentStepName": null,
"stageExecutionId": 10420,
"stepExecutions": [
  {
"stepName": "44321",
"stepType": "STAGE_WAIT_STEP",
"stepStatus": "SCHEDULED",
"stepDescription": null,
"waitDuration": null,
"roleName": null,
"cronExpression": null,
"wait_till_date": 1550699280000,
"stepOrder": 1
},
  {
"stepName": "1234",
"stepType": "STAGE_WAIT_STEP",
"stepStatus": "SCHEDULED",
"stepDescription": null,
"waitDuration": 1234,
"roleName": null,
"cronExpression": null,
"wait_till_date": null,
"stepOrder": 1
}
],
"environmentSortOrder": 3,
"gateExecutions": [
  {
"gateName": "test",
"gateType": "STAGE_TEST_GATE",
"gateStatus": "SUCCESSFUL",
"gateDescription": null,
"cronExpression": null,
"roleName": "asdfasdftest",
"gateOrder": 1
}
],
}
],
}

  • No labels