Context4
Техническая документация

Базы данных и частные сети.

Подключение источников данных и частных сетей в 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.

Параметры

ИмяГдеОбязателенТип и ограничения
networkAttachmentIdpathда{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Тело запроса

Обязательно.

Data
{
  "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ЗначениеФормат и схема
200Persisted connectivity intent; status reason reports operator acknowledgementapplication/json NetworkAttachment
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
409Problem (conflict)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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.

Параметры

ИмяГдеОбязателенТип и ограничения
cursorqueryнет{"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
limitqueryнет{"type":"integer","minimum":1,"maximum":100,"description":"Page size (1-100, default 20)"} Page size (1-100, default 20)

Ответы и ошибки

HTTPЗначениеФормат и схема
200Tenant-scoped secret-free attachment viewsapplication/json NetworkAttachmentList
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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-Keyheaderда{"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome

Тело запроса

Обязательно. CreateNetworkAttachmentRequest

Data
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreateNetworkAttachmentRequest"
      }
    }
  }
}

Ответы и ошибки

HTTPЗначениеФормат и схема
201Created attachment; private credentials are never returnedapplication/json NetworkAttachment
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
409Problem (conflict)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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.

Параметры

ИмяГдеОбязателенТип и ограничения
networkAttachmentIdpathда{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Ответы и ошибки

HTTPЗначениеФормат и схема
200Secret-free attachment health and desired stateapplication/json NetworkAttachment
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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.

Параметры

ИмяГдеОбязателенТип и ограничения
networkAttachmentIdpathда{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Тело запроса

Обязательно.

Data
{
  "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ЗначениеФормат и схема
200Updated desired generationapplication/json NetworkAttachment
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
409Problem (conflict)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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.

Параметры

ИмяГдеОбязателенТип и ограничения
networkAttachmentIdpathда{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}
expected_versionqueryда{"type":"integer","exclusiveMinimum":0}

Ответы и ошибки

HTTPЗначениеФормат и схема
200Draining or ready-to-revoke attachmentapplication/json NetworkAttachment
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
409Problem (conflict)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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.

Параметры

ИмяГдеОбязателенТип и ограничения
dataSourceConnectionIdpathда{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Ответы и ошибки

HTTPЗначениеФормат и схема
200Bounded database catalog without returning credentialsapplication/json DiscoverPostgresDatabasesResponse
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing, forbidden)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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-Keyheaderда{"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome
dataSourceConnectionIdpathда{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Тело запроса

Обязательно. AddDatabaseFromConnectionRequest

Data
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AddDatabaseFromConnectionRequest"
      }
    }
  }
}

Ответы и ошибки

HTTPЗначениеФормат и схема
201Independent database connection with its own revocable secretapplication/json DataSourceConnection
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing, forbidden)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
409Problem (conflict)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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

Data
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiscoverPostgresDatabasesRequest"
      }
    }
  }
}

Ответы и ошибки

HTTPЗначениеФормат и схема
200Bounded database catalog with explicit session evidenceapplication/json DiscoverPostgresDatabasesResponse
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing, forbidden)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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.

Параметры

ИмяГдеОбязателенТип и ограничения
cursorqueryнет{"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
limitqueryнет{"type":"integer","minimum":1,"maximum":100,"description":"Page size (1-100, default 20)"} Page size (1-100, default 20)

Ответы и ошибки

HTTPЗначениеФормат и схема
200Tenant-scoped secret-free source viewsapplication/json DataSourceConnectionList
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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-Keyheaderда{"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome

Тело запроса

Обязательно. CreateDataSourceConnectionRequest

Data
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreateDataSourceConnectionRequest"
      }
    }
  }
}

Ответы и ошибки

HTTPЗначениеФормат и схема
201Created source; credentials are never returnedapplication/json DataSourceConnection
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing, forbidden)application/problem+json Problem
409Problem (conflict)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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.

Параметры

ИмяГдеОбязателенТип и ограничения
dataSourceConnectionIdpathда{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Ответы и ошибки

HTTPЗначениеФормат и схема
200Secret-free source connection viewapplication/json DataSourceConnection
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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.

Параметры

ИмяГдеОбязателенТип и ограничения
dataSourceConnectionIdpathда{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Ответы и ошибки

HTTPЗначениеФормат и схема
200Revoked source connectionapplication/json DataSourceConnection
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing, forbidden)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
409Problem (conflict)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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.

Параметры

ИмяГдеОбязателенТип и ограничения
dataSourceConnectionIdpathда{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Тело запроса

Обязательно. ReplaceDataSourceCredentialRequest

Data
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ReplaceDataSourceCredentialRequest"
      }
    }
  }
}

Ответы и ошибки

HTTPЗначениеФормат и схема
200Source with the new credential version; a degraded source returns to pending until an inspection succeedsapplication/json DataSourceConnection
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing, forbidden)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
409Problem (conflict)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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.

Параметры

ИмяГдеОбязателенТип и ограничения
dataSourceConnectionIdpathда{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Ответы и ошибки

HTTPЗначениеФормат и схема
200Latest tenant-scoped source schemaapplication/json SourceSchema
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing, forbidden)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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-Keyheaderда{"type":"string"} Client-chosen key (8-128 chars of [A-Za-z0-9._:-]); replays with the same payload return the original outcome
dataSourceConnectionIdpathда{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Ответы и ошибки

HTTPЗначениеФормат и схема
200Discovered immutable source schema versionapplication/json SourceSchema
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing, forbidden)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
409Problem (conflict)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Заголовки успешного ответа:

Data
{
  "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"
    }
  }
}