Подключения и приложения OAuth.
Подключения рабочих сервисов и конфигурации OAuth в Context4: управление аккаунтами и схемы провайдеров через API.
Сгенерировано из публичного OpenAPI Context4. Авторизация: Authorization: Bearer с API-ключом. Общие правила — API. Полный контракт — OpenAPI JSON. В JSON ниже $ref указывает на именованную схему из раздела «Схемы».
listConnections
GET /v1/connections
URL этого стенда: https://context4.me/v1/connections. Параметры в фигурных скобках заменяются фактическими ID из API.
List connections
Полномочие: connections:read.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
status | query | нет | {"type":"string","enum":["pending","active","degraded","revoked","failed"]} |
user_id | query | нет | {"$ref":"#/components/schemas/EndUserRef"} |
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 | Connections in the key's workspace | application/json ConnectionListResponse |
| 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"
}
}
}createConnection
POST /v1/connections
URL этого стенда: https://context4.me/v1/connections. Параметры в фигурных скобках заменяются фактическими ID из API.
Initiate a connection (hosted auth link)
Полномочие: 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 |
Тело запроса
Обязательно. CreateConnectionRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateConnectionRequest"
}
}
}
}Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 201 | Hosted authorization link for the end user | application/json HostedAuthLink |
| 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"
}
}
}getConnection
GET /v1/connections/{connectionId}
URL этого стенда: https://context4.me/v1/connections/{connectionId}. Параметры в фигурных скобках заменяются фактическими ID из API.
Get one connection
Полномочие: connections:read.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
connectionId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 200 | Connection view (engine-free) | application/json Connection |
| 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"
}
}
}listAuthConfigs
GET /v1/auth-configs
URL этого стенда: https://context4.me/v1/auth-configs. Параметры в фигурных скобках заменяются фактическими ID из API.
List auth configurations
Полномочие: connections:read.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
connector_id | query | нет | {"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,78}$","example":"bitrix24"} |
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 | Auth configurations in the key's workspace | application/json AuthConfigListResponse |
| 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"
}
}
}createAuthConfig
POST /v1/auth-configs
URL этого стенда: https://context4.me/v1/auth-configs. Параметры в фигурных скобках заменяются фактическими ID из API.
Create an auth configuration
Полномочие: connections:write.
Дополнительных параметров в контракте нет.
Тело запроса
Обязательно. CreateAuthConfigRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAuthConfigRequest"
}
}
}
}Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 201 | The created auth configuration | application/json AuthConfig |
| 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"
}
}
}getAuthConfig
GET /v1/auth-configs/{authConfigId}
URL этого стенда: https://context4.me/v1/auth-configs/{authConfigId}. Параметры в фигурных скобках заменяются фактическими ID из API.
Get one auth configuration
Полномочие: connections:read.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
authConfigId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 200 | Auth configuration (secret-free) | application/json AuthConfig |
| 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"
}
}
}updateAuthConfig
PATCH /v1/auth-configs/{authConfigId}
URL этого стенда: https://context4.me/v1/auth-configs/{authConfigId}. Параметры в фигурных скобках заменяются фактическими ID из API.
Update an auth configuration
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
authConfigId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Тело запроса
Обязательно. UpdateAuthConfigRequest
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateAuthConfigRequest"
}
}
}
}Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 200 | The updated auth configuration | application/json AuthConfig |
| 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"
}
}
}deleteAuthConfig
DELETE /v1/auth-configs/{authConfigId}
URL этого стенда: https://context4.me/v1/auth-configs/{authConfigId}. Параметры в фигурных скобках заменяются фактическими ID из API.
Delete an auth configuration
Полномочие: connections:write.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
authConfigId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 204 | Deleted | Тело не задано контрактом |
| 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"
}
}
}getProviderSchema
GET /v1/connections/{connectionId}/schemas/{entity}
URL этого стенда: https://context4.me/v1/connections/{connectionId}/schemas/{entity}. Параметры в фигурных скобках заменяются фактическими ID из API.
Read the latest discovered provider entity schema
Полномочие: connections:read.
Параметры
| Имя | Где | Обязателен | Тип и ограничения |
|---|---|---|---|
connectionId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
entity | path | да | {"type":"string","minLength":1,"maxLength":80} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 200 | Latest tenant-scoped provider schema | application/json ProviderSchema |
| 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"
}
}
}discoverProviderSchema
POST /v1/connections/{connectionId}/schemas/{entity}
URL этого стенда: https://context4.me/v1/connections/{connectionId}/schemas/{entity}. Параметры в фигурных скобках заменяются фактическими ID из API.
Discover and persist provider entity metadata
Полномочие: 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 |
connectionId | path | да | {"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"} |
entity | path | да | {"type":"string","minLength":1,"maxLength":80} |
Ответы и ошибки
| HTTP | Значение | Формат и схема |
|---|---|---|
| 200 | Immutable provider schema revision | application/json ProviderSchema |
| 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"
}
}
}