Skip to main content
POST
/
organization
/
{organizationId}
/
containerRegistry
Create a container registry
curl --request POST \
  --url https://api.qovery.com/organization/{organizationId}/containerRegistry \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "config": {
    "access_key_id": "<string>",
    "secret_access_key": "<string>",
    "region": "<string>",
    "scaleway_access_key": "<string>",
    "scaleway_secret_key": "<string>",
    "scaleway_project_id": "<string>",
    "json_credentials": "<string>",
    "gcp_credentials_type": "workload_identity_federation",
    "project_id": "<string>",
    "service_account_email": "<string>",
    "workload_identity_provider_resource": "projects/123456789/locations/global/workloadIdentityPools/qovery-pool/providers/qovery-aws",
    "token_lifetime_seconds": 14400,
    "username": "<string>",
    "password": "<string>",
    "role_arn": "<string>",
    "azure_tenant_id": "<string>",
    "azure_subscription_id": "<string>"
  },
  "description": "<string>",
  "url": "<string>"
}
'
import requests

url = "https://api.qovery.com/organization/{organizationId}/containerRegistry"

payload = {
"name": "<string>",
"config": {
"access_key_id": "<string>",
"secret_access_key": "<string>",
"region": "<string>",
"scaleway_access_key": "<string>",
"scaleway_secret_key": "<string>",
"scaleway_project_id": "<string>",
"json_credentials": "<string>",
"gcp_credentials_type": "workload_identity_federation",
"project_id": "<string>",
"service_account_email": "<string>",
"workload_identity_provider_resource": "projects/123456789/locations/global/workloadIdentityPools/qovery-pool/providers/qovery-aws",
"token_lifetime_seconds": 14400,
"username": "<string>",
"password": "<string>",
"role_arn": "<string>",
"azure_tenant_id": "<string>",
"azure_subscription_id": "<string>"
},
"description": "<string>",
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
config: {
access_key_id: '<string>',
secret_access_key: '<string>',
region: '<string>',
scaleway_access_key: '<string>',
scaleway_secret_key: '<string>',
scaleway_project_id: '<string>',
json_credentials: '<string>',
gcp_credentials_type: 'workload_identity_federation',
project_id: '<string>',
service_account_email: '<string>',
workload_identity_provider_resource: 'projects/123456789/locations/global/workloadIdentityPools/qovery-pool/providers/qovery-aws',
token_lifetime_seconds: 14400,
username: '<string>',
password: '<string>',
role_arn: '<string>',
azure_tenant_id: '<string>',
azure_subscription_id: '<string>'
},
description: '<string>',
url: '<string>'
})
};

fetch('https://api.qovery.com/organization/{organizationId}/containerRegistry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qovery.com/organization/{organizationId}/containerRegistry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'config' => [
'access_key_id' => '<string>',
'secret_access_key' => '<string>',
'region' => '<string>',
'scaleway_access_key' => '<string>',
'scaleway_secret_key' => '<string>',
'scaleway_project_id' => '<string>',
'json_credentials' => '<string>',
'gcp_credentials_type' => 'workload_identity_federation',
'project_id' => '<string>',
'service_account_email' => '<string>',
'workload_identity_provider_resource' => 'projects/123456789/locations/global/workloadIdentityPools/qovery-pool/providers/qovery-aws',
'token_lifetime_seconds' => 14400,
'username' => '<string>',
'password' => '<string>',
'role_arn' => '<string>',
'azure_tenant_id' => '<string>',
'azure_subscription_id' => '<string>'
],
'description' => '<string>',
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.qovery.com/organization/{organizationId}/containerRegistry"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"config\": {\n \"access_key_id\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"region\": \"<string>\",\n \"scaleway_access_key\": \"<string>\",\n \"scaleway_secret_key\": \"<string>\",\n \"scaleway_project_id\": \"<string>\",\n \"json_credentials\": \"<string>\",\n \"gcp_credentials_type\": \"workload_identity_federation\",\n \"project_id\": \"<string>\",\n \"service_account_email\": \"<string>\",\n \"workload_identity_provider_resource\": \"projects/123456789/locations/global/workloadIdentityPools/qovery-pool/providers/qovery-aws\",\n \"token_lifetime_seconds\": 14400,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"role_arn\": \"<string>\",\n \"azure_tenant_id\": \"<string>\",\n \"azure_subscription_id\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"url\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.qovery.com/organization/{organizationId}/containerRegistry")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"config\": {\n \"access_key_id\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"region\": \"<string>\",\n \"scaleway_access_key\": \"<string>\",\n \"scaleway_secret_key\": \"<string>\",\n \"scaleway_project_id\": \"<string>\",\n \"json_credentials\": \"<string>\",\n \"gcp_credentials_type\": \"workload_identity_federation\",\n \"project_id\": \"<string>\",\n \"service_account_email\": \"<string>\",\n \"workload_identity_provider_resource\": \"projects/123456789/locations/global/workloadIdentityPools/qovery-pool/providers/qovery-aws\",\n \"token_lifetime_seconds\": 14400,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"role_arn\": \"<string>\",\n \"azure_tenant_id\": \"<string>\",\n \"azure_subscription_id\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"url\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.qovery.com/organization/{organizationId}/containerRegistry")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"config\": {\n \"access_key_id\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"region\": \"<string>\",\n \"scaleway_access_key\": \"<string>\",\n \"scaleway_secret_key\": \"<string>\",\n \"scaleway_project_id\": \"<string>\",\n \"json_credentials\": \"<string>\",\n \"gcp_credentials_type\": \"workload_identity_federation\",\n \"project_id\": \"<string>\",\n \"service_account_email\": \"<string>\",\n \"workload_identity_provider_resource\": \"projects/123456789/locations/global/workloadIdentityPools/qovery-pool/providers/qovery-aws\",\n \"token_lifetime_seconds\": 14400,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"role_arn\": \"<string>\",\n \"azure_tenant_id\": \"<string>\",\n \"azure_subscription_id\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"url\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "description": "<string>",
  "url": "<string>",
  "cluster": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>"
  },
  "associated_services_count": 123,
  "config": {
    "username": "<string>",
    "region": "<string>",
    "scaleway_access_key": "<string>",
    "scaleway_project_id": "<string>",
    "access_key_id": "<string>",
    "role_arn": "<string>",
    "gcp_credentials_type": "workload_identity_federation",
    "project_id": "<string>",
    "service_account_email": "<string>",
    "workload_identity_provider_resource": "<string>",
    "token_lifetime_seconds": 14400,
    "azure_tenant_id": "<string>",
    "azure_subscription_id": "<string>",
    "azure_application_id": "<string>",
    "azure_application_object_id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

JWT tokens should be used with OIDC account (human to machine). JWT tokens used by the Qovery console to communicate with the API have a TTL. Curl Example ' curl https://console.qovery.com/organization -H "Authorization: Bearer $qovery_token" '

Path Parameters

organizationId
string<uuid>
required

Organization ID

Body

application/json
name
string
required
kind
enum<string>
required

The type of your container registry

Available options:
ECR,
SCALEWAY_CR,
DOCKER_HUB,
GITHUB_CR,
GITHUB_ENTERPRISE_CR,
GITLAB_CR,
PUBLIC_ECR,
DOCR,
GENERIC_CR,
GCP_ARTIFACT_REGISTRY,
AZURE_CR
config
object
required

This field is dependent of the container registry kind:

  • ECR needs in the config: region, access_key_id, secret_access_key
  • SCALEWAY_CR needs in the config: region, scaleway_access_key, scaleway_secret_key
  • GCP_ARTIFACT_REGISTRY needs in the config: region, json_credentials
  • DOCKER_HUB needs in the config (optional): username, password
  • GITHUB_CR needs in the config (optional): username, password
  • GITLAB_CR needs in the config (optional): username, password
  • PUBLIC_ECR doesn't need credentials info
  • GENERIC_CR needs in the config (optional): username, password
  • DOCR is not supported anymore
description
string
url
string<uri>

URL of the container registry:

  • For DOCKER_HUB: it must be https://docker.io (default with 'https://docker.io' if no url provided for DOCKER_HUB)
  • For GITHUB_CR: it must be https://ghcr.io (default with 'https://ghcr.io' if no url provided for GITHUB_CR)
  • For GITLAB_CR: it must be https://registry.gitlab.com (default with 'https://registry.gitlab.com' if no url provided for GITLAB_CR)
  • For others: it's required and must start by https://

Response

Create a Container Registry

id
string<uuid>
required
read-only
created_at
string<date-time>
required
read-only
updated_at
string<date-time>
read-only
name
string
kind
enum<string>

The type of your container registry

Available options:
ECR,
SCALEWAY_CR,
DOCKER_HUB,
GITHUB_CR,
GITHUB_ENTERPRISE_CR,
GITLAB_CR,
PUBLIC_ECR,
DOCR,
GENERIC_CR,
GCP_ARTIFACT_REGISTRY,
AZURE_CR
description
string
url
string

URL of the container registry

cluster
object
associated_services_count
integer

The number of services using this container registry

config
object