CreateRepositoryGroup

Updated at:

Create a code group.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /repository/groups/create HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

organizationId

string

Yes

The organization ID is a string that you can obtain from the Alibaba Cloud DevOps URL, such as https://devops.aliyun.com/organization/{OrganizationId}.

60de7a6852743a5162b5f957

accessToken

string

No

The personal access token. This parameter is not required if you authenticate using an Alibaba Cloud access key pair or Security Token Service (STS).

f0b1e61db5961df5975a93f9129d2513

body

object

Yes

The request body.

name

string

Yes

The name of the repository group.

test-create-group

path

string

Yes

The path of the repository group.

test-create-group

visibilityLevel

integer

Yes

The visibility level of the repository group.

  • 0: private

  • 10: internal

10

parentId

integer

Yes

The parent ID. If this parameter is omitted, the repository group is created at the root level.

26842

description

string

No

The description of the repository group.

描述信息的具体内容

avatarUrl

string

No

The URL of the avatar for the repository group.

https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100

Response elements

Element

Type

Description

Example

object

The response object.

requestId

string

The request ID.

F7B85D1B-D1C2-140F-A039-341859F130B9

errorMessage

string

The error message returned if the request fails.

""

errorCode

string

The error code returned if the request fails.

SYSTEM_UNKNOWN_ERROR

success

boolean

Indicates whether the request was successful.

true

result

object

The details of the created repository group.

id

integer

The ID of the repository group.

18685

name

string

The name of the repository group.

test-create-group

path

string

The path of the repository group.

test-create-group

description

string

The description of the repository group.

描述信息的具体内容

avatarUrl

string

The avatar URL of the repository group.

https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100

webUrl

string

The web URL of the repository group.

""

pathWithNamespace

string

The full path of the repository group, including the namespace.

codeup-test-org/test-create-group

nameWithNamespace

string

The full name of the repository group, including the namespace. The namespace and the group name are separated by a forward slash surrounded by spaces ( / ).

codeup-test-org / test-create-group (斜杠两侧有空格)

type

string

The type of the resource. The value is always Group.

Group

visibilityLevel

integer

The visibility level of the repository group.

  • 0: private

  • 10: internal

10

parentId

integer

The ID of the parent group.

26842

ownerId

integer

The ID of the user who owns the repository group.

19230

Examples

Success response

JSON format

{
  "requestId": "F7B85D1B-D1C2-140F-A039-341859F130B9",
  "errorMessage": "\"\"",
  "errorCode": "SYSTEM_UNKNOWN_ERROR",
  "success": true,
  "result": {
    "id": 18685,
    "name": "test-create-group",
    "path": "test-create-group",
    "description": "描述信息的具体内容",
    "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100",
    "webUrl": "\"\"",
    "pathWithNamespace": "codeup-test-org/test-create-group",
    "nameWithNamespace": "codeup-test-org / test-create-group (斜杠两侧有空格)",
    "type": "Group",
    "visibilityLevel": 10,
    "parentId": 26842,
    "ownerId": 19230
  }
}

Error codes

HTTP status code

Error code

Error message

Description

403 Forbidden.AccessDenied The user is not authorized to perform the operation. The user is not authorized to perform the operation.
403 Forbidden.UserNotInCurrentOrganization The user is not in the organization and is not authorized to perform the operation.
403 Forbidden.UserNotAdminOrOwner The current user is not an admin or owner in the organization and is not authorized to perform the operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.