Databases and private networks.
Context4 data-source connections and private networks: schema discovery, network attachments and access management through the API.
Generated from the public Context4 OpenAPI. Authenticate with Authorization: Bearer and an API key. General rules: API. Full contract: OpenAPI JSON. In the JSON below, $ref points to a named schema in the Schemas section.
setNetworkAttachmentConnectivity
PATCH /v1/network-attachments/{networkAttachmentId}/connectivity
Deployment URL: https://ctx4.me/v1/network-attachments/{networkAttachmentId}/connectivity. Replace parameters in braces with actual IDs from the API.
Disconnect or reconnect a private-network attachment
Capability: connections:write.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
networkAttachmentId | path | yes | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Request body
Required.
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"expected_version": {
"type": "integer",
"exclusiveMinimum": 0
},
"enabled": {
"type": "boolean"
}
},
"required": [
"expected_version",
"enabled"
],
"additionalProperties": false
}
}
}
}Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Persisted connectivity intent; status reason reports operator acknowledgement | application/json NetworkAttachment |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing) | application/problem+json Problem |
| 404 | Problem (not_found) | application/problem+json Problem |
| 409 | Problem (conflict) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}listNetworkAttachments
GET /v1/network-attachments
Deployment URL: https://ctx4.me/v1/network-attachments. Replace parameters in braces with actual IDs from the API.
List private-network attachments
Capability: connections:read.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
cursor | query | no | {"type":"string","minLength":1,"maxLength":400,"pattern":"^[A-Za-z0-9_-]+$","description":"Opaque pagination cursor from a previous response"} Opaque pagination cursor from a previous response |
limit | query | no | {"type":"integer","minimum":1,"maximum":100,"description":"Page size (1-100, default 20)"} Page size (1-100, default 20) |
Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Tenant-scoped secret-free attachment views | application/json NetworkAttachmentList |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}createNetworkAttachment
POST /v1/network-attachments
Deployment URL: https://ctx4.me/v1/network-attachments. Replace parameters in braces with actual IDs from the API.
Create a typed direct, WireGuard, or OpenVPN attachment
Capability: connections:write.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
Idempotency-Key | header | yes | {"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome |
Request body
Required. CreateNetworkAttachmentRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateNetworkAttachmentRequest"
}
}
}
}Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 201 | Created attachment; private credentials are never returned | application/json NetworkAttachment |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing) | application/problem+json Problem |
| 409 | Problem (conflict) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}getNetworkAttachment
GET /v1/network-attachments/{networkAttachmentId}
Deployment URL: https://ctx4.me/v1/network-attachments/{networkAttachmentId}. Replace parameters in braces with actual IDs from the API.
Get one private-network attachment
Capability: connections:read.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
networkAttachmentId | path | yes | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Secret-free attachment health and desired state | application/json NetworkAttachment |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing) | application/problem+json Problem |
| 404 | Problem (not_found) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}updateNetworkAttachment
PATCH /v1/network-attachments/{networkAttachmentId}
Deployment URL: https://ctx4.me/v1/network-attachments/{networkAttachmentId}. Replace parameters in braces with actual IDs from the API.
Replace the approved destination policy
Capability: connections:write.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
networkAttachmentId | path | yes | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Request body
Required.
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dns_servers": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"format": "ip"
},
{
"type": "string",
"format": "ip"
}
]
},
"maxItems": 3
},
"expected_version": {
"type": "integer",
"exclusiveMinimum": 0
},
"destinations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"host": {
"type": "string",
"minLength": 1,
"maxLength": 253,
"pattern": "^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$"
},
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535
}
},
"required": [
"host",
"port"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 64
}
},
"required": [
"expected_version",
"destinations"
],
"additionalProperties": false
}
}
}
}Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Updated desired generation | application/json NetworkAttachment |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing) | application/problem+json Problem |
| 404 | Problem (not_found) | application/problem+json Problem |
| 409 | Problem (conflict) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}revokeNetworkAttachment
DELETE /v1/network-attachments/{networkAttachmentId}
Deployment URL: https://ctx4.me/v1/network-attachments/{networkAttachmentId}. Replace parameters in braces with actual IDs from the API.
Drain and revoke a private-network attachment
Capability: connections:write.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
networkAttachmentId | path | yes | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
expected_version | query | yes | {"type":"integer","exclusiveMinimum":0} |
Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Draining or ready-to-revoke attachment | application/json NetworkAttachment |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing) | application/problem+json Problem |
| 404 | Problem (not_found) | application/problem+json Problem |
| 409 | Problem (conflict) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}discoverSavedDatabases
POST /v1/data-source-connections/{dataSourceConnectionId}/discover-databases
Deployment URL: https://ctx4.me/v1/data-source-connections/{dataSourceConnectionId}/discover-databases. Replace parameters in braces with actual IDs from the API.
Discover databases using a stored, tenant-owned connection
Capability: connections:write.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
dataSourceConnectionId | path | yes | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Bounded database catalog without returning credentials | application/json DiscoverPostgresDatabasesResponse |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing, forbidden) | application/problem+json Problem |
| 404 | Problem (not_found) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}addDatabaseFromConnection
POST /v1/data-source-connections/{dataSourceConnectionId}/databases
Deployment URL: https://ctx4.me/v1/data-source-connections/{dataSourceConnectionId}/databases. Replace parameters in braces with actual IDs from the API.
Add a database using the stored server credential
Capability: connections:write.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
Idempotency-Key | header | yes | {"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome |
dataSourceConnectionId | path | yes | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Request body
Required. AddDatabaseFromConnectionRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AddDatabaseFromConnectionRequest"
}
}
}
}Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 201 | Independent database connection with its own revocable secret | application/json DataSourceConnection |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing, forbidden) | application/problem+json Problem |
| 404 | Problem (not_found) | application/problem+json Problem |
| 409 | Problem (conflict) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}discoverPostgresDatabases
POST /v1/data-source-connections/discover-databases
Deployment URL: https://ctx4.me/v1/data-source-connections/discover-databases. Replace parameters in braces with actual IDs from the API.
Discover PostgreSQL or SQL Server databases before creating a source
Capability: connections:write.
The contract defines no additional parameters.
Request body
Required. DiscoverPostgresDatabasesRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiscoverPostgresDatabasesRequest"
}
}
}
}Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Bounded database catalog with explicit session evidence | application/json DiscoverPostgresDatabasesResponse |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing, forbidden) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}listDataSourceConnections
GET /v1/data-source-connections
Deployment URL: https://ctx4.me/v1/data-source-connections. Replace parameters in braces with actual IDs from the API.
List database and topic source connections
Capability: connections:read.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
cursor | query | no | {"type":"string","minLength":1,"maxLength":400,"pattern":"^[A-Za-z0-9_-]+$","description":"Opaque pagination cursor from a previous response"} Opaque pagination cursor from a previous response |
limit | query | no | {"type":"integer","minimum":1,"maximum":100,"description":"Page size (1-100, default 20)"} Page size (1-100, default 20) |
Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Tenant-scoped secret-free source views | application/json DataSourceConnectionList |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}createDataSourceConnection
POST /v1/data-source-connections
Deployment URL: https://ctx4.me/v1/data-source-connections. Replace parameters in braces with actual IDs from the API.
Create a typed database or topic source connection
Capability: connections:write.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
Idempotency-Key | header | yes | {"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome |
Request body
Required. CreateDataSourceConnectionRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateDataSourceConnectionRequest"
}
}
}
}Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 201 | Created source; credentials are never returned | application/json DataSourceConnection |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing, forbidden) | application/problem+json Problem |
| 409 | Problem (conflict) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}getDataSourceConnection
GET /v1/data-source-connections/{dataSourceConnectionId}
Deployment URL: https://ctx4.me/v1/data-source-connections/{dataSourceConnectionId}. Replace parameters in braces with actual IDs from the API.
Get one database or topic source connection
Capability: connections:read.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
dataSourceConnectionId | path | yes | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Secret-free source connection view | application/json DataSourceConnection |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing) | application/problem+json Problem |
| 404 | Problem (not_found) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}revokeDataSourceConnection
DELETE /v1/data-source-connections/{dataSourceConnectionId}
Deployment URL: https://ctx4.me/v1/data-source-connections/{dataSourceConnectionId}. Replace parameters in braces with actual IDs from the API.
Revoke a database or topic source connection
Capability: connections:write.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
dataSourceConnectionId | path | yes | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Revoked source connection | application/json DataSourceConnection |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing, forbidden) | application/problem+json Problem |
| 404 | Problem (not_found) | application/problem+json Problem |
| 409 | Problem (conflict) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}replaceDataSourceCredential
POST /v1/data-source-connections/{dataSourceConnectionId}/credential
Deployment URL: https://ctx4.me/v1/data-source-connections/{dataSourceConnectionId}/credential. Replace parameters in braces with actual IDs from the API.
Replace the password credential of a source connection
Capability: connections:write.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
dataSourceConnectionId | path | yes | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Request body
Required. ReplaceDataSourceCredentialRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReplaceDataSourceCredentialRequest"
}
}
}
}Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Source with the new credential version; a degraded source returns to pending until an inspection succeeds | application/json DataSourceConnection |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing, forbidden) | application/problem+json Problem |
| 404 | Problem (not_found) | application/problem+json Problem |
| 409 | Problem (conflict) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}getDataSourceSchema
GET /v1/data-source-connections/{dataSourceConnectionId}/schema
Deployment URL: https://ctx4.me/v1/data-source-connections/{dataSourceConnectionId}/schema. Replace parameters in braces with actual IDs from the API.
Get the latest discovered source schema
Capability: connections:read.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
dataSourceConnectionId | path | yes | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Latest tenant-scoped source schema | application/json SourceSchema |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing, forbidden) | application/problem+json Problem |
| 404 | Problem (not_found) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}discoverDataSourceSchema
POST /v1/data-source-connections/{dataSourceConnectionId}/schema
Deployment URL: https://ctx4.me/v1/data-source-connections/{dataSourceConnectionId}/schema. Replace parameters in braces with actual IDs from the API.
Inspect a source, persist its schema, and activate the connection
Capability: connections:write.
Parameters
| Name | Location | Required | Type and constraints |
|---|---|---|---|
Idempotency-Key | header | yes | {"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome |
dataSourceConnectionId | path | yes | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Responses and errors
| HTTP | Meaning | Format and schema |
|---|---|---|
| 200 | Discovered immutable source schema version | application/json SourceSchema |
| 400 | Problem (validation_failed) | application/problem+json Problem |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | application/problem+json Problem |
| 403 | Problem (capability_missing, forbidden) | application/problem+json Problem |
| 404 | Problem (not_found) | application/problem+json Problem |
| 409 | Problem (conflict) | application/problem+json Problem |
| 429 | Problem (rate_limited) | application/problem+json Problem |
| 500 | Problem (internal) | application/problem+json Problem |
| 503 | Problem (service_unavailable) | application/problem+json Problem |
Successful response headers:
{
"X-Request-Id": {
"description": "Correlation id echoed on every response",
"schema": {
"type": "string"
}
},
"RateLimit-Limit": {
"description": "Per-key request limit for the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Remaining": {
"description": "Requests remaining in the current window",
"schema": {
"type": "integer"
}
},
"RateLimit-Reset": {
"description": "Seconds until the current window resets",
"schema": {
"type": "integer"
}
}
}