Add a registry login for every environment of the organization. An environment's own login for the same registry wins.
const url = 'https://example.com/api/v1/registries';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","preset":"dockerhub","server":"example","username":"example","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/registries \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "preset": "dockerhub", "server": "example", "username": "example", "password": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”object
Unique in the organization: lowercase letters, digits and -.
Required unless the preset names its server.
A password or access token; write-only.
Responses
Section titled “Responses”An organization’s login for one registry, used by every environment without a login of its own for that registry. The password is never returned.
object
The registry as image references name it (ghcr.io, docker.io,
registry.example.com:5000).
Example
{ "preset": "dockerhub"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}The name or registry is taken
Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}