Help Center/ CodeArts Pipeline/ API Reference/ API/ Pipeline Management/ Updating Details of a YAML Pipeline
Updated on 2025-11-12 GMT+08:00

Updating Details of a YAML Pipeline

Function

To update the YAML pipeline details, you can call the API for querying pipeline details to obtain the pipeline details and then update the required fields.

Calling Method

For details, see Calling APIs.

URI

PUT /v6/{domain_id}/api/pac/pipelines/{pipeline_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

domain_id

Yes

String

Definition:

Tenant ID, which can be obtained from the API credential on the console. The account ID is the tenant ID.

Constraints:

N/A

Value range:

The value contains 32 characters.

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 only digits and letters.

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

project_id

No

String

Definition:

32-character UUID of a CodeArts project, which must be unique.

Constraints:

N/A

Value range:

The value contains 32 characters.

Default value:

N/A

Request Parameters

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

name

No

String

Definition:

Pipeline name.

Constraints:

The pipeline name must be unique.

Value range:

Enter 1 to 128 characters, including only letters, digits, hyphens (-), and underscores (_).

Default value:

N/A

description

No

String

Definition:

Pipeline description.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

push_to_repo

No

Boolean

Definition:

Whether to push the code to a repository.

Constraints:

N/A

Value range:

  • true: Push the code to a repository.

  • false: Do not push the code to a repository.

Default value:

false

new_branch

No

Boolean

Definition:

Whether to use a new branch.

Constraints:

N/A

Value range:

  • true: Use a new branch.

  • false: Do not use a new branch.

Default value:

true

new_file

No

Boolean

Definition:

Whether to create a file.

Constraints:

N/A

Value range:

  • true: Create a file.

  • false: Do not create a file.

Default value:

true

file_content

No

String

Definition:

File content.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

selected_branch

No

String

Definition:

Selected branch.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

push_branch

No

String

Definition:

Name of the branch to be pushed.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

commit_message

No

String

Definition:

Commit message.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

create_pull_request

No

Boolean

Definition:

Whether to create a pull request.

Constraints:

N/A

Value range:

  • true: Create a pull request.

  • false: Do not create a pull request.

Default value:

true

agency_name

No

String

Definition:

Delegate URN, which is configured in the basic pipeline information and can be obtained from CodeArts IAM.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

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 only digits and letters.

Default value:

N/A

Example Requests

PUT https://{endpoint}/v6/93b9fc6ffc6a4edc9ab049c1f0dbec4b/api/pac/pipelines/f2286112591548af960ba8e80a92e0a1

{
  "name" : "NewPipeline-20240830100147",
  "description" : "",
  "push_to_repo" : false,
  "new_branch" : false,
  "selected_branch" : "master",
  "new_file" : false,
  "file_content" : "content",
  "create_pull_request" : false,
  "push_branch" : "",
  "commit_message" : "",
  "agency_name" : null
}

Example Responses

Status code: 200

OK

{
  "pipeline_id" : "f2286112591548af960ba8e80a92e0a1"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.