Documentation Index

Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt

Use this file to discover all available pages before exploring further.

Register new registry

Prev Next

Available in Classic and VPC

Register a new registry in Container Registry that is integrated with storage.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /ncr/api/v2/repositories/{registry} (Korea Region)
POST /ncr/sgn-api/v2/repositories/{registry} (Singapore Region)
POST /ncr/jpn-api/v2/repositories/{registry} (Japan Region)

Request headers

For information about the headers common to all Container Registry APIs, see Container Registry request headers.

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
registry String Required Name of the registry to create

Request syntax

The request syntax is as follows:

{
  "bucket": "string",
  "storageType": "string"
}

Request body

You can include the following data in the body of your request:

Field Type Required Description
bucket String Optional Bucket name to integrate with the new registry
  • Duplicate use not allowed
  • Required if storageType is objectStorage
  • Not used if storageType is ncloudStorage
storageType String Optional Type of storage to be integrated with the new registry (default: objectStorage)

Request example

The request example is as follows:

curl -X POST 'https://ncr.apigw.ntruss.com/ncr/api/v2/repositories/{registry}' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Sub Account Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--data '{
  "bucket": "string",
  "storageType": "objectStorage"
}'

Response

This section describes the response format.

Response syntax

The response syntax is as follows:

{
  "returnCode": "string",
  "returnMessage": "string"
}

Response body

The response body includes the following data:

Field Type Required Description
returnCode String - Return code
returnMessage String - Return message

Response status codes

For information about the HTTP status codes common to all Container Registry APIs, see Container Registry response status codes.

Response example

The response example is as follows:

{
    "returnCode": "201",
    "returnMessage": "Registry Creation is successful"
}