Get pipeline execution history

Prev Next

Available in Classic and VPC

Get details of a pipeline execution history.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET /api/v1/project/{projectId}/history/{historyId}

Request headers

For information about the headers common to all SourcePipeline APIs, see SourcePipeline request headers.

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
projectId String Required Pipeline ID
historyId String Required Execution job result ID

Request example

The request example is as follows:

curl --location --request GET 'https://vpcsourcepipeline.apigw.ntruss.com/api/v1/project/2***/history/54***' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
result Object - Response result
result.history Object - Execution history information
result.history.id Number - Execution job result ID
result.history.projectId Number - Pipeline ID
result.history.begin Number - Execution request time
  • Unix timestamp format
result.history.end Number - Execution end time
  • Unix timestamp format
result.history.status String - Operation status
result.history.tasks Array - History list by job

tasks

The following describes tasks.

Field Type Required Description
id Number - Job ID
name String - Job name
type String - Job type
  • SourceBuild | SourceDeploy
linkedTasks Array - Preceding job list
status String - Job execution status
resultId String - Job result ID
config Object - Job configuration information
config.projectId Number - Job project ID
config.stageId Number - Deployment stage ID
  • Display if type is SourceDeploy.
config.scenarioId Number - Deployment scenario ID
  • Display if type is SourceDeploy.
config.target Object - Connection information
config.target.type String - Connection type
  • SourceCommit | GitHub | Bitbucket | Github Enterprise Server | SourceBuild | ObjectStorage | KubernetesService
config.target.name String - Connected project name
  • Display if type is SourceBuild.
config.target.info Object - Detailed connection information
config.target.info.repository String - Repository name
  • Display if type is SourceBuild.
config.target.info.branch String - Branch name
  • Display if type is SourceBuild.
config.target.info.workspace Object - Bitbucket workspace information
  • If config.target.type is Bitbucket, display including sub-information.
config.target.info.workspace.id String - Bitbucket workspace ID
config.target.info.workspace.name String - Bitbucket workspace name
config.target.info.authType String - Github Enterprise Server login type
  • Display if config.target.type is Github Enterprise Server.
config.target.info.url String - Git repository URL
  • Display if config.target.type is Github Enterprise Server and config.target.info.authType is ssh.
config.target.info.serverUrl String - Server URL
  • Display if config.target.type is Github Enterprise Server and config.target.info.authTypeis OAuth, Personal Access Token, or Username/Password.
config.target.info.owner String - Github Enterprise Server owner
  • Display if config.target.type is Github Enterprise Server.
config.target.info.projectName String - Build project name
  • Display if config.target.type is SourceBuild.
config.target.info.file String - File location in Object Storage
  • Display if config.target.type is ObjectStorage.
config.target.info.storageType String - Manifest file storage
  • Display if config.target.type is KubernetesService.
config.target.info.repository String - Manifest storage repository
  • Display if config.target.info.storageType is SourceCommit.
config.target.info.branch String - Manifest storage repository's branch
  • Display if config.target.info.storageType is SourceCommit.
config.target.info.manifest String - Manifest file
  • Display if config.target.type is KubernetesService.
config.target.info.fullManifest String - Manifest file list
  • Display if config.target.type is KubernetesService.

Response status codes

For information about the HTTP status codes common to all SourcePipeline APIs, see SourcePipeline response status codes.

Response example

The response example is as follows:

{
    "result": {
        "history": {
            "id": 54***,
            "projectId": 2***,
            "begin": 1747205286000,
            "end": 1747205302000,
            "status": "success",
            "tasks": [
                {
                    "id": 6***,
                    "name": "task1",
                    "type": "SourceBuild",
                    "linkedTasks": [],
                    "status": "success",
                    "resultId": "65f88dd0-****-****-****-7f4c5f58b640",
                    "config": {
                        "projectId": 20***,
                        "target": {
                            "type": "SourceCommit",
                            "name": "build-sample",
                            "info": {
                                "repository": "rep-sample",
                                "branch": "master"
                            }
                        }
                    }
                },
                {
                    "id": 6***,
                    "name": "task2",
                    "type": "SourceDeploy",
                    "linkedTasks": [
                        "task1"
                    ],
                    "status": "success",
                    "resultId": "80***",
                    "config": {
                        "projectId": 2***,
                        "stageId": 3***,
                        "scenarioId": 2***,
                        "target": {
                            "type": "SourceBuild",
                            "info": {
                                "projectName": "build-sample"
                            }
                        }
                    }
                }
            ]
        }
    }
}