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

Querying Pipeline Details

Function

Querying Pipeline Details

Calling Method

For details, see Calling APIs.

URI

GET /v5/{project_id}/api/pipelines/{pipeline_id}

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

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

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 1128 characters.

description

String

Parameter description:

Description of the pipeline.

Value range:

Max. 1024 characters.

manifest_version

String

Parameter description:

Pipeline version. Default: 3.0.

Value range:

N/A

region

String

Definition:

Region that the current environment belongs to.

Value range:

N/A

domain_id

String

Parameter description:

Tenant ID.

Value range:

32 characters, including only digits and letters.

project_id

String

Parameter description:

Project ID.

Value range:

32 characters, including only digits and letters.

component_id

String

Definition:

ID of the microservice to which the pipeline belongs. Obtain the ID by calling the API for querying microservices. data.id indicates the microservice 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.

creator_id

String

Definition:

Pipeline creator ID.

Value range:

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

creator_name

String

Definition:

Pipeline creator name.

Value range:

N/A

updater_id

String

Definition:

ID of the last person who updated the pipeline.

Value range:

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

create_time

Long

Definition:

Pipeline creation time.

Value range:

N/A

update_time

Long

Definition:

Pipeline update time.

Value range:

N/A

is_collect

Boolean

Definition:

Whether the pipeline is added to favorites by the current user.

Value range:

  • true: The pipeline has been added to favorites.

  • false: The pipeline is not added to favorites.

sources

Array of PipelineSource objects

Parameter description:

Pipeline source list.

Value range:

N/A

variables

Array of PipelineVariable objects

Parameter description:

Custom pipeline parameters.

Value range:

None.

schedules

Array of PipelineSchedule objects

Parameter description:

Settings of pipeline scheduled tasks.

Value range:

None.

triggers

Array of PipelineTrigger objects

Parameter description:

Settings of pipeline event triggers.

Value range:

None.

group_id

String

Parameter description:

ID of the group to which the pipeline belongs.

Value range:

None.

definition

String

Parameter description:

Pipeline definition JSON.

Value range:

None.

Table 4 PipelineSource

Parameter

Type

Description

type

String

Parameter description:

Pipeline source type.

Value range:

N/A

params

PipelineSourceParam object

Parameter description:

Pipeline source parameters.

Value range:

N/A

Table 5 PipelineSourceParam

Parameter

Type

Description

alias

String

Parameter description:

Code/Artifact source parameter – Alias of the code repository/artifact source.

Value range:

The value can contain a maximum of 128 characters, including letters, digits, and underscores (_).

git_type

String

Definition:

Type of the Git repository.

Value range:

  • CodeArts Repo.

  • Gitee.

  • GitHub.

  • GitCode.

  • GitLab.

codehub_id

String

Parameter description:

Repo ID.

Value range:

N/A

endpoint_id

String

Parameter description:

Endpoint ID.

Value range:

N/A

default_branch

String

Parameter description:

Default branch.

Value range:

N/A

git_url

String

Parameter description:

Git URL.

Value range:

N/A

ssh_git_url

String

Parameter description:

ssh_git URL.

Value range:

N/A

web_url

String

Parameter description:

Web page URL.

Value range:

N/A

repo_name

String

Parameter description:

Pipeline source name.

Value range:

N/A

artifact_type

String

Parameter description:

Artifact source type.

Value range:

generic and docker are available.

artifact_type_name

String

Parameter description:

Artifact source type name.

Value range:

N/A

branch_filter

String

Parameter description:

Branch filter.

Value range:

N/A

directory

String

Definition:

Directory where the artifact is located.

Value range:

N/A

directory_id

String

Parameter description:

Directory ID.

Value range:

N/A

organization

String

Parameter description:

Docker organization.

Value range:

N/A

package_name

String

Definition:

Software package name.

Value range:

N/A

version

String

Definition:

Artifact version.

Value range:

N/A

version_strategy

String

Parameter description:

Policy to obtain the artifact source version.

Value range:

latest and specificVersion are available.

source_system

String

Parameter description:

Artifact source name.

Value range:

N/A

Table 6 PipelineVariable

Parameter

Type

Description

name

String

Definition:

Custom parameter name.

Value range:

Enter a maximum of 128 characters. Only letters, digits, and underscores (_) are supported.

sequence

Integer

Parameter description:

Sequence number.

Value range:

1–2147483647

type

String

Parameter description:

Custom parameter type.

Value range:

N/A

value

String

Definition:

Default value of the custom parameter.

Value range:

N/A

is_secret

Boolean

Definition:

Private parameter or not.

Value range:

  • true: The parameter is private.

  • false: The parameter is not private.

description

String

Parameter description:

Custom parameter description.

Value range:

N/A

is_runtime

Boolean

Definition:

Whether a parameter can be set at runtime.

Value range:

  • true: The parameter can be set at runtime.

  • false: The parameter cannot be set at runtime.

limits

Array of strings

Parameter description:

List of limited enumerated values.

Value range:

N/A

is_reset

Boolean

Definition:

Whether an auto-increment parameter is reset.

Value range:

  • true: The parameter is reset.

  • false: The parameter is not reset.

latest_value

String

Parameter description:

The latest value of an auto-increment parameter.

Value range:

N/A

Table 7 PipelineSchedule

Parameter

Type

Description

uuid

String

Parameter description:

ID of a scheduled task.

Constraints:

None.

Value range:

None.

Default value:

None.

type

String

Parameter description:

Job type.

Constraints:

None.

Value range:

Only fixed is supported.

Default value:

None.

name

String

Parameter description:

Job name.

Constraints:

None.

Value range:

None.

Default value:

None.

enable

String

Parameter description:

Whether to enable.

Constraints:

None.

Value range:

None.

Default value:

None.

days_of_week

Array of integers

Parameter description:

Specific execution day in a week. Sunday to Saturday: 1 to 7.

Constraints:

N/A.

Value Range:

N/A.

Default value:

N/A.

time_zone

String

Definition:

Time zone.

Constraints:

N/A

Value range:

  • "China Standard Time".

  • "GMT Standard Time".

  • "South Africa Standard Time".

  • "Russian Standard Time".

  • "SE Asia Standard Time".

  • "Singapore Standard Time".

  • "Pacific SA Standard Time".

  • "E. South America Standard Time".

  • "Central Standard Time (Mexico)".

  • "Egypt Standard Time".

  • "Saudi Arabia Standard Time".

Default value:

N/A

Table 8 PipelineTrigger

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.

Constraints:

N/A

Value range:

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

Default value:

N/A

git_url

String

Definition:

Git URL.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

git_type

String

Definition:

Type of the Git repository.

Constraints:

N/A

Value range:

  • CodeArts Repo.

  • Gitee.

  • GitHub.

  • GitCode.

  • GitLab.

Default value:

N/A

is_auto_commit

Boolean

Definition:

Whether to automatically commit code. This feature is only available for Gitee repositories. After a webhook triggers a pipeline, a comment is automatically added.

Constraints:

N/A

Value range:

  • true: The code is automatically committed.

  • false: The code is not automatically committed.

Default value:

N/A

events

Array of CodeEvent objects

Parameter description:

Trigger event list.

Constraints:

None.

Value range:

None.

Default value:

None.

hook_id

String

Parameter description:

Callback ID generated by the system.

Constraints:

None.

Value range:

None.

Default value:

None.

repo_id

String

Parameter description:

Repo repository ID.

Constraints:

None.

Value range:

None.

Default value:

None.

endpoint_id

String

Definition:

Code source endpoint ID.

Constraints:

N/A

Value range:

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

Default value:

N/A

callback_url

String

Parameter description:

Callback URL, which is generated when a webhook is registered.

Constraints:

None.

Value range:

None.

Default value:

None.

security_token

String

Parameter description:

User token, which is generated when a webhook is registered.

Constraints:

None.

Value range:

None.

Default value:

None.

Table 9 CodeEvent

Parameter

Type

Description

type

String

Definition:

Event type.

Constraints:

N/A

Value range:

  • merge_request: triggered by an MR.

  • push: triggered by code push.

  • tag_push: triggered by a tag.

  • issue: triggered by a Gitee repository issue.

  • note: triggered by a Gitee repository comment.

Default value:

N/A

enable

Boolean

Definition:

Whether the code repository is available.

Constraints:

N/A

Value range:

  • true: The code repository is available.

  • false: The code repository is unavailable.

Default value:

N/A

Example Requests

GET http://{endpoint}/v5/6428c2e2b4b64affa14ec80896695c49/api/pipelines/633839ac12a2465ba86dfc5cd212ee1a

Example Responses

Status code: 200

OK

{
  "id" : "9777b6f14dca47ab8e411512b8301698",
  "name" : "New Pipeline - 20230222110358",
  "description" : "",
  "manifest_version" : "3.0",
  "region" : "{region}",
  "domain_id" : "ce8df55870164338a72d7e828a966a2a",
  "project_id" : "f83ef803e04e4fe8834ddaf18ffd9d8f",
  "component_id" : "",
  "is_publish" : false,
  "creator_id" : "847a5317086c41798469d0868535943a",
  "creator_name" : "Beta environment account",
  "updater_id" : "847a5317086c41798469d0868535943a",
  "create_time" : 1676116509000,
  "update_time" : 1690785914000,
  "is_collect" : true,
  "sources" : [ ],
  "variables" : [ ],
  "schedules" : [ {
    "uuid" : "38e10252a4ea48c594f744bb4fc1411c",
    "type" : "fixed",
    "name" : "Scheduled task_1",
    "enable" : true,
    "days_of_week" : [ 2, 3, 4, 5, 6 ],
    "time_zone" : "China Standard Time"
  } ],
  "triggers" : [ ],
  "group_id" : null,
  "definition" : "{\"stages\":[{\"name\":\"Delayed execution of phase _1\",\"sequence\":\"0\",\"jobs\":[{\"id\":\"\",\"stage_id\":1677035050256,\"identifier\":\"167703505025720bcc960-2929-457f-91e5-9099556cc478\",\"name\": \"\",\"depends_on\":[] ,\"timeout\":\"\",\"timeout_unit\":\"\",\"steps\": [{\"name\":\"Delayed execution of \",\"task\":\"official_devcloud_delay\",\"sequence\":0,\"inputs\":[{\"key\":\"timer_type\",\"value\":\"delay\"},{\"key\":\"delay_time\",\"value\":10},{\"key\":\"scheduled_time\",\"value\":\"\"},{\"key\":\"time_zone\",\"value\":\"China Standard Time\"}] ,\"business_type\":\"Normal\",\"runtime_attribution\":\"agentless\",\"identifier\":\"1677035056887f508df54-eff9-4f47-b67d-0629917599e9\",\"multi_step_editable\":0,\"official_task_version\":\"0.0.3\"}],\"exec_type\":\"AGENTLESS_JOB\",\"sequence\":0,\"pipeline_id\":\"62bc8c36ab1a4ef9831df98e88c33c69\"}],\"identifier\":\"0\",\"pre\":[{\"task\":\"official_devcloud_autoTrigger\",\"sequence\":0}],\"post\":null,\"depends_on\":[],\"run_always\":false,\"pipeline_id\":\"62bc8c36ab1a4ef9831df98e88c33c69\"}]}"
}

SDK Sample Code

The SDK sample code is as follows.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.huaweicloud.sdk.test;

import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.codeartspipeline.v2.region.CodeArtsPipelineRegion;
import com.huaweicloud.sdk.codeartspipeline.v2.*;
import com.huaweicloud.sdk.codeartspipeline.v2.model.*;


public class ShowPipelineDetailSolution {

    public static void main(String[] args) {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        String ak = System.getenv("CLOUD_SDK_AK");
        String sk = System.getenv("CLOUD_SDK_SK");

        ICredential auth = new BasicCredentials()
                .withAk(ak)
                .withSk(sk);

        CodeArtsPipelineClient client = CodeArtsPipelineClient.newBuilder()
                .withCredential(auth)
                .withRegion(CodeArtsPipelineRegion.valueOf("<YOUR REGION>"))
                .build();
        ShowPipelineDetailRequest request = new ShowPipelineDetailRequest();
        request.withProjectId("{project_id}");
        request.withPipelineId("{pipeline_id}");
        try {
            ShowPipelineDetailResponse response = client.showPipelineDetail(request);
            System.out.println(response.toString());
        } catch (ConnectionException e) {
            e.printStackTrace();
        } catch (RequestTimeoutException e) {
            e.printStackTrace();
        } catch (ServiceResponseException e) {
            e.printStackTrace();
            System.out.println(e.getHttpStatusCode());
            System.out.println(e.getRequestId());
            System.out.println(e.getErrorCode());
            System.out.println(e.getErrorMsg());
        }
    }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# coding: utf-8

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkcodeartspipeline.v2.region.codeartspipeline_region import CodeArtsPipelineRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkcodeartspipeline.v2 import *

if __name__ == "__main__":
    # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak = os.environ["CLOUD_SDK_AK"]
    sk = os.environ["CLOUD_SDK_SK"]

    credentials = BasicCredentials(ak, sk)

    client = CodeArtsPipelineClient.new_builder() \
        .with_credentials(credentials) \
        .with_region(CodeArtsPipelineRegion.value_of("<YOUR REGION>")) \
        .build()

    try:
        request = ShowPipelineDetailRequest()
        request.project_id = "{project_id}"
        request.pipeline_id = "{pipeline_id}"
        response = client.show_pipeline_detail(request)
        print(response)
    except exceptions.ClientRequestException as e:
        print(e.status_code)
        print(e.request_id)
        print(e.error_code)
        print(e.error_msg)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package main

import (
	"fmt"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
    codeartspipeline "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/codeartspipeline/v2"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/codeartspipeline/v2/model"
    region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/codeartspipeline/v2/region"
)

func main() {
    // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak := os.Getenv("CLOUD_SDK_AK")
    sk := os.Getenv("CLOUD_SDK_SK")

    auth := basic.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        Build()

    client := codeartspipeline.NewCodeArtsPipelineClient(
        codeartspipeline.CodeArtsPipelineClientBuilder().
            WithRegion(region.ValueOf("<YOUR REGION>")).
            WithCredential(auth).
            Build())

    request := &model.ShowPipelineDetailRequest{}
	request.ProjectId = "{project_id}"
	request.PipelineId = "{pipeline_id}"
	response, err := client.ShowPipelineDetail(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.