All Products
Search
Document Center

Alibaba Cloud DevOps:GetLatestPipelineRun

Last Updated:Apr 03, 2025

Queries the most recent pipeline instance information.

Prerequisites

  • Replace <domain> in your API request URL with the endpoint that you obtain. For more information, see Endpoint.

  • Obtain your access token. For more information, see Obtain an access token.

Authorization information

Application

Resource

Required permission

Flow

Pipeline run

Read-only

Request syntax

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

Request headers

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

The access token.

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

Request parameters

参数

类型

位置

是否必填

描述

示例值

pipelineId

string

path

Yes

Pipeline ID.

123

Sample request

curl -X 'GET' \
  'https://test.rdc.aliyuncs.com/oapi/v1/flow/organizations/pipelines/123/runs/latestPipelineRun' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example

-

object

createTime

integer

Start time.

1590730400000

creatorAccountId

string

Creator.

1222222222

globalParams

array

-

object

encrypted

boolean

Whether to encrypt.

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

Modifier.

1222222222

pipelineId

integer

Pipeline ID.

123

pipelineRunId

integer

Pipeline run ID (pipeline run number).

1

pipelineType

string

Pipeline type.

default

sources

array

-

object

data

object

branch

string

Default branch.

master

cloneDepth

integer

Clone depth.

1

credentialId

integer

Service credential ID.

222

credentialLabel

string

Credential display name.

Enterprise public key

credentialType

string

Credential type.

region-ssh

events

array[string]

Trigger events.

isBranchMode

boolean

Trigger filter condition.

false

isCloneDepth

boolean

Whether to set clone depth.

true

isSubmodule

boolean

Is sub-module.

false

isTrigger

boolean

Enable submission trigger.

true

label

string

Display name.

cdup/ss

namespace

string

GitHub namespace.

asasasas

repo

string

Repository address.

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

serviceConnectionId

integer

Service connection ID.

12

triggerFilter

string

Trigger filter condition.

. *

webhook

string

Webhook address.

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 base

  • customGitlab: self-managed git

  • giteeGit: Gitee

  • codeup: Codeup

  • git: general git

  • gitlab: gitlab

  • bitbucket: bitbucket

  • githubOAuth: github

Codeup

stageGroup

array[string]

stages

array

Stage details.

-

object

index

string

Stage index.

Group0-Stage0

name

string

Stage name.

Java build

stageInfo

object

endTime

integer

End time.

1729178040000

jobs

array

Job list.

-

object

actions

array

Subsequent operation.

-

object

data

string

Data.

disable

boolean

Whether you have permissions.

true

displayType

string

Display type.

LOG

name

string

Name.

Build Log

order

integer

Sequence.

1

params

object

Parameters.

key

string

Parameter name.

title

string

Title.

Build Log

type

string

Subsequent action type.

GetVMDeployOrder

endTime

integer

End time.

1729178040000

id

integer

Job ID.

21212

jobSign

string

Job unique identifier.

job-1

name

string

Job 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

  • SUCCESS

  • RUNNING

RUNNING

name

string

Phase name.

Java build

startTime

integer

Start time.

1729178040000

status

string

Status.

  • FAIL

  • SUCCESS

  • RUNNING

RUNNING

status

string

Status.

  • FAIL

  • SUCCESS

  • RUNNING

RUNNING

triggerMode

integer

Trigger mode.

  • 1: manual trigger

  • 2: timing trigger

  • 3: code submission trigger

  • 5: pipeline trigger

  • 6: webhook trigger

1

updateTime

integer

Update time.

1590730400000

Sample success response

{
    "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"
                    }
                ],
                "name": "Java build",
                "startTime": 1729178040000,
                "status": "RUNNING"
            }
        }
    ],
    "status": "RUNNING",
    "triggerMode": 1,
    "updateTime": 1590730400000
}

Error codes

For a list of error codes, see Service error codes.