Update a registry connector

Cortex XSIAM Platform APIs

put /public_api/v1/cwp/registry_onboarding/instances/{connectorID}

Updates the attributes of an existing registry connector identified by its unique ID.

Required license:

Cortex Cloud Posture Management or Cortex Cloud Runtime Security.

Path parameters
connectorID String required

The unique identifier for the connector.

Example: connectorID_example
Request headers
Authentication String required

{api_key}

Example: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP
x-xdr-auth-id String required

{api_key_id}

Example: 241
CLIENT REQUEST
curl -X 'PUT'
-H 'Accept: application/json,application/json; charset=UTF-8'
-H 'Content-Type: application/json'
-H 'Authentication: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP' -H 'x-xdr-auth-id: 241'
'https://api-yourfqdn/public_api/v1/cwp/registry_onboarding/instances/{connectorID}'
-d '{ "ca_certificate" : "ca_certificate", "tenant_id" : "tenant_id", "allow_static_ips" : true, "repository" : "repository", "enabled" : true, "password" : "password", "filter_type" : "", "initial_scan_configuration" : { "mode" : "TAGS_MODIFIED_DAYS", "numDays" : 7 }, "outpost_id" : "outpost_id", "ip_identifier" : "ip_identifier", "broker_id" : "broker_id", "asset_scope_filters" : { "AND" : [ null, null ] }, "url" : "url", "insecure_pull" : true, "connector_id" : "connector_id", "name" : "name", "broker_type" : "", "auth_token" : "auth_token", "region" : "region", "vendor_specific_configuration" : { "group_ids" : "group_ids", "api_domain_name" : "api_domain_name", "project_ids" : "project_ids" }, "username" : "username" }'
import http.client conn = http.client.HTTPSConnection("api-yourfqdn") payload = "{\"connector_id\":\"string\",\"vendor\":\"DOCKER\",\"name\":\"string\",\"enabled\":true,\"url\":\"string\",\"username\":\"string\",\"password\":\"string\",\"auth_token\":\"string\",\"scanning_mode\":\"CLOUD\",\"cloud_provider\":\"AWS\",\"outpost_id\":\"string\",\"region\":\"string\",\"insecure_pull\":true,\"ca_certificate\":\"string\",\"repository\":\"string\",\"initial_scan_configuration\":{\"mode\":\"TAGS_MODIFIED_DAYS\",\"numDays\":7},\"allow_static_ips\":true,\"ip_identifier\":\"string\",\"asset_scope_filters\":{\"AND\":[{\"AND\":[null]}]},\"registry_type\":\"CLOUD_HOSTED\",\"tenant_id\":\"string\",\"broker_type\":\"BROKER_VM\",\"broker_id\":\"string\",\"filter_type\":\"INCLUDE\",\"vendor_specific_configuration\":{\"group_ids\":\"string\",\"project_ids\":\"string\",\"api_domain_name\":\"string\"}}" headers = { 'Authentication': "UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP", 'x-xdr-auth-id': "241", 'content-type': "application/json" } conn.request("PUT", "/public_api/v1/cwp/registry_onboarding/instances/%7BconnectorID%7D", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
require 'uri' require 'net/http' require 'openssl' url = URI("https://api-yourfqdn/public_api/v1/cwp/registry_onboarding/instances/%7BconnectorID%7D") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Put.new(url) request["Authentication"] = 'UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP' request["x-xdr-auth-id"] = '241' request["content-type"] = 'application/json' request.body = "{\"connector_id\":\"string\",\"vendor\":\"DOCKER\",\"name\":\"string\",\"enabled\":true,\"url\":\"string\",\"username\":\"string\",\"password\":\"string\",\"auth_token\":\"string\",\"scanning_mode\":\"CLOUD\",\"cloud_provider\":\"AWS\",\"outpost_id\":\"string\",\"region\":\"string\",\"insecure_pull\":true,\"ca_certificate\":\"string\",\"repository\":\"string\",\"initial_scan_configuration\":{\"mode\":\"TAGS_MODIFIED_DAYS\",\"numDays\":7},\"allow_static_ips\":true,\"ip_identifier\":\"string\",\"asset_scope_filters\":{\"AND\":[{\"AND\":[null]}]},\"registry_type\":\"CLOUD_HOSTED\",\"tenant_id\":\"string\",\"broker_type\":\"BROKER_VM\",\"broker_id\":\"string\",\"filter_type\":\"INCLUDE\",\"vendor_specific_configuration\":{\"group_ids\":\"string\",\"project_ids\":\"string\",\"api_domain_name\":\"string\"}}" response = http.request(request) puts response.read_body
const data = JSON.stringify({ "connector_id": "string", "vendor": "DOCKER", "name": "string", "enabled": true, "url": "string", "username": "string", "password": "string", "auth_token": "string", "scanning_mode": "CLOUD", "cloud_provider": "AWS", "outpost_id": "string", "region": "string", "insecure_pull": true, "ca_certificate": "string", "repository": "string", "initial_scan_configuration": { "mode": "TAGS_MODIFIED_DAYS", "numDays": 7 }, "allow_static_ips": true, "ip_identifier": "string", "asset_scope_filters": { "AND": [ { "AND": [ null ] } ] }, "registry_type": "CLOUD_HOSTED", "tenant_id": "string", "broker_type": "BROKER_VM", "broker_id": "string", "filter_type": "INCLUDE", "vendor_specific_configuration": { "group_ids": "string", "project_ids": "string", "api_domain_name": "string" } }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("PUT", "https://api-yourfqdn/public_api/v1/cwp/registry_onboarding/instances/%7BconnectorID%7D"); xhr.setRequestHeader("Authentication", "UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP"); xhr.setRequestHeader("x-xdr-auth-id", "241"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
HttpResponse<String> response = Unirest.put("https://api-yourfqdn/public_api/v1/cwp/registry_onboarding/instances/%7BconnectorID%7D") .header("Authentication", "UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP") .header("x-xdr-auth-id", "241") .header("content-type", "application/json") .body("{\"connector_id\":\"string\",\"vendor\":\"DOCKER\",\"name\":\"string\",\"enabled\":true,\"url\":\"string\",\"username\":\"string\",\"password\":\"string\",\"auth_token\":\"string\",\"scanning_mode\":\"CLOUD\",\"cloud_provider\":\"AWS\",\"outpost_id\":\"string\",\"region\":\"string\",\"insecure_pull\":true,\"ca_certificate\":\"string\",\"repository\":\"string\",\"initial_scan_configuration\":{\"mode\":\"TAGS_MODIFIED_DAYS\",\"numDays\":7},\"allow_static_ips\":true,\"ip_identifier\":\"string\",\"asset_scope_filters\":{\"AND\":[{\"AND\":[null]}]},\"registry_type\":\"CLOUD_HOSTED\",\"tenant_id\":\"string\",\"broker_type\":\"BROKER_VM\",\"broker_id\":\"string\",\"filter_type\":\"INCLUDE\",\"vendor_specific_configuration\":{\"group_ids\":\"string\",\"project_ids\":\"string\",\"api_domain_name\":\"string\"}}") .asString();
import Foundation let headers = [ "Authentication": "UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP", "x-xdr-auth-id": "241", "content-type": "application/json" ] let parameters = [ "connector_id": "string", "vendor": "DOCKER", "name": "string", "enabled": true, "url": "string", "username": "string", "password": "string", "auth_token": "string", "scanning_mode": "CLOUD", "cloud_provider": "AWS", "outpost_id": "string", "region": "string", "insecure_pull": true, "ca_certificate": "string", "repository": "string", "initial_scan_configuration": [ "mode": "TAGS_MODIFIED_DAYS", "numDays": 7 ], "allow_static_ips": true, "ip_identifier": "string", "asset_scope_filters": ["AND": [["AND": []]]], "registry_type": "CLOUD_HOSTED", "tenant_id": "string", "broker_type": "BROKER_VM", "broker_id": "string", "filter_type": "INCLUDE", "vendor_specific_configuration": [ "group_ids": "string", "project_ids": "string", "api_domain_name": "string" ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-yourfqdn/public_api/v1/cwp/registry_onboarding/instances/%7BconnectorID%7D")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume()
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api-yourfqdn/public_api/v1/cwp/registry_onboarding/instances/%7BconnectorID%7D", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => "{\"connector_id\":\"string\",\"vendor\":\"DOCKER\",\"name\":\"string\",\"enabled\":true,\"url\":\"string\",\"username\":\"string\",\"password\":\"string\",\"auth_token\":\"string\",\"scanning_mode\":\"CLOUD\",\"cloud_provider\":\"AWS\",\"outpost_id\":\"string\",\"region\":\"string\",\"insecure_pull\":true,\"ca_certificate\":\"string\",\"repository\":\"string\",\"initial_scan_configuration\":{\"mode\":\"TAGS_MODIFIED_DAYS\",\"numDays\":7},\"allow_static_ips\":true,\"ip_identifier\":\"string\",\"asset_scope_filters\":{\"AND\":[{\"AND\":[null]}]},\"registry_type\":\"CLOUD_HOSTED\",\"tenant_id\":\"string\",\"broker_type\":\"BROKER_VM\",\"broker_id\":\"string\",\"filter_type\":\"INCLUDE\",\"vendor_specific_configuration\":{\"group_ids\":\"string\",\"project_ids\":\"string\",\"api_domain_name\":\"string\"}}", CURLOPT_HTTPHEADER => [ "Authentication: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP", "content-type: application/json", "x-xdr-auth-id: 241" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT"); curl_easy_setopt(hnd, CURLOPT_URL, "https://api-yourfqdn/public_api/v1/cwp/registry_onboarding/instances/%7BconnectorID%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authentication: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP"); headers = curl_slist_append(headers, "x-xdr-auth-id: 241"); headers = curl_slist_append(headers, "content-type: application/json"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"connector_id\":\"string\",\"vendor\":\"DOCKER\",\"name\":\"string\",\"enabled\":true,\"url\":\"string\",\"username\":\"string\",\"password\":\"string\",\"auth_token\":\"string\",\"scanning_mode\":\"CLOUD\",\"cloud_provider\":\"AWS\",\"outpost_id\":\"string\",\"region\":\"string\",\"insecure_pull\":true,\"ca_certificate\":\"string\",\"repository\":\"string\",\"initial_scan_configuration\":{\"mode\":\"TAGS_MODIFIED_DAYS\",\"numDays\":7},\"allow_static_ips\":true,\"ip_identifier\":\"string\",\"asset_scope_filters\":{\"AND\":[{\"AND\":[null]}]},\"registry_type\":\"CLOUD_HOSTED\",\"tenant_id\":\"string\",\"broker_type\":\"BROKER_VM\",\"broker_id\":\"string\",\"filter_type\":\"INCLUDE\",\"vendor_specific_configuration\":{\"group_ids\":\"string\",\"project_ids\":\"string\",\"api_domain_name\":\"string\"}}"); CURLcode ret = curl_easy_perform(hnd);
var client = new RestClient("https://api-yourfqdn/public_api/v1/cwp/registry_onboarding/instances/%7BconnectorID%7D"); var request = new RestRequest(Method.PUT); request.AddHeader("Authentication", "UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP"); request.AddHeader("x-xdr-auth-id", "241"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"connector_id\":\"string\",\"vendor\":\"DOCKER\",\"name\":\"string\",\"enabled\":true,\"url\":\"string\",\"username\":\"string\",\"password\":\"string\",\"auth_token\":\"string\",\"scanning_mode\":\"CLOUD\",\"cloud_provider\":\"AWS\",\"outpost_id\":\"string\",\"region\":\"string\",\"insecure_pull\":true,\"ca_certificate\":\"string\",\"repository\":\"string\",\"initial_scan_configuration\":{\"mode\":\"TAGS_MODIFIED_DAYS\",\"numDays\":7},\"allow_static_ips\":true,\"ip_identifier\":\"string\",\"asset_scope_filters\":{\"AND\":[{\"AND\":[null]}]},\"registry_type\":\"CLOUD_HOSTED\",\"tenant_id\":\"string\",\"broker_type\":\"BROKER_VM\",\"broker_id\":\"string\",\"filter_type\":\"INCLUDE\",\"vendor_specific_configuration\":{\"group_ids\":\"string\",\"project_ids\":\"string\",\"api_domain_name\":\"string\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
Body parameters
required
application/json
connector_idstring

The connector ID.

vendorstring (Enum)required

Name of the registry vendor.

Allowed values:"DOCKER""JFROG""SONATYPE""DOCKER_HUB""HARBOR""GITLAB_CONTAINER_REGISTRY""OPENSHIFT"
namestringrequired

Name of the registry connector.

enabledboolean

Indicates whether the connector is enabled.

Default:true
urlstringrequired

The URL of the registry.

usernamestringrequired

The username for authentication.

passwordstringrequired

The password for authentication.

auth_tokenstringrequired

Token to authenticate the request.

scanning_modestring (Enum)required

The scanning mode used by the connector

Allowed values:"CLOUD""OUTPOST""BROKER""NOT_APPLICABLE""KAPI"
cloud_providerstring (Enum)

Specifies the cloud provider for the Cortex environment to use for registry scanning.

Allowed values:"AWS""GCP""AZURE"
outpost_idstring

The outpost ID.

regionstringrequired

Specifies the region to use for registry scanning. As a best practice, choose the region closest to your registry deployment to achieve the best scanning throughput and potentially reduce cloud costs.

insecure_pullbooleanrequired

When set to true, allows image pulls from insecure registries.

ca_certificatestring

Optional. The CA certificate used for authentication.

repositorystring

Optional. The repository used for image discovery.

initial_scan_configurationobjectrequired
modestring (Enum)

Specifies the initial scan configuration mode.

  • ALL — Scans all container images, including every tag, in all discovered repositories.
  • LATEST_TAG — Scans only images tagged as latest in all discovered repositories.
  • TAGS_MODIFIED_DAYS — Scans images in each repository modified within the last X days, where X is set via an argument. You can select a range of up to 90 days for the scan.
Example:"TAGS_MODIFIED_DAYS"
Default:"ALL"
Allowed values:"ALL""LATEST_TAG""TAGS_MODIFIED_DAYS"
numDaysinteger

Number of days for the scan mode lastNDays

Example:7
allow_static_ipsboolean

Optional. Indicates whether static IP addresses are allowed.

ip_identifierstring

Optional. The identifier associated with the IP address.

asset_scope_filtersobject

Defines the type of assets to be filtered (the scope). You can combine multiple conditions to create complex rules for when the asset filter should be applied.

ANDarray
[
ANDarray
Recursive model
ORarray
Recursive model
SEARCH_FIELDstring

Defines the Field to be searched.

Example:"Registry"
SEARCH_TYPEstring

Defines the comparison operator to use for this filter.

Example:"EQ"
SEARCH_VALUEstring

Defines the value to be searched.

Example:"library/ubuntu"
]
ORarray
[
ANDarray
Recursive model
ORarray
Recursive model
SEARCH_FIELDstring

Defines the Field to be searched.

Example:"Registry"
SEARCH_TYPEstring

Defines the comparison operator to use for this filter.

Example:"EQ"
SEARCH_VALUEstring

Defines the value to be searched.

Example:"library/ubuntu"
]
SEARCH_FIELDstring

Defines the Field to be searched.

Example:"Registry"
SEARCH_TYPEstring

Defines the comparison operator to use for this filter.

Example:"EQ"
SEARCH_VALUEstring

Defines the value to be searched.

Example:"library/ubuntu"
registry_typestring (Enum)

The type of registry.

Allowed values:"CLOUD_HOSTED""SELF_HOSTED"
tenant_idstring

The tenant ID

broker_typeobject
string (Enum)

Indicates the Broker VM type used by the Outpost.

Allowed values:"BROKER_VM""BROKER_CLUSTER"
broker_idstring

The broker ID.

filter_typeobject

Controls whether asset_scope_filters act as an inclusion or exclusion filter.

Default:"INCLUDE"
string (Enum)

Controls whether asset_scope_filters act as an inclusion or exclusion filter.

Default:"INCLUDE"
Allowed values:"INCLUDE""EXCLUDE"
vendor_specific_configurationobject

Vendor specific configuration options for scanning.

group_idsstring

Optional. The group IDs to scan.

project_idsstring

Optional. The project IDs to scan.

api_domain_namestring

Optional. The API domain name to use for the scan.

repositorystring

Optional. The Docker Hub repository to scan.

Example:"my-repo"
cluster_idstring

The unique identifier of the OpenShift cluster.

cluster_namestring

The name of the OpenShift cluster.

cluster_asset_idstring

The asset ID associated with the cluster.

cluster_asset_type_idstring

The asset type ID of the cluster.

cluster_realmstring

The realm or environment in which the cluster resides.

REQUEST
{ "connector_id": "example", "vendor": "DOCKER", "name": "example", "enabled": false, "url": "example", "username": "example", "password": "example", "auth_token": "example", "scanning_mode": "CLOUD", "cloud_provider": "AWS", "outpost_id": "example", "region": "example", "insecure_pull": false, "ca_certificate": "example", "repository": "example", "initial_scan_configuration": { "mode": "TAGS_MODIFIED_DAYS", "numDays": 7 }, "allow_static_ips": false, "ip_identifier": "example", "asset_scope_filters": { "AND": [ { "AND": [ {} ] } ] }, "registry_type": "CLOUD_HOSTED", "tenant_id": "example", "broker_type": "BROKER_VM", "broker_id": "example", "filter_type": "INCLUDE", "vendor_specific_configuration": { "group_ids": "example", "project_ids": "example", "api_domain_name": "example" } }
{ "connector_id": "example", "vendor": "DOCKER", "name": "example", "enabled": false, "url": "example", "username": "example", "password": "example", "auth_token": "example", "scanning_mode": "CLOUD", "cloud_provider": "AWS", "outpost_id": "example", "region": "example", "insecure_pull": false, "ca_certificate": "example", "repository": "example", "initial_scan_configuration": { "mode": "TAGS_MODIFIED_DAYS", "numDays": 7 }, "allow_static_ips": false, "ip_identifier": "example", "asset_scope_filters": { "SEARCH_FIELD": "Registry", "SEARCH_TYPE": "EQ", "SEARCH_VALUE": "library/ubuntu" }, "registry_type": "CLOUD_HOSTED", "tenant_id": "example", "broker_type": "BROKER_VM", "broker_id": "example", "filter_type": "INCLUDE", "vendor_specific_configuration": { "group_ids": "example", "project_ids": "example", "api_domain_name": "example" } }
Responses

Connector details have been updated successfully.

Body
application/json
connector_idstringrequired
RESPONSE
{ "connector_id": "example" }

Client error

Body
application/json; charset=UTF-8
err_msgstringrequired

The error message

metadataobject

Details for the PublicAPIError

codestring (Enum)required

A short, programmatically safe string indicating the error code reported

Example:"NOT_FOUND"
Allowed values:"BAD_REQUEST""INTERNAL_ERROR""NOT_FOUND""FORBIDDEN"
RESPONSE
[application/json; charset=UTF-8 content]

Connector ID not found

Body
application/json; charset=UTF-8
err_msgstringrequired

The error message

metadataobject

Details for the PublicAPIError

codestring (Enum)required

A short, programmatically safe string indicating the error code reported

Example:"NOT_FOUND"
Allowed values:"BAD_REQUEST""INTERNAL_ERROR""NOT_FOUND""FORBIDDEN"
RESPONSE
[application/json; charset=UTF-8 content]

Service had unexpected internal error

Body
application/json; charset=UTF-8
err_msgstringrequired

The error message

metadataobject

Details for the PublicAPIError

codestring (Enum)required

A short, programmatically safe string indicating the error code reported

Example:"NOT_FOUND"
Allowed values:"BAD_REQUEST""INTERNAL_ERROR""NOT_FOUND""FORBIDDEN"
RESPONSE
[application/json; charset=UTF-8 content]