Integrations /
Add registry
Required permission
Account > Credentials > General > Create
Request body
- {object}
name
string requiredName of the credentials.
min length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
string requiredDescription of the credentials.
max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$provider
string requiredThe registry provider associated with this set of credentials.
one ofdockerhub, gcr, gcr-eu, gcr-us, gitlab, github, customrestrictions
{object}Data about whether the credentials are restricted to certain projects.
restricted
booleanWhether the credentials are restricted to specific projects.
projects
[array]An array of projects the credentials are restricted to, if applicable.
- string
The id of the project.
pattern^[A-Za-z0-9-]+$ registryUrl
stringCustom url for the container registry. Only usable (and required) when
provider
iscustom
.username
string requiredUsername for the container registry.
password
string requiredPassword, Personal Access Token, or API key for the container registry.
- {object}
Authenticate with a
keyfile.json
. Used for authenticating with Google Container Registry. name
string requiredName of the credentials.
min length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
string requiredDescription of the credentials.
max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$provider
string requiredThe registry provider associated with this set of credentials.
one ofdockerhub, gcr, gcr-eu, gcr-us, gitlab, github, customrestrictions
{object}Data about whether the credentials are restricted to certain projects.
restricted
booleanWhether the credentials are restricted to specific projects.
projects
[array]An array of projects the credentials are restricted to, if applicable.
- string
The id of the project.
pattern^[A-Za-z0-9-]+$ registryUrl
stringCustom url for the container registry. Only usable (and required) when
provider
iscustom
.keyfile
{object} requiredContents of
keyfile.json
, used to authenticate with Google Container Registry.
- {object}
Validate with a docker config file.
name
string requiredName of the credentials.
min length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
string requiredDescription of the credentials.
max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$provider
string requiredThe registry provider associated with this set of credentials.
one ofdockerhub, gcr, gcr-eu, gcr-us, gitlab, github, customrestrictions
{object}Data about whether the credentials are restricted to certain projects.
restricted
booleanWhether the credentials are restricted to specific projects.
projects
[array]An array of projects the credentials are restricted to, if applicable.
- string
The id of the project.
pattern^[A-Za-z0-9-]+$ auths
{object} requiredThe
auths
data extracted from your Docker config file.
Response body
- {object}
Response object.
data
{object} requiredResult data.
id
string requiredIdentifier for the credentials.
name
string requiredName of the saved credentials.
description
string requiredDescription of the saved credentials.
restrictions
{object} requiredData about whether the credentials are restricted to certain projects.
restricted
boolean requiredWhether the credentials are restricted to specific projects.
projects
[array] requiredAn array of projects the credentials are restricted to, if applicable.
- string
The id of the project.
provider
string requiredThe registry provider associated with this set of credentials.
one ofdockerhub, gcr, gcr-eu, gcr-us, gitlab, github, custom
POST /v1/integrations/registries
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"Example Credentials","description":"This is a set of saved credentials.","provider":"dockerhub","restrictions":{"restricted":true,"projects":["default-project"]},"registryUrl":"https://example.com","username":"test-user","password":"password1234"}' \
https://api.northflank.com/v1/integrations/registries
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"Example Credentials","description":"This is a set of saved credentials.","provider":"dockerhub","restrictions":{"restricted":true,"projects":["default-project"]},"registryUrl":"https://example.com","keyfile":{"type":"service_account","project_id":"[PROJECT_ID]","private_key_id":"[KEY_ID]","private_key":"-----BEGIN PRIVATE KEY-----\n ... \n-----END PRIVATE KEY-----\n","client_email":"[SERVICE_ACCOUNT_EMAIL]","client_id":"[CLIENT_ID]","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/[SERVICE_ACCOUNT_EMAIL]"}}' \
https://api.northflank.com/v1/integrations/registries
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"Example Credentials","description":"This is a set of saved credentials.","provider":"dockerhub","restrictions":{"restricted":true,"projects":["default-project"]},"auths":{"https://index.docker.io/v1/":{"auth":"[YOUR AUTH KEY]"}}}' \
https://api.northflank.com/v1/integrations/registries
Example response
200 OK
JSON
{
"data": {
"id": "example-credentials",
"name": "Example Credentials",
"description": "This is a set of saved credentials.",
"restrictions": {
"restricted": true,
"projects": [
"default-project"
]
},
"provider": "dockerhub"
}
}