Updated on 2025-03-25 GMT+08:00

Creating a Parameter Group

Function

This API is used to create a parameter group.

Calling Method

For details, see Calling APIs.

URI

POST /v5/{project_id}/api/pipeline/variable/group/create

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Parameter description:

CodeArts project ID.

Constraints:

N/A.

Value Range:

The value contains 32 characters.

Default value:

N/A.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

projectId

Yes

String

Project ID.

name

Yes

String

Parameter group name.

description

No

String

Description.

variables

No

Array of variables objects

Parameter list.

Table 3 variables

Parameter

Mandatory

Type

Description

sequence

No

Integer

Parameter No.

name

No

String

Parameter name.

type

No

String

Parameter type.

value

No

String

Default parameter value.

description

No

String

Parameter description.

is_secret

No

Boolean

Whether the parameter is private.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

pipeline_variable_group_id

String

Parameter group ID.

Example Requests

POST https://(endpoint)/v5/e2e18230a85d4d6ab0b56cb6d2246c18/api/pipeline/variable/group/create

{
  "projectId" : "e2e18230a85d4d6ab0b56cb6d2246c18",
  "name" : "213",
  "description" : "",
  "variables" : [ {
    "sequence" : 1,
    "name" : "123",
    "type" : "string",
    "value" : "123",
    "description" : "123",
    "is_secret" : false
  } ]
}

Example Responses

Status code: 200

Response body.

{
  "pipeline_variable_group_id" : "66d40ba4e3da4505aaaf7e9de9860b6e"
}

Status Codes

Status Code

Description

200

Response body.

Error Codes

See Error Codes.