> For the complete documentation index, see [llms.txt](https://docs.mikopbx.com/mikopbx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mikopbx.com/mikopbx/modules/miko/module-cloud-speech-to-text/rest-api.md).

# REST API

Описание маршуртов

Модуль позволяет получать готовые расшифровки и совершать другие действия с помощью REST API. Это может быть полезно для интеграций в сторонние ресурсы. Ниже приведена вся самая важная информация по REST API.\
\
Базовый путь:

```
/pbxcore/api/v3/module-cloud-speech-to-text
```

| Назначение                  | Endpoint                         |
| --------------------------- | -------------------------------- |
| Сводка и состояние          | `GET /dashboard`, `GET /health`  |
| Правила отбора              | `GET/PATCH /rule-sets/current`   |
| Режим и хранение            | `GET/PATCH /settings`            |
| Проверка подключения        | `POST /connection-checks`        |
| Управление обработкой       | `GET/PATCH /processing-controls` |
| Очередь задач               | `GET /jobs`                      |
| Отмена и повтор задачи      | `POST /job-cancellations`        |
| Список транскриптов         | `GET /transcripts`               |
| Экспорт транскрипта         | `GET /transcript-exports/{id}`   |
| Журнал модуля               | `GET /logs`                      |
| Диагностические архивы      | `GET/POST /diagnostic-reports`   |
| Поиск транскрипта по звонку | `GET /cdr-transcript-lookups`    |

**Интеграции: call-transcripts**

Внешние модули читают готовые транскрипты через два выделенных ресурса — `GET /call-transcripts` и `GET /call-transcript-events`. Эти ресурсы принимают только специальный ключ интеграции и отдают полный неизменяемый контракт расшифровки: сегменты, объединенные реплики и простой текст.

Идентификация построена так, чтобы после чистой переустановки модуля внешняя система не пересчитывала анализ заново:

* `call_id` — стабильный идентификатор звонка Asterisk (`linkedid`, либо `UNIQUEID`, когда `linkedid` пуст);
* `source_instance_id` — идентификатор установки модуля;
* `semantic_hash` — хеш содержимого расшифровки по профилю `call-transcript-analysis-v1`: совпадает, только если текст, участники и тайминги не изменились.

События `call-transcript.completed`, `call-transcript.updated` и `call-transcript.deleted` выдаются курсорной выдачей и идемпотентны. Публичная схема контракта — `call-transcript.v1`. После удаления транскрипта события больше не раскрывают `call_id` и хеши.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mikopbx.com/mikopbx/modules/miko/module-cloud-speech-to-text/rest-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
