Menu
AWS CodePipeline
API Reference (API Version 2015-07-09)

GetPipelineState

Returns information about the state of a pipeline, including the stages and actions.

Request Syntax

{
   "name": "string"
}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

name

The name of the pipeline about which you want to get information.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: [A-Za-z0-9.@\-_]+

Required: Yes

Response Syntax

{
   "created": number,
   "pipelineName": "string",
   "pipelineVersion": number,
   "stageStates": [ 
      { 
         "actionStates": [ 
            { 
               "actionName": "string",
               "currentRevision": { 
                  "created": number,
                  "revisionChangeId": "string",
                  "revisionId": "string"
               },
               "entityUrl": "string",
               "latestExecution": { 
                  "errorDetails": { 
                     "code": "string",
                     "message": "string"
                  },
                  "externalExecutionId": "string",
                  "externalExecutionUrl": "string",
                  "lastStatusChange": number,
                  "lastUpdatedBy": "string",
                  "percentComplete": number,
                  "status": "string",
                  "summary": "string",
                  "token": "string"
               },
               "revisionUrl": "string"
            }
         ],
         "inboundTransitionState": { 
            "disabledReason": "string",
            "enabled": boolean,
            "lastChangedAt": number,
            "lastChangedBy": "string"
         },
         "latestExecution": { 
            "pipelineExecutionId": "string",
            "status": "string"
         },
         "stageName": "string"
      }
   ],
   "updated": number
}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

created

The date and time the pipeline was created, in timestamp format.

Type: Timestamp

pipelineName

The name of the pipeline for which you want to get the state.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: [A-Za-z0-9.@\-_]+

pipelineVersion

The version number of the pipeline.

Note

A newly-created pipeline is always assigned a version number of 1.

Type: Integer

Valid Range: Minimum value of 1.

stageStates

A list of the pipeline stage output information, including stage name, state, most recent run details, whether the stage is disabled, and other data.

Type: Array of StageState objects

updated

The date and time the pipeline was last updated, in timestamp format.

Type: Timestamp

Errors

For information about the errors that are common to all actions, see Common Errors.

PipelineNotFoundException

The specified pipeline was specified in an invalid format or cannot be found.

HTTP Status Code: 400

ValidationException

The validation was specified in an invalid format.

HTTP Status Code: 400

Example

Sample Request

POST / HTTP/1.1
Host: codepipeline.us-east-1.amazonaws.com
Accept-Encoding: identity
Content-Length: 27
X-Amz-Target: CodePipeline_20150709.GetPipelineState
X-Amz-Date: 20160707T172005Z
User-Agent: aws-cli/1.7.38 Python/2.7.9 Windows/7
Content-Type: application/x-amz-json-1.1
Authorization: AWS4-HMAC-SHA256 Credential=AKIAI44QH8DHBEXAMPLE/20160707/us-east-1/codepipeline/aws4_request, SignedHeaders=content-type;host;user-agent;x-amz-date;x-amz-target, Signature=8d9b5998EXAMPLE

{
  "name": "MyFirstPipeline"
}

Sample Response

HTTP/1.1 200 OK
x-amzn-RequestId: 620484b7-88cb-11e5-b497-75c49EXAMPLE
Content-Type: application/x-amz-json-1.1
Content-Length: 827

{
    "created": 1446137312.204,
    "pipelineName": "MyFirstPipeline",
    "pipelineVersion": 1,
    "stageStates": [
        {
            "actionStates": [
                {
                    "actionName": "Source",
                    "currentRevision": {
                        "created": 1446726163.571,
                        "revisionId": "HYGp7zmwbCPPwo234xsCEM7d6ToeAqIl"
                    },
                    "entityUrl": "https://console.aws.amazon.com/s3/home?#",
                    "latestExecution": {
                        "lastStatusChange": 1446137358.328,
                        "status": "Succeeded"
                    }
                }
            ],
            "stageName": "Source"
        },
        {
            "actionStates": [
                {
                    "actionName": "CodePipelineDemoFleet",
                    "currentRevision": {
                        "created": 1466726263.189,
                        "revisionId": "{\"bucket\":\"codepipeline-us-east-1-2770EXAMPLE\",\"key\":\"MyFirstPipeline/MyApp/QI8RTZY.zip\",\"bundleType\":\"zip\",\"version\":null,\"etag\":\"f51889bff5402b0249676e48cEXAMPLE\"}"
                    },
                    "entityUrl": "https://console.aws.amazon.com/codedeploy/home?#/applications/CodePipelineDemoApplication/deployment-groups/CodePipelineDemoFleet",
                    "latestExecution": {
                        "externalExecutionId": "d-EXAMPLE",
                        "externalExecutionUrl": "https://console.aws.amazon.com/codedeploy/home?#/deployments/d-EXAMPLE",
                        "lastStatusChange": 1446137493.131,
                        "status": "Succeeded",
                        "summary": "Deployment Succeeded"
                    }
                }
            ],
            "inboundTransitionState": {
                "enabled": true,
                "lastChangedAt": 1470779534.135,
                "lastChangedBy": "arn:aws:iam::111111111111:user/johndoe"
            },
            "stageName": "Staging"
        }
    ],
    "updated": 1446137312.204
}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: