Creating a Repository Group
Function
Create a repository group.
URI
POST /v4/{project_id}/groups
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
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
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
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
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
{ "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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.