Connections
Choisissez votre langage :
A connection describes how Mankinds calls a system endpoint.
client.connections.create(systemId, ...)
Create a callable target connection for a system.
| SDK | client.connections.create(system_id, config, name="Default", is_default=True, idempotency_key=None) |
|---|---|
| Retourne | SystemConnection |
Parameters:
| Emplacement | Paramètre | Type | Requis | Description |
|---|---|---|---|---|
| Path | system_id | string | Requis | System UUID. |
| Body | name | string | Requis | Connection name, 1 to 120 characters. |
| Body | config | SystemEndpointConfig | Requis | Endpoint call configuration. |
| Body | is_default | boolean | Optionnel | Whether this connection becomes the default connection. JavaScript leaves it false when omitted; Python sends true by default. |
| SDK option | idempotency_key | string | Optionnel | Sent as the Idempotency-Key header. |
Endpoint config fields:
| Field | Type | Description |
|---|---|---|
connector_type | string | Connector implementation, for example custom_api. |
url | string | Target endpoint URL. |
method | string | HTTP method. Default is POST. |
headers | object | Request headers. Sensitive values are redacted when read back. |
body | object | Request body template. |
input_path | string | Field used to inject the test input. |
output_path | string | Field used to read the model response. |
response_body | object | Optional response body configuration. |
streaming | object | Streaming configuration. |
multiturn | object | Multi-turn/session configuration. |
session | object | Session handling configuration. |
config | object | Connector-specific configuration. |
provider_config | object | Provider-specific configuration. |
In JavaScript, passing a raw endpoint config instead of { name, config } creates a connection named Default and sets it as default.
client.connections.list(systemId)
List all connections for a system.
| SDK | client.connections.list(system_id) |
|---|---|
| Retourne | SystemConnection[] |
Parameters:
| Emplacement | Paramètre | Type | Requis | Description |
|---|---|---|---|---|
| Path | system_id | string | Requis | System UUID. |
client.connections.test(connectionId)
Test whether a connection can be called by Mankinds.
| SDK | client.connections.test(connection_id) |
|---|---|
| Retourne | ConnectionTestResult |
Parameters:
| Emplacement | Paramètre | Type | Requis | Description |
|---|---|---|---|---|
| Path | connection_id | string | Requis | Connection UUID. |
client.connections.setDefault(connectionId)
Set one connection as the system default.
| SDK | client.connections.set_default(connection_id) |
|---|---|
| Retourne | SystemConnection |
Parameters:
| Emplacement | Paramètre | Type | Requis | Description |
|---|---|---|---|---|
| Path | connection_id | string | Requis | Connection UUID. |
Cette page vous a été utile ?