Files
mila/protocol.md
2026-07-12 20:44:44 +03:00

64 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# BVK Exchange Protocol
Based on ротокол_обменаедиакомплекса_и_БВК.pdf`.
## Role
- BVK is the HTTP client.
- Media complex is the HTTP server.
- Default address from the document: `172.16.16.2:13280`.
## Set Content
```text
GET /set-content?route=<R>&str=<S>&tpl_name=<T>
```
Parameters are URL-encoded.
| Parameter | Meaning |
| --- | --- |
| `route` | Route number, 1 to 3 characters |
| `str` | Ticker/running text |
| `tpl_name` | Media content template name |
Current library defaults:
| Field | Default limit |
| --- | ---: |
| `route` | 3 characters |
| `str` | 200 characters |
| `tpl_name` | 200 characters |
The exact text/template limits must be confirmed with the integrator because the
PDF text layer is ambiguous for the original value.
## Get Content
```text
GET /get-content
```
Response:
```json
{
"route": "<R>",
"str": "<S>",
"tpl_name": "<T>"
}
```
Mila keeps `updated_at` internally, but the HTTP response is strict and exposes
only the fields defined by the protocol.
## Status Codes
| Code | Meaning |
| ---: | --- |
| 200 | OK |
| 400 | Bad request / validation error |
| 404 | Path not found |
| 500 | Internal server error |
| 503 | State is not ready or dependency unavailable |