GetPipelineRun - Get a pipeline run instance

Updated at:

You can use OpenAPI to retrieve a pipeline run instance.

Applicable editions

Central edition, Region edition

Endpoints and authorization information

  • Obtain the endpoint to replace {domain} in the API request syntax.

  • Obtain a personal access token.

  • Obtain the organizationId: Required only for the Central edition. Go to the Basic Information page in the Organization Management console to obtain your organization ID.

Product

Resource

Required permission

Pipeline

Pipeline run instance

Read-only

Request syntax

Central edition

GET https://{domain}/oapi/v1/flow/organizations/{organizationId}/pipelines/{pipelineId}/runs/{pipelineRunId}

Region edition

GET https://{domain}/oapi/v1/flow/pipelines/{pipelineId}/runs/{pipelineRunId}

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

Personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example value

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

Organization ID.

5ebbc0228123212b59xxxxx

pipelineId

string

path

Yes

Pipeline ID.

123

pipelineRunId

string

path

Yes

Pipeline run ID. You can get it by calling the ListPipelineRuns API.

1

Request examples

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/flow/organizations/5ebbc0228123212b59xxxxx/pipelines/123/runs/1' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/flow/pipelines/123/runs/1' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

object

createTime

integer

Start time.

1590730400000

creatorAccountId

string

Creator.

1222222222

globalParams

array

-

object

encrypted

boolean

Whether encrypted.

false

key

string

Parameter key.

key

value

string

Parameter value.

value

groups

array

-

object

id

integer

ID.

1

name

string

Name.

Execute command

modifierAccountId

string

Updater.

1222222222

pipelineId

integer

Pipeline ID.

123

pipelineRunId

integer

Pipeline run ID. You can get it by calling the ListPipelineRuns API.

1

pipelineType

string

Pipeline type.

default

sources

array

-

object

data

object

branch

string

Default branch.

master

cloneDepth

integer

Clone depth.

1

credentialId

integer

Service certificate ID.

222

credentialLabel

string

Certificate display name.

Enterprise public key

credentialType

string

Certificate type.

region-ssh

events

array[string]

Triggering events.

isBranchMode

boolean

Filter condition for triggering.

false

isCloneDepth

boolean

Whether clone depth is set.

true

isSubmodule

boolean

Whether it is a submodule.

false

isTrigger

boolean

Whether commit-triggering is enabled.

true

label

string

Display name.

cdup/ss

namespace

string

GitHub namespace.

asasasas

repo

string

Repository URL.

https://codeup.aliyun.com/test.git

serviceConnectionId

integer

Service connection ID.

12

triggerFilter

string

Trigger filter condition.

.*

webhook

string

Webhook URL.

https://flow.aliyun/webhook/asassasa

name

string

Code source name.

Sample code source

sign

string

Code source identifier.

assaaaaaasasasa

type

string

Code source type: aliyunGit (Alibaba Cloud Code), customGitlab (self-hosted GitLab), giteeGit (Gitee), codeup (Codeup), git (generic Git), gitlab (GitLab), bitbucket (Bitbucket), githubOAuth (GitHub).

Codeup

stageGroup

array[string]

stages

array

Stage details.

-

object

index

string

Stage ordinal number.

Group0-Stage0

name

string

Stage name.

Java build

stageInfo

object

endTime

integer

End time.

1729178040000

jobs

array

List of tasks.

-

object

actions

array

Next steps. For more information, see the referenced document.

-

object

data

string

Data.

disable

boolean

Whether you have permission to call this. For more information, see the referenced document.

true

displayType

string

Display type.

LOG

name

string

Name.

Build log

order

integer

Order.

1

params

object

Parameters. For more information, see the referenced document.

key

string

Parameter name.

title

string

Title.

Build log

type

string

Type of next step. For more information, see the referenced document.

GetVMDeployOrder

endTime

integer

End time.

1729178040000

id

integer

Task ID.

21212

jobSign

string

Unique task identifier.

job-1

name

string

Task name.

Java build

params

string

Runtime parameters.

{}

result

string

Result.

{"data":{"RELEASE_INFO":"[]","ARTIFACTSV2":"[]","ARTIFACTS":"[]"},"requestId":"8bf5e28c-a58b-498e-a205-1c0ff5465c3c","successful":true}

startTime

integer

Start time.

1729178040000

status

string

Status: FAIL (failed), SUCCESS (succeeded), RUNNING (running).

RUNNING

runnerStatus

string

Runner status: ONLINE (online), OFFLINE (offline).

ONLINE

name

string

Stage name.

Java build

startTime

integer

Start time.

1729178040000

status

string

Status: FAIL (failed), SUCCESS (succeeded), RUNNING (running).

RUNNING

status

string

Status: FAIL (failed), SUCCESS (succeeded), RUNNING (running).

RUNNING

triggerMode

integer

Trigger mode: 1 (manual), 2 (scheduled), 3 (code commit), 5 (pipeline trigger), 6 (webhook trigger).

1

updateTime

integer

Update time.

1590730400000

Response example

{
    "createTime": 1590730400000,
    "creatorAccountId": "1222222222",
    "globalParams": [
        {
            "encrypted": false,
            "key": "key",
            "value": "value"
        }
    ],
    "groups": [
        {
            "id": 1,
            "name": "Execute command"
        }
    ],
    "modifierAccountId": "1222222222",
    "pipelineId": 123,
    "pipelineRunId": 1,
    "pipelineType": "default",
    "sources": [
        {
            "data": {
                "branch": "master",
                "cloneDepth": 1,
                "credentialId": 222,
                "credentialLabel": "Enterprise public key",
                "credentialType": "region-ssh",
                "events": [
                    
                ],
                "isBranchMode": false,
                "isCloneDepth": true,
                "isSubmodule": false,
                "isTrigger": true,
                "label": "cdup/ss",
                "namespace": "asasasas",
                "repo": "https://codeup.aliyun.com/test.git",
                "serviceConnectionId": 12,
                "triggerFilter": ".*",
                "webhook": "https://flow.aliyun/webhook/asassasa"
            },
            "name": "Sample code source",
            "sign": "assaaaaaasasasa",
            "type": "Codeup"
        }
    ],
    "stageGroup": [
        
    ],
    "stages": [
        {
            "index": "Group0-Stage0",
            "name": "Java build",
            "stageInfo": {
                "endTime": 1729178040000,
                "jobs": [
                    {
                        "actions": [
                            {
                                "data": "",
                                "disable": true,
                                "displayType": "LOG",
                                "name": "Build log",
                                "order": 1,
                                "params": {
                                    "key": ""
                                },
                                "title": "Build log",
                                "type": "GetVMDeployOrder"
                            }
                        ],
                        "endTime": 1729178040000,
                        "id": 21212,
                        "jobSign": "job-1",
                        "name": "Java build",
                        "params": "{}",
                        "result": "{\"data\":{\"RELEASE_INFO\":\"[]\",\"ARTIFACTSV2\":\"[]\",\"ARTIFACTS\":\"[]\"},\"requestId\":\"8bf5e28c-a58b-498e-a205-1c0ff5465c3c\",\"successful\":true}",
                        "startTime": 1729178040000,
                        "status": "RUNNING",
                        "runnerStatus": "ONLINE"
                    }
                ],
                "name": "Java build",
                "startTime": 1729178040000,
                "status": "RUNNING"
            }
        }
    ],
    "status": "RUNNING",
    "triggerMode": 1,
    "updateTime": 1590730400000
}

Error codes

For more information about error codes, see the Error Center.