Skip to main content

capi (0.1.0)

Download OpenAPI specification:Download

Chat

Chat Init

Инициализация диалога.

Request Body schema: application/json
uuid
required
string <uuid> (Uuid)

Идентификатор ассистента.

cuid
string <uuid> (Cuid)

Идентификатор чата.

context
object (Context)
Default: {}

Контекст.

Responses

Request samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
  • "context": { }
}

Response samples

Content type
application/json
{
  • "id": "0",
  • "result": {
    }
}

Chat Event

Обработка Event (событие).

Request Body schema: application/json
cuid
required
string <uuid> (Cuid)

Идентификатор чата.

euid
required
string <uuid> (Euid)

Идентификатор события.

context
object (Context)
Default: {}

Контекст.

Responses

Request samples

Content type
application/json
{
  • "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
  • "euid": "0673ce4f-9d34-4b4e-b140-06ae5f587171",
  • "context": { }
}

Response samples

Content type
application/json
{
  • "id": "0",
  • "result": {
    }
}

Chat Request

Обработка Request (реплика).

Request Body schema: application/json
cuid
required
string <uuid> (Cuid)

Идентификатор чата.

text
required
string (Text)

Реплика пользователя.

context
object (Context)
Default: {}

Контекст.

Responses

Request samples

Content type
application/json
{
  • "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
  • "text": "string",
  • "context": { }
}

Response samples

Content type
application/json
{
  • "id": "0",
  • "result": {
    }
}

Webhook

Получение сообщения от SAPI.

Request Body schema: application/json
type
string (Type)

Проверка вебхука.

cuid
string <uuid> (Cuid)

Идентификатор чата.

reqid
string <uuid> (Reqid)

Идентификатор запроса.

message
any (Message)
Default: []

Ответ ассистента.

infosrvid
string (Infosrvid)

Идентификатор сообщения.

context
object (Context)
Default: {}

Контекст.

commands
object (Commands)
Default: {}

Команды.

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
  • "reqid": "69e4e573-ff59-479c-9c48-1f5a5ee16a15",
  • "message": [ ],
  • "infosrvid": "string",
  • "context": { },
  • "commands": { }
}

Response samples

Content type
application/json
{
  • "id": "0",
  • "result": { }
}

Response Rate

Передать оценку ответа бота в SAPI

Request Body schema: application/json
cuid
required
string <uuid> (Cuid)

UUID чата/диалога

required
object (RateContext)

Responses

Request samples

Content type
application/json
{
  • "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
  • "context": {
    }
}

Response samples

Content type
application/json
{
  • "id": "0",
  • "result": {
    }
}

Set Response Rate

Передать оценку ответа бота в SAPI

Request Body schema: application/json
cuid
required
string <uuid> (Cuid)

UUID чата/диалога

required
object (RateContext)

Responses

Request samples

Content type
application/json
{
  • "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
  • "context": {
    }
}

Response samples

Content type
application/json
{
  • "id": "0",
  • "result": {
    }
}

Sync Request

Request Body schema: application/json
cuid
required
string <uuid> (Cuid)

Chat/Dialog UUID

Responses

Request samples

Content type
application/json
{
  • "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564"
}

Response samples

Content type
application/json
{
  • "answers": [
    ]
}

Misc

Health Check

Server status.

Responses

Response samples

Content type
application/json
null

Method

Server startup.

Responses

Response samples

Content type
application/json
null

Method

Server readiness.

Responses

Response samples

Content type
application/json
null

Method

Server liveness.

Responses

Response samples

Content type
application/json
null

Redirect Doc

Documentation redirection.

Responses

Response samples

Content type
application/json
null

Metrics

Prometheus metrics.

Responses

Response samples

Content type
application/json
null