Update connection

Update the metadata, endpoint, or credential configuration of the agent connection.

HTTP
PATCH $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/connections/{connection_id}

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 a personal access token and target workspace ID that can access the target workspace.

Request body

Shell
curl -X PATCH "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/connections/$CONNECTION_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "新的 MCP 服务"
  }'

Field

Type

Required

Description

name

string

No

Connection name.

description

string

No

Connection instructions.

status

string

No

Connection status.

kind

string

No

Connection type.

endpoint_uri

string

No

Connection service address.

auth_type

string

No

Authentication type.

credential_ref

string

No

Reference to saved credentials.

capabilities

array of string

No

List of connection capabilities.

owner_user_id

string

No

Connection owner user ID.

visibility

string

No

Visible range.

config

object

No

Connection configuration.

labels

object

No

label.

annotations

object

No

Note.

metadata

object

No

Extended metadata.

credential

object

No

Credentials, which can include bearer_token, api_key, basic_username, basic_password, or custom_headers.

Updates cannot change the connection type. The endpoint address, transport method, and authentication method collectively identify the MCP connection. After creation, this set of identifiers cannot be changed through this interface.

Successful response

JSON
{
  "code": 0,
  "data": {
    "id": "connection_01",
    "workspace_id": "workspace_example",
    "name": "新的 MCP 服务",
    "status": "draft",
    "kind": "mcp_server",
    "endpoint_uri": "https://mcp.example.com",
    "auth_type": "none",
    "visibility": "private",
    "version": 1,
    "created_at": "2026-10-14T00:00:00Z",
    "updated_at": "2026-10-14T00:00:00Z",
    "config": {
      "transport": "http-streaming"
    }
  }
}

Field

Type

Description

code

integer

0 when the request is processed successfully.

data

object

response data.

data.id

string

Connection ID.

data.workspace_id

string

The workspace ID to which it belongs.

data.name

string

Name.

data.description

string

Description. Can be omitted if not set.

data.status

string

Current status. Values: draft, active, disabled, archived.

data.kind

string

Connection type. Values: model_api, huggingface, mcp_server, http_api, external_drive, object_storage, database, webhook, channel.

data.endpoint_uri

string

Service endpoint address.

data.auth_type

string

Authentication method. Values: none, api_key, bearer_token, oauth2, basic, custom_headers, service_account, client_certificate.

data.credential_ref

string

A reference to a saved credential, not a clear-text key. Can be omitted if not set.

data.capabilities

array of string

List of available capabilities. Can be omitted if not set.

data.owner_user_id

string

The user ID to which it belongs. Can be omitted if not set.

data.visibility

string

Visible range. Value: private, workspace.

data.config

object

Non-sensitive configuration, fields vary with connection or channel type. Can be omitted if not set.

data.last_test_status

string

The most recent test status, either succeeded or failed. Can be omitted if not set. Value: succeeded, failed.

data.last_tested_at

string

The most recent test time, in RFC 3339 format. Can be omitted if not set.

data.last_test_error

string

Error description for recent tests. Can be omitted if not set.

data.version

integer

Current version number.

data.labels

object

Tag key-value pairs. Can be omitted if not set.

data.annotations

object

Extended annotations. Can be omitted if not set.

data.metadata

object

Extended metadata. Can be omitted if not set.

data.created_by

string

Creator ID. Can be omitted if not set.

data.updated_by

string

Last updated by identifier. Can be omitted if not set.

data.created_at

string

Creation time, in RFC 3339 format.

data.updated_at

string

Last updated in RFC 3339 format.

Error response

JSON
{
  "code": 5,
  "message": "connection not found"
}

Field

Type

Description

code

integer

error code.

message

string

Error message for the caller.

Last updated on