Help Center> CodeArts Pipeline> API Reference> API> Manage by group> Move pipelines to a group in batches.
Updated on 2023-11-28 GMT+08:00

Move pipelines to a group in batches.

Function

Move pipelines to a group in batches.

URI

POST /v5/{project_id}/api/pipeline-group/pipeline/move

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. Can be obtained by calling the IAM API for obtaining the user token (the value of X-Subject-Token in the response header).

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

group_id

Yes

String

Group ID

pipelines

Yes

Array of pipelines objects

Pipeline Set

Table 4 pipelines

Parameter

Mandatory

Type

Description

pipeline_id

Yes

String

Pipeline ID.

pipeline_name

Yes

String

Pipeline name

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

[items]

Array of PipelineMoveToGroupResponseVo objects

OK

Table 6 PipelineMoveToGroupResponseVo

Parameter

Type

Description

code

String

Response code ["failed", "success"]

pipeline_id

String

Pipeline ID.

pipeline_name

String

Pipeline name

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Error Message

error_code

String

Error code.

Example Requests

POST https://{endpoint}/v5/d80a8a6530324b7bac972cbb8a9f28ec/api/pipeline-group/pipeline/move

{
  "group_id" : "2ca78947b25847a9ab68a07d8ef1347b",
  "pipelines" : [ {
    "pipeline_id" : "1ae88404911a4513bcdf8158ab6a0416",
    "pipeline_name" : "sdfgsdfgdfsg345345"
  }, {
    "pipeline_id" : "b99de7c698264251ac1fc3c053dc2b34",
    "pipeline_name" : "32131233131025122241"
  } ]
}

Example Responses

Status code: 200

OK

[ {
  "code" : "success",
  "pipeline_id" : "1ae88404911a4513bcdf8158ab6a0416",
  "pipeline_name" : "sdfgsdfgdfsg345345"
}, {
  "code" : "success",
  "pipeline_id" : "b99de7c698264251ac1fc3c053dc2b34",
  "pipeline_name" : "32131233131025122241"
} ]

Status Codes

Status Code

Description

200

OK

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.