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.
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.
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 |
|---|---|---|---|
|
integer |
Yes |
Data source type code. Standard S3 fills in |
|
object |
Yes |
Connection information. Only fill in a set of configurations corresponding to |
|
object |
Yes |
Connection information for standard S3. |
|
string |
No |
S3 service endpoint. |
|
string |
Yes |
Access key ID. |
|
string |
Yes |
Access key. |
|
string |
Yes |
Bucket name or path prefix. |
|
string |
No |
The region where the bucket is located. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"valid": true
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
boolean |
Whether the current connection definition passes the verification. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "invalid connector parameters"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. Check this field first, then |
|
string |
Readable error message. |
Common HTTP errors¶
HTTP status |
Error code |
Common cause |
Recommended action |
|---|---|---|---|
200 |
|
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 |
|
Invalid request field, workspace, or operation precondition. |
Fix the request parameters and submit again. |
401 |
|
Missing or invalid authentication credentials. |
Check the credential type, expiration, and authentication header. |
403 |
|
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 |
|
The target object or required reference was not found. |
Verify the object identifier, workspace, and current status. |
409 |
|
Conflict in resource state, request payload, or concurrent modification. |
Re-read the current state and version, then handle according to the latest result. |
500 |
|
Internal processing failed; write operations may have been partially applied. |
Retain request and trace details, and verify the current state before retrying. |
503 |
|
A business, runtime, or authorization dependency is temporarily unavailable. |
After the dependency recovers, check existing results first instead of blindly repeating writes. |