Updated on 2025-09-08 GMT+08:00

Running a YAML-based Pipeline

Function

This API is used to run a YAML-based pipeline.

Calling Method

For details, see Calling APIs.

URI

POST /v5/{project_id}/api/pac/pipelines/{pipeline_id}/run

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details, see Obtaining a Project ID.

Constraints:

N/A

Value range:

The value consists of 32 characters, including digits and letters.

Default value:

N/A

pipeline_id

Yes

String

Definition:

Pipeline ID. Obtain the ID by calling the API for querying pipelines. pipelines.pipelineId indicates the pipeline ID.

Constraints:

N/A

Value range:

The value consists of 32 characters, including digits and letters.

Default value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

User token. Obtain a token (the value of the X-Subject-Token response header) by calling the IAM API forobtaining a user token.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

X-Language

No

String

Definition:

Language type.

Constraints:

N/A

Value range:

  • zh-cn: Chinese.

  • en-us: English.

Default value:

en-us.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

branch

Yes

String

Definition:

Active branch.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

description

No

String

Definition:

Running description.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

variables

No

Array of variables objects

Definition:

Running parameters.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

choose_jobs

No

Array of strings

Definition:

Selected jobs.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Table 4 variables

Parameter

Mandatory

Type

Description

name

No

String

Definition:

Parameter name.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

value

No

String

Definition:

Parameter value.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

pipeline_run_id

String

Definition:

Pipeline run ID. The return value of the API for starting a pipeline is the pipeline run ID.

Value range:

The value consists of 32 characters, including only digits and letters.

Example Requests

POST https://{endpoint}/v5/6428c2e2b4b64affa14ec80896695c49/api/pac/pipelines/c23f79a760aa4ad28b98f24e70373c4e/run

Example Responses

None

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.