Create a new registry
post
/api/v2/registries/
To create a new registry entry, you pass the properties of the new registry entry using the body of the request.
Request
Supported Media Types
- application/json
Body parameters
Security
-
Authorization: apiKey
Type:
apiKey
Response
Supported Media Types
- application/json
200 Response
200 Response
Default Response
Error Payload
Examples
The following example shows how to create a new registry. You perform this task by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the manager node for the Oracle Cloud Container instance. See Send Requests for the appropriate URL structure to use for Oracle Public Cloud.
cURL Command
curl -sk
-X "POST"
-H "Authorization: Bearer b39f09c71c297f1d"
"https://rest_server_url/api/v2/registries/"
-d '{"url":"docker.example.com",
"email":"me@example.com",
"username":"admin",
"password":"password",
"description":"My Example Registry"}'
Example of Response Body
{
"elapsed_time": 0.036365006000000005,
"registry": {
"registry_id": "5e8fb5828d48c61a",
"url": "docker.example.com",
"email": "me@oracle.com",
"username": "admin",
"password": "",
"description": "Oracle Example Registry"
},
"total_results": 1
}