Help Center/ CodeArts Pipeline/ API Reference (Ally Region)/ API/ Pipeline Management/ Obtaining Pipeline List/Pipeline Execution Status in a Project
Updated on 2026-01-12 GMT+08:00

Obtaining Pipeline List/Pipeline Execution Status in a Project

Function

This API is used to obtain pipeline list and pipeline execution status in a project.

Calling Method

For details, see Calling APIs.

URI

POST /v5/{project_id}/api/pipelines/list

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

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 for .

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

project_id

No

String

Definition:

CodeArts project ID.

Constraints:

N/A

Value range:

Each ID consists of 32 characters, including digits and letters.

Default value:

N/A

project_ids

No

Array of strings

Definition:

CodeArts project IDs.

Constraints:

N/A

Value range:

Each ID consists of 32 characters, including digits and letters.

Default value:

N/A

component_id

No

String

Definition:

Microservice ID.

Constraints:

N/A

Value range:

32 characters.

Default value:

N/A

name

No

String

Parameter description:

Pipeline name. Fuzzy search is supported.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

status

No

Array of strings

Definition:

Pipeline status list.

Constraints:

N/A

Value range:

  • COMPLETED: The instance is completed.

  • RUNNING: The instance is running.

  • FAILED: The instance failed.

  • CANCELED: The instance is canceled.

  • PAUSED: The instance is paused.

  • SUSPEND: The instance is suspended.

  • IGNORED: The pipeline is ignored.

Default value:

N/A

is_publish

No

Boolean

Definition:

Whether the pipeline is a change-triggered pipeline.

Constraints:

N/A

Value range:

  • true: The pipeline is a change-triggered pipeline.

  • false: The pipeline is not a change-triggered pipeline.

Default value:

N/A

creator_id

No

String

Definition:

Creator ID, that is, the user ID.

Constraints:

N/A

Value range:

Each ID contains 32 characters.

Default value:

N/A

creator_ids

No

Array of strings

Parameter description:

Creator ID list.

Constraints:

N/A.

Value range:

Each ID contains 32 characters.

Default value:

N/A.

executor_ids

No

Array of strings

Parameter description:

Executor ID list.

Constraints:

N/A.

Value range:

Each ID contains 32 characters.

Default value:

N/A.

start_time

No

String

Definition:

Pipeline start time.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

end_time

No

String

Definition:

Pipeline end time.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

offset

No

Long

Parameter description:

Initial offset.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

limit

No

Long

Parameter description:

Number of records to be queried.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

sort_key

No

String

Definition:

Sorting field.

Constraints:

N/A

Value range:

  • name: pipeline name.

  • create_time: creation time.

  • update_time: update time.

Default value:

N/A

sort_dir

No

String

Definition:

Sorting rule.

Constraints:

N/A

Value range:

  • asc: by sorting field in ascending order.

  • desc: by sorting field in descending order.

Default value:

N/A

group_path_id

No

String

Parameter description:

Pipeline group ID.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

by_group

No

Boolean

Definition:

Whether to query by group.

Constraints:

N/A

Value range:

  • true: The query is performed by group.

  • false: The query is not performed by group.

Default value:

N/A

is_banned

No

Boolean

Definition:

Whether to include disabled pipelines.

Constraints:

N/A

Value range:

  • true: Disabled pipelines are included.

  • false: Disabled pipelines are not included.

Default value:

N/A

query_new

No

Boolean

Definition:

Whether to query only pipelines of the new version.

Constraints:

N/A

Value range:

  • true: Only pipelines of the new version are queried.

  • false: Pipelines of the new and the old version are queried.

Default value:

true.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

offset

Integer

Parameter description:

Initial offset.

Value range:

N/A.

limit

Integer

Parameter description:

Number of queried records.

Value range:

N/A.

total

Integer

Parameter description:

Total number of records.

Value range:

N/A.

pipelines

Array of pipelines objects

Parameter description:

Pipeline.

Value range:

N/A.

Table 5 pipelines

Parameter

Type

Description

pipeline_id

String

Definition:

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

Value range:

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

name

String

Parameter description:

Pipeline name.

Value range:

The value can contain only letters, digits, hyphens (-), and underscores (_). The length is 1 to 128 characters.

project_id

String

Parameter description:

Project ID.

Value range:

32 characters, including only digits and letters.

project_name

String

Parameter description:

Project name.

Value range:

N/A.

component_id

String

Parameter description:

Component ID.

Value range:

N/A.

is_publish

Boolean

Definition:

Whether the pipeline is a change-triggered pipeline.

Value range:

  • true: The pipeline is a change-triggered pipeline.

  • false: The pipeline is not a change-triggered pipeline.

is_collect

Boolean

Definition:

Whether to add the pipeline to favorites.

Value range:

  • true: The pipeline has been added to favorites.

  • false: The pipeline is not added to favorites.

manifest_version

String

Parameter description:

Pipeline version.

Value range:

The default value is 3.0.

create_time

Long

Parameter description:

Creation time.

Value range:

N/A.

latest_run

latest_run object

Parameter description:

Latest running information.

Value range:

N/A.

convert_sign

Integer

Parameter description:

Sign of converting an old version to a new version.

Value range:

N/A.

security_level

Integer

Definition:

Pipeline security level.

Value range:

The value is a positive integer.

null: No security level is set.

1: lowest security level.

Table 6 latest_run

Parameter

Type

Description

pipeline_id

String

Definition:

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

Value range:

N/A

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:

N/A

executor_id

String

Parameter description:

Executor ID.

Value range:

N/A.

executor_name

String

Parameter description:

Executor name.

Value range:

N/A.

stage_status_list

Array of stage_status_list objects

Definition:

Stage information list.

Value range:

N/A

status

String

Definition:

Pipeline run status.

Value range:

  • COMPLETED: The instance is completed.

  • RUNNING: The instance is running.

  • FAILED: The instance failed.

  • CANCELED: The instance is canceled.

  • PAUSED: The instance is paused.

  • SUSPEND: The instance is suspended.

  • IGNORED: The instance is ignored.

run_number

Integer

Parameter description:

Pipeline running sequence number.

Value range:

No less than 1.

trigger_type

String

Definition:

Trigger type.

Value range:

  • Manual: triggered manually.

  • Scheduler: triggered by a scheduled task.

  • MR: triggered by an MR.

  • Push: triggered by a push event.

  • CreateTag: triggered by a tag.

  • Issue: triggered by an issue.

  • Note: triggered by a comment.

build_params

build_params object

Parameter description:

Build parameters.

Value range:

N/A.

artifact_params

artifact_params object

Parameter description:

Artifact parameters.

Value range:

N/A.

start_time

Long

Definition:

Pipeline start time.

Value range:

N/A

end_time

Long

Definition:

Pipeline end time.

Value range:

N/A

modify_url

String

Parameter description:

Address of the editing page.

Value range:

N/A.

detail_url

String

Parameter description:

Address of the details page.

Value range:

N/A.

Table 7 stage_status_list

Parameter

Type

Description

name

String

Parameter description:

Stage name.

Value range:

Enter only letters, digits, hyphens (-), underscores (_), commas (,), semicolons (;), colons (:), periods (.), slashes (/), parentheses (), and spaces. The name cannot start or end with a space, and the length is 1 to 128 characters.

sequence

Integer

Parameter description:

Stage sequence number. The value 0 indicates the first pipeline stage.

Value range:

No less than 0.

status

String

Definition:

Pipeline stage status.

Value range:

  • INIT: The stage is being initialized.

  • QUEUED: The stage is queuing.

  • RUNNING: The stage is running.

  • CANCELED: The stage is canceled.

  • COMPLETED: The stage is completed.

  • FAILED: The stage failed.

  • SKIPPED: The stage is skipped.

  • IGNORED: The stage is ignored.

  • PAUSED: The stage is paused.

  • SUSPEND: The stage is suspended.

  • ASYNC_RUNNING: The stage is running asynchronously.

  • ASYNC_FAILED: The stage failed during asynchronous execution.

  • UNSELECTED: The stage is unselected.

  • REDISPATCH: The stage is rescheduled.

start_time

String

Parameter description:

Stage start time.

Value range:

N/A.

end_time

String

Parameter description:

Stage end time.

Value range:

N/A.

id

String

Parameter description:

Stage ID.

Value range:

N/A.

Table 8 job_status_list

Parameter

Type

Description

name

String

Definition:

Job name.

Value range:

N/A

identifier

String

Definition:

Job identifier.

Value range:

N/A

status

String

Definition:

Job status.

Value range:

RUNNING, FAILED, COMPLETED, SKIPPED, IGNORE, or SUSPEND.

Table 9 build_params

Parameter

Type

Description

action

String

Definition:

Merge request type.

Value range:

  • open: The merge request is opened.

  • reopen: The merge request is reopened.

  • update: The merge request is updated.

  • merge: The merge request is merged.

build_type

String

Definition:

Triggered by a branch or a tag.

Value range:

  • branch: triggered by a branch.

  • tag: triggered by a tag.

commit_id

String

Definition:

Code repository commit ID.

Value range:

The value contains 40 characters.

event_type

String

Definition:

Type of a running event.

Value range:

  • Manual: triggered manually.

  • Scheduler: triggered by a scheduled task.

  • MR: triggered by an MR.

  • Push: triggered by a push event.

  • CreateTag: triggered by a tag.

  • Issue: triggered by an issue.

  • Note: triggered by a comment.

merge_id

String

Parameter description:

Merge request ID.

Value range:

N/A.

message

String

Parameter description:

Code commit message.

Value range:

N/A.

source_branch

String

Parameter description:

Source branch.

Value range:

N/A.

tag

String

Parameter description:

Tag.

Value range:

N/A.

target_branch

String

Parameter description:

Target branch.

Value range:

N/A.

codehub_id

String

Parameter description:

Repo code repository ID.

Value range:

N/A.

git_url

String

Parameter description:

HTTPS address of the code repository.

Value range:

N/A.

source_codehub_id

String

Parameter description:

ID of the source Repo code repository.

Value range:

N/A.

source_codehub_url

String

Parameter description:

Address of the source Repo code repository.

Value range:

N/A.

source_codehub_http_url

String

Parameter description:

HTTP address of the source Repo code repository.

Value range:

N/A.

only_code_update

Boolean

Definition:

This parameter is valid only when action is set to update. The value must be true or false, indicating whether to update only the code.

Value range:

N/A

merge_request_iid

String

Definition:

Merge request ID of the code repository.

Value range:

N/A

merge_request_url

String

Definition:

Merge request URL of the code repository.

Value range:

N/A

target_codehub_id

String

Definition:

ID of the target Repo code repository.

Value range:

N/A

target_codehub_url

String

Definition:

Address of the target Repo code repository.

Value range:

N/A

target_codehub_http_url

String

Definition:

HTTP address of the target Repo code repository.

Value range:

N/A

git_type

String

Definition:

Repository type.

Value range:

N/A

repo_project_id

String

Definition:

Repository project ID.

Value range:

N/A

human_name

String

Definition:

Repository name.

Value range:

N/A

Table 10 artifact_params

Parameter

Type

Description

version

String

Parameter description:

Package version.

Value range:

N/A.

branch_filter

String

Parameter description:

Branch filter.

Value range:

N/A.

package_name

String

Parameter description:

Package name.

Value range:

N/A.

organization

String

Parameter description:

Docker organization.

Value range:

N/A.

Example Requests

This API is used to obtain the pipeline list.

Set the start offset to 0 and the number to 10.

POST https://{endpoint}/v5/54f90b75fc1447b1b65e8d3a9f77923d/api/pipelines/list

{
  "offset" : 0,
  "limit" : 10,
  "name" : ""
}

Example Responses

Status code: 200

OK

{
  "offset" : 0,
  "limit" : 10,
  "total" : 1,
  "pipelines" : [ {
    "pipeline_id" : "cd65d6f2dc17493e97eb5175f872761a",
    "name" : "New Pipeline - 20230222181032",
    "project_id" : "6428c2e2b4b64affa14ec80896695c49",
    "component_id" : "7bb171e9e9fc415dbd1666ceb68668da",
    "is_publish" : true,
    "is_collect" : false,
    "manifest_version" : "3.0",
    "create_time" : 1677060662000,
    "latest_run" : {
      "pipeline_id" : "cd65d6f2dc17493e97eb5175f872761a",
      "pipeline_run_id" : "88a195482b8a48a1808e87ec21565c2f",
      "executor_id" : "847a5317086c41798469d0868535943a",
      "executor_name" : "Beta environment account",
      "stage_status_list" : [ {
        "name" : "Merge Integration Branch",
        "sequence" : 0,
        "status" : "FAILED",
        "start_time" : "2023-02-22 18:12:25",
        "end_time" : "2023-02-22 18:12:32"
      }, {
        "name" : "Phase_1",
        "sequence" : 1,
        "status" : "INIT",
        "start_time" : null,
        "end_time" : null
      }, {
        "name" : "Combining Trunks",
        "sequence" : 1,
        "status" : "INIT",
        "start_time" : null,
        "end_time" : null
      } ],
      "status" : "FAILED",
      "run_number" : 1,
      "trigger_type" : "Manual",
      "build_params" : null,
      "artifact_params" : null,
      "start_time" : 1677060745000,
      "end_time" : 1677060752000
    }
  } ]
}

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.