Get pipeline

Prev Next

Available in Classic and VPC

Get pipeline details.

Request

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

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

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

Request example

The request example is as follows:

curl --location --request GET 'https://vpcsourcepipeline.apigw.ntruss.com/api/v1/project/2***' \
--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.id Number - Pipeline ID
result.name String - Pipeline name
result.description String - Pipeline description
result.tasks Array - Job list
result.trigger Object - Trigger settings
result.trigger.repository Array - Push trigger settings
result.trigger.schedule Array - Reserved trigger settings
result.trigger.sourcepipeline Array - Pipeline trigger settings

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
config Object - Set jobs.
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.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.branch String - Branch name
  • Display if type is SourceBuild.
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.

repository

The following describes repository.

Field Type Required Description
type String - Repository type
  • sourcecommit: SourceCommit (valid value)
name String - Repository name
branch String - Branch name

schedule

The following describes schedule.

Field Type Required Description
day Array - List of reserved execution days of the week
  • MON | TUE | WED | THU | FRI | SAT | SUN
time String - Reserved execution time
timeZone String - Reserved trigger time zone
scheduleOnlyWithChange Boolean - Whether to execute when changing SourceCommit and SourcePipeline
  • true | false
    • true: execute
    • false: not execute

sourcepipeline

The following describes sourcepipeline.

Field Type Required Description
id Number - Pipeline ID
name String - Pipeline name

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": {
        "id": 2***,
        "name": "pipeline1",
        "description": "pipeline 1",
        "tasks": [
            {
                "id": 6***,
                "name": "task-build",
                "type": "SourceBuild",
                "linkedTasks": [],
                "config": {
                    "projectId": 20***,
                    "target": {
                        "type": "SourceCommit",
                        "name": "build1",
                        "info": {
                            "repository": "rep1",
                            "branch": "master"
                        }
                    }
                }
            },
            {
                "id": 6***,
                "name": "task-deploy",
                "type": "SourceDeploy",
                "linkedTasks": [
                    "task-build"
                ],
                "config": {
                    "projectId": 2***,
                    "stageId": 3***,
                    "scenarioId": 2***,
                    "target": {
                        "type": "SourceBuild",
                        "info": {
                            "projectName": "build1"
                        }
                    }
                }
            }
        ],
        "trigger": {
            "repository": [
                {
                    "type": "sourcecommit",
                    "name": "rep1",
                    "branch": "master"
                }
            ],
            "schedule": [],
            "sourcepipeline": []
        }
    }
}