Validate connector configuration

Verify a connector definition that has not been saved or edited. The verification only checks the current connection information and does not create or update the connector.

HTTP
POST $CLOUDSIGMA_API_BASE/connectors/validate

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Prepare the connection definition as required by Create Connector. Also prepare personal access token and target workspace ID that can access the target workspace.

Request body

Replace the connection information in $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, and examples with actual values.

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/connectors/validate" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d "{
    \"source_type\": 5,
    \"config\": {
      \"s3\": {
        \"endpoint\": \"$S3_ENDPOINT\",
        \"access_key_id\": \"$S3_ACCESS_KEY_ID\",
        \"access_key_secret\": \"$S3_ACCESS_KEY_SECRET\",
        \"bucket_name\": \"$S3_BUCKET_NAME\",
        \"region\": \"$S3_REGION\"
      }
    }
  }"

Parameter

Type

Required

Description

source_type

integer

Yes

Data source type code. Standard S3 fills in 5, and the configuration is written in config.s3.

config

object

Yes

Connection information. Only fill in a set of configurations corresponding to source_type.

config.s3

object

Yes

Connection information for standard S3.

config.s3.endpoint

string

No

S3 service endpoint.

config.s3.access_key_id

string

Yes

Access key ID.

config.s3.access_key_secret

string

Yes

Access key.

config.s3.bucket_name

string

Yes

Bucket name or path prefix.

config.s3.region

string

No

The region where the bucket is located.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "valid": true
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.valid

boolean

Whether the current connection definition passes the verification.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "invalid connector parameters"
}

Field

Type

Description

code

string

error code. Check this field first, then data.valid.

msg

string

Readable error message.

Common HTTP errors

HTTP status

Error code

Common cause

Recommended action

200

ErrServer

Business processing did not succeed; an HTTP 2xx status does not guarantee business success.

Inspect the business code and feature flags instead of relying on the HTTP status alone.

400

ErrParamInvalid, ErrWorkspaceRequired

Invalid request field, workspace, or operation precondition.

Fix the request parameters and submit again.

401

Unauthorized, ErrServiceUnavailable, ErrIAMExplicitRoleInvalid

Missing or invalid authentication credentials.

Check the credential type, expiration, and authentication header.

403

ErrForbidden

The current identity or active role does not have permission for this operation.

Use an authorized identity or contact an administrator to grant access.

404

ErrNotFound

The target object or required reference was not found.

Verify the object identifier, workspace, and current status.

409

ErrAlreadyExists, ErrConnectorInUse

Conflict in resource state, request payload, or concurrent modification.

Re-read the current state and version, then handle according to the latest result.

500

ErrServer

Internal processing failed; write operations may have been partially applied.

Retain request and trace details, and verify the current state before retrying.

503

ErrServiceUnavailable

A business, runtime, or authorization dependency is temporarily unavailable.

After the dependency recovers, check existing results first instead of blindly repeating writes.

Last updated on