Validate Registry Parameters

Use this API to validate parameters for a registry you intend to create. You can validate if a registry already exists, whether AWS/Azure/GCP account ID exists, if the credentials provided are correct, and so on.

POST/v1.3/registry/validate

Request Body ParametersRequest Body Parameters

Parameter Mandatory/Optional Data Type Description
ACR
connectorId Mandatory  string Provide the ACR connector Id if your registry will be hosted on Azure.

This parameter is required when the registryType is Azure and you want to create a new ACR connector.

AWS
accountId Mandatory string Provide the AWS account Id if your registry will be hosted on AWS.

Parameters accountId, arn, and region are required when the registryType is AWS ECR and you want to create a new 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 belong to.
accountType Mandatory  string  Specify the AWS account type as Global or US_Gov.
GCP
connectorId Mandatory string Provide the GCR connector Id if your registry will be hosted on GCP.

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

location Mandatory  string  Location where your GCP account belongs 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
username Mandatory  string Username to connect to the registry.

It must be in base64 format.

password Mandatory string  Password to connect to the registry.

It must 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“.” up to 63 characters.

It is a mandatory field, it must be unique and whitespace is not 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 validating. Specify null if there is no registryUuid.

SampleSample

API request

    curl -X POST 
"<qualys_base_url>/csapi/v1.3/registry/validate" 
-d "{"aws": 
{"accountId":"<accountID>", "arn":"arn:aws:iam::383031258652:role/testabcd", 
"region":"us-east-2", 
"accountType":"Global"}, 
"credentialType":"AWS",
"registryName":"AWSregisry", 
"registryType":"AWS", 
"registryUri":"https://383031258652.dkr.ecr.us-east-2.amazonaws.com"}" --header "Authorization: Bearer <token>"
    

Response

    response code 200