diff --git a/specification/DigitalOcean-public.v2.yaml b/specification/DigitalOcean-public.v2.yaml index 76feb469f..53c807a85 100644 --- a/specification/DigitalOcean-public.v2.yaml +++ b/specification/DigitalOcean-public.v2.yaml @@ -1487,6 +1487,10 @@ paths: $ref: 'resources/registry/registry_delete.yml' /v2/registries: + get: + $ref: 'resources/registry/multiregistry_get_all.yml' + + /v2/registries/{registry_name}: get: $ref: 'resources/registry/multiregistry_get.yml' diff --git a/specification/resources/registry/examples/curl/all_registries_get.yml b/specification/resources/registry/examples/curl/all_registries_get.yml new file mode 100644 index 000000000..89ca32bd3 --- /dev/null +++ b/specification/resources/registry/examples/curl/all_registries_get.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X GET \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + "https://api.digitalocean.com/v2/registry" diff --git a/specification/resources/registry/multiregistry_create.yml b/specification/resources/registry/multiregistry_create.yml index f1244b38d..b771fe33a 100644 --- a/specification/resources/registry/multiregistry_create.yml +++ b/specification/resources/registry/multiregistry_create.yml @@ -38,7 +38,7 @@ responses: x-codeSamples: - $ref: 'examples/curl/multiregistry_create.yml' - - $ref: 'examples/python/multiregistry_create.yml' + # - $ref: 'examples/python/multiregistry_create.yml' security: - bearer_auth: diff --git a/specification/resources/registry/multiregistry_delete.yml b/specification/resources/registry/multiregistry_delete.yml index 6ca42756a..74db3be52 100644 --- a/specification/resources/registry/multiregistry_delete.yml +++ b/specification/resources/registry/multiregistry_delete.yml @@ -29,7 +29,7 @@ responses: x-codeSamples: - $ref: 'examples/curl/registry_delete.yml' - - $ref: 'examples/python/registry_delete.yml' + # - $ref: 'examples/python/registry_delete.yml' security: - bearer_auth: diff --git a/specification/resources/registry/multiregistry_get.yml b/specification/resources/registry/multiregistry_get.yml index ad37fd98c..455fdf30a 100644 --- a/specification/resources/registry/multiregistry_get.yml +++ b/specification/resources/registry/multiregistry_get.yml @@ -26,7 +26,7 @@ responses: x-codeSamples: - $ref: 'examples/curl/registry_get.yml' - - $ref: 'examples/python/registry_get.yml' + # - $ref: 'examples/python/registry_get.yml' security: - bearer_auth: diff --git a/specification/resources/registry/multiregistry_get_all.yml b/specification/resources/registry/multiregistry_get_all.yml new file mode 100644 index 000000000..9dde4e136 --- /dev/null +++ b/specification/resources/registry/multiregistry_get_all.yml @@ -0,0 +1,33 @@ +operationId: multiregistry_get_all + +summary: Get All Container Registries (Beta) + +description: To get information about any container registry in your account, send a GET + request to `/v2/registries/`. + +tags: + - Container Registry + +responses: + '200': + $ref: 'responses/all_registries_info.yml' + + '401': + $ref: '../../shared/responses/unauthorized.yml' + + '429': + $ref: '../../shared/responses/too_many_requests.yml' + + '500': + $ref: '../../shared/responses/server_error.yml' + + default: + $ref: '../../shared/responses/unexpected_error.yml' + +x-codeSamples: + - $ref: 'examples/curl/registry_get.yml' + - $ref: 'examples/python/registry_get.yml' + +security: + - bearer_auth: + - 'registry:read' diff --git a/specification/resources/registry/responses/all_registries_info.yml b/specification/resources/registry/responses/all_registries_info.yml new file mode 100644 index 000000000..c76dd2bf9 --- /dev/null +++ b/specification/resources/registry/responses/all_registries_info.yml @@ -0,0 +1,20 @@ +description: The response will be a JSON object with the key `registry` + containing information about your registry. + +headers: + ratelimit-limit: + $ref: '../../../shared/headers.yml#/ratelimit-limit' + ratelimit-remaining: + $ref: '../../../shared/headers.yml#/ratelimit-remaining' + ratelimit-reset: + $ref: '../../../shared/headers.yml#/ratelimit-reset' + +content: + application/json: + schema: + properties: + registry: + type: array + items: + oneOf: + - $ref: '../models/registry.yml'