Creates a repository.

Request information

Request line

PUT /repos HTTP/1.1

Request line parameters

None.

Operation-specific request headers

None.

Request body

Request Body:

{
       "Repo": {
           "RepoNamespace": "String" //This parameter is required. The value must be 2 to 30 characters in length.
           "RepoName": "String" //This parameter is required. The value must be 2 to 30 characters in length.
           "Summary": "String" //This parameter is required. The value must be 1 to 100 characters in length.
           "Detail": "String" //This parameter is optional. The value of the parameter cannot exceed 2,000 characters in length. The Markdown syntax is supported.
           "RepoType": "String" //This parameter is required. Valid values: PRIVATE and PUBLIC.
       }
   }

Request body parameters

Parameter Type Required Description
RepoNamespace String Yes The namespace to which the repository belongs. The name of the namespace must be 2 to 30 characters in length, and can contain lowercase letters, digits, hyphens (-), and underscores (_). It must not start with a hyphen or an underscore.
RepoName String Yes The name of the repository. The name must be 1 to 64 characters in length, and can contain lowercase letters, digits, hyphens (-), and underscores (_). It must not start with a hyphen or an underscore.
Summary String Yes The summary of the repository. The summary must be 1 to 100 characters in length.
Detail String No The detailed information about the repository. The Markdown syntax is supported. The value of this parameter cannot exceed 2,000 characters in length.
RepoType String Yes The type of repository. Valid values: PRIVATE and PUBLIC. Public repositories support anonymous downloads. To download images from a private repository, log on to the Container Registry console.

Response information

Response line
HTTP/1.1 200 OK

Operation-specific response headers

None.

Response body

{
    "data": {},
    "requestId": "String"
}

Examples

Sample requests

PUT /repos HTTP/1.1
<Common request headers>

{
    "repo": {
        "RepoNamespace": "aliyun",
        "RepoName": "Tengine",
        "Summary": "This is Aliyun Nginx",
        "RepoType": "PUBLIC"
    }
}

Sample responses

HTTP/1.1 200 OK
<Common response headers>

{
    "data": {},
    "requestId": "80705201-FE46-4C08-AE30-FD50F5930993"
}