Базы данных и частные сети.
Подключение источников данных и частных сетей в Context4: обнаружение схем, сетевые привязки и управление доступом через API.
Сгенерировано из публичного OpenAPI Context4. Авторизация: Authorization: Bearer с API-ключом. Общие правила — API. Полный контракт — OpenAPI JSON. В JSON ниже $ref указывает на именованную схему из раздела «Схемы».
setNetworkAttachmentConnectivity
PATCH /v1/network-attachments/{networkAttachmentId}/connectivity
URL этого стенда: https://context4.me/v1/network-attachments/{networkAttachmentId}/connectivity. Параметры в фигурных скобках заменяются фактическими ID из API.
Disconnect or reconnect a private-network attachment
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
networkAttachmentId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Тело запроса
Обязательно.
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"expected_version": {
"type": "integer",
"exclusiveMinimum": 0
},
"enabled": {
"type": "boolean"
}
},
"required": [
"expected_version",
"enabled"
],
"additionalProperties": false
}
}
}
}Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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
URL этого стенда: https://context4.me/v1/network-attachments. Параметры в фигурных скобках заменяются фактическими ID из API.
List private-network attachments
Полномочие: connections:read.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
cursor | query | нет | {"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 | нет | {"type":"integer","minimum":1,"maximum":100,"description":"Page size (1-100, default 20)"} Page size (1-100, default 20) |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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
URL этого стенда: https://context4.me/v1/network-attachments. Параметры в фигурных скобках заменяются фактическими ID из API.
Create a typed direct, WireGuard, or OpenVPN attachment
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
Idempotency-Key | header | да | {"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome |
Тело запроса
Обязательно. CreateNetworkAttachmentRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateNetworkAttachmentRequest"
}
}
}
}Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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}
URL этого стенда: https://context4.me/v1/network-attachments/{networkAttachmentId}. Параметры в фигурных скобках заменяются фактическими ID из API.
Get one private-network attachment
Полномочие: connections:read.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
networkAttachmentId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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}
URL этого стенда: https://context4.me/v1/network-attachments/{networkAttachmentId}. Параметры в фигурных скобках заменяются фактическими ID из API.
Replace the approved destination policy
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
networkAttachmentId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Тело запроса
Обязательно.
{
"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
}
}
}
}Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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}
URL этого стенда: https://context4.me/v1/network-attachments/{networkAttachmentId}. Параметры в фигурных скобках заменяются фактическими ID из API.
Drain and revoke a private-network attachment
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
networkAttachmentId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
expected_version | query | да | {"type":"integer","exclusiveMinimum":0} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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
URL этого стенда: https://context4.me/v1/data-source-connections/{dataSourceConnectionId}/discover-databases. Параметры в фигурных скобках заменяются фактическими ID из API.
Discover databases using a stored, tenant-owned connection
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
dataSourceConnectionId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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
URL этого стенда: https://context4.me/v1/data-source-connections/{dataSourceConnectionId}/databases. Параметры в фигурных скобках заменяются фактическими ID из API.
Add a database using the stored server credential
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
Idempotency-Key | header | да | {"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome |
dataSourceConnectionId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Тело запроса
Обязательно. AddDatabaseFromConnectionRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AddDatabaseFromConnectionRequest"
}
}
}
}Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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
URL этого стенда: https://context4.me/v1/data-source-connections/discover-databases. Параметры в фигурных скобках заменяются фактическими ID из API.
Discover PostgreSQL or SQL Server databases before creating a source
Полномочие: connections:write.
Дополнительных параметров в контракте нет.
Тело запроса
Обязательно. DiscoverPostgresDatabasesRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiscoverPostgresDatabasesRequest"
}
}
}
}Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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
URL этого стенда: https://context4.me/v1/data-source-connections. Параметры в фигурных скобках заменяются фактическими ID из API.
List database and topic source connections
Полномочие: connections:read.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
cursor | query | нет | {"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 | нет | {"type":"integer","minimum":1,"maximum":100,"description":"Page size (1-100, default 20)"} Page size (1-100, default 20) |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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
URL этого стенда: https://context4.me/v1/data-source-connections. Параметры в фигурных скобках заменяются фактическими ID из API.
Create a typed database or topic source connection
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
Idempotency-Key | header | да | {"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome |
Тело запроса
Обязательно. CreateDataSourceConnectionRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateDataSourceConnectionRequest"
}
}
}
}Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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}
URL этого стенда: https://context4.me/v1/data-source-connections/{dataSourceConnectionId}. Параметры в фигурных скобках заменяются фактическими ID из API.
Get one database or topic source connection
Полномочие: connections:read.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
dataSourceConnectionId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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}
URL этого стенда: https://context4.me/v1/data-source-connections/{dataSourceConnectionId}. Параметры в фигурных скобках заменяются фактическими ID из API.
Revoke a database or topic source connection
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
dataSourceConnectionId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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
URL этого стенда: https://context4.me/v1/data-source-connections/{dataSourceConnectionId}/credential. Параметры в фигурных скобках заменяются фактическими ID из API.
Replace the password credential of a source connection
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
dataSourceConnectionId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Тело запроса
Обязательно. ReplaceDataSourceCredentialRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReplaceDataSourceCredentialRequest"
}
}
}
}Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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
URL этого стенда: https://context4.me/v1/data-source-connections/{dataSourceConnectionId}/schema. Параметры в фигурных скобках заменяются фактическими ID из API.
Get the latest discovered source schema
Полномочие: connections:read.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
dataSourceConnectionId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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
URL этого стенда: https://context4.me/v1/data-source-connections/{dataSourceConnectionId}/schema. Параметры в фигурных скобках заменяются фактическими ID из API.
Inspect a source, persist its schema, and activate the connection
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
Idempotency-Key | header | да | {"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome |
dataSourceConnectionId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 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 |
Заголовки успешного ответа:
{
"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"
}
}
}