Update a Registry

Use this API to update an existing registry.

PUT/v1.3/registry/{registryId}

Request Body ParametersRequest Body Parameters

Parameter

Mandatory/Optional

Data Type

Description

ACR

connectorId

Mandatory 

string

Provide the ACR (Azure Container Registry) connector Id if your registry is hosted on Azure.

This parameter is required when the registryType is Azure and you want to update an ACR connector.

AWS

accountId

Mandatory 

string

Provide the AWS account Id if your registry is hosted on AWS.

Parameters accountId, arn, and region are required when the registryType is AWS ECR and you want to update an AWS connector.

arn

Mandatory 

string 

ARN number of the account ID. Specify the ARN if you want to use an existing AWS connector, or if you want to create a new connector.

region

Mandatory 

string 

Region where your AWS account belongs.

You must specify a US GovCloud region when accountType is US_Gov.

accountType

Mandatory 

string 

Specify the AWS account type as Global or US_Gov.

GCP

connectorId

Mandatory 

string

Provide the GCR connector Id if you registry is hosted on GCP.

Parameters connectorId, location, and projectId are required when the registryType is GCP and you want to update a GCR connector.

location

Mandatory 

string 

Location where your GCP account belong to.

projectId

Mandatory 

string

Your GCP project ID, which is alphanumeric.

GCAR

connectorId

Mandatory 

string

Provide the GCAR connector Id if your registry will be hosted on GCP.

Parameters connectorId, projectId, and registry are required when the registryType is GOOGLE_ARTIFACT_REGISTRY and you want to create a new GCAR connector.

projectId

Mandatory 

string

Your GCP project ID, which is alphanumeric (e.g. cs-registry).

registry

Mandatory 

string 

Name of the Google Artifact Registry repository (e.g. docker-v2-repo).

Others

accessToken - string

Access token to connect to the registry. This parameter is only applicable for JFrog Artifactory Private registry.

  • It is recommended to generate a never-expiring token.
  • If your token has expired, the authentication fails an error message.

username

Mandatory 

string

Username to connect to the registry.

Should be in base64 format.

password

Mandatory 

string

Password to connect to the registry.

Should be in base64 format.

credentialType

Mandatory 

string 

None, Token, BasicAuth, DockerHub, AWS, GCP.

This parameter is not required while creating Azure or GCP registries.

dockerHubOrgName

Optional

string

Organization name if the registryType is DockerHub.

registryName

Mandatory

string

Registry name should be alphanumeric character which can also include “-”, “_” and“.” upto 63 characters.

It is a mandatory field, it must be unique and no whitespace allowed.

registryType

Mandatory 

string 

AWS ECR, Azure, GCP, DockerHub, Docker V2, Docker V2-Private, GOOGLE_ARTIFACT_REGISTRY.

registryUri

Mandatory 

string 

URL of the registry to connect to.

registryUuid

Mandatory 

string 

UUID of the registry you are updating. This is a mandatory parameter.

SampleSample

API request

    curl -X PUT 
"<qualys_base_url>/csapi/v1.3/registry/b994c2e6-8961-4133-a889-662d8cf52310" 
-d "{"credential": {"username":"dXNlcm5hbWU=", "password":"cGFzc3dvcmQ="}, "credentialType":"BasicAuth", "registryName":"V2registry" "registryType":"V2", "registryUri":"https://383039876789.dkr.ecr.us-east-1.amazonaws.com"}" --header "Authorization: Bearer <token>"
    

Response

    Returns the same registry ID with response code 200.