Help Center/ CodeArts Repo/ API Reference/ APIs/ Group/ Creating a Repository Group
Updated on 2025-03-28 GMT+08:00

Creating a Repository Group

Function

Create a repository group.

URI

POST /v4/{project_id}/groups

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Name

parent_id

No

Integer

Parent repository group ID. If this parameter is left blank, a repository group is created under the project by default.

visibility

Yes

String

Repository visibility. The value can be private or public.

description

No

String

Description

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 201

Table 4 Response body parameters

Parameter

Type

Description

description

String

Description of repository group.

full_path

String

Repository group full name.

id

Integer

Repository group ID.

name

String

Error code.

visibility

String

Repository visibility. The value can be private or public.

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Response error.

error_msg

String

Response error.

Example Requests

POST https://{endpoint}/v4/{project_id}/groups

Example Responses

Status code: 201

OK
{
     "description": "groupDescription"
     "full_path": "41bcec7bf2c84efea690e987ca98ee40 / g22-8"
     "id": 2111667253
     "name": "groupName"
     "visibility": private
}

Status code: 401

Unauthorized

{
   "error_code": "DEV.00000003",
   "error_msg": "Authentication information expired"
}

Status Code

Status Code

Description

201

OK

401

Unauthorized

Error code.

See Error Codes.