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

Инструменты и идентификация.

Поиск инструментов Context4, получение схем действий и проверка идентификационных данных через публичный API.

Сгенерировано из публичного OpenAPI Context4. Авторизация: Authorization: Bearer с API-ключом. Общие правила — API. Полный контракт — OpenAPI JSON. В JSON ниже $ref указывает на именованную схему из раздела «Схемы».

listTools

GET /v1/tools

URL этого стенда: https://context4.me/v1/tools. Параметры в фигурных скобках заменяются фактическими ID из API.

List published tools

Полномочие: tools:read.

Параметры

ИмяГдеОбязателенТип и ограничения
connector_idqueryнет{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,78}$","example":"bitrix24"}
searchqueryнет{"type":"string","minLength":1,"maxLength":120}
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ЗначениеФормат и схема
200Published tools (flattened connector actions)application/json ToolListResponse
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"
    }
  }
}

getTool

GET /v1/tools/{toolId}

URL этого стенда: https://context4.me/v1/tools/{toolId}. Параметры в фигурных скобках заменяются фактическими ID из API.

Get one tool with its JSON schemas

Полномочие: tools:read.

Параметры

ИмяГдеОбязателенТип и ограничения
toolIdpathда{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,78}\.[a-z0-9][a-z0-9_.]{1,78}$","example":"bitrix24.contact.create"}

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

HTTPЗначениеФормат и схема
200Tool detail with pinned input/output schemasapplication/json ToolDetail
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"
    }
  }
}

getIdentity

GET /v1/identity

URL этого стенда: https://context4.me/v1/identity. Параметры в фигурных скобках заменяются фактическими ID из API.

Get the authenticated credential's tenant

Полномочие: connections:read.

Дополнительных параметров в контракте нет.

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

HTTPЗначениеФормат и схема
200Verified organization and workspace; no credential materialapplication/json PublicIdentity
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"
    }
  }
}