Программный интерфейс
/web_api/file_app/issue_access_token
/web_api/file_app/issue_access_token
Страница собрана из снимка JSON Schema в репозитории документации. Снимок обновляется отдельной командой из каталога основного приложения и при сборке сайта не переписывается.
Запрос
main-app://schemas/api_file_app/issue_access_token.request.json
POST /web_api/file_app/issue_access_token body
| Имя | Тип | Обязательное | Ограничение |
|---|---|---|---|
entity_type | string | Нет | - |
entity_id | integer | Нет | - |
ttl_seconds | integer | Нет | - |
size_bytes | integer | Нет | - |
Другие поля верхнего уровня допустимы.
Ответ
main-app://schemas/api_file_app/issue_access_token.response.json
POST /web_api/file_app/issue_access_token success
| Имя | Тип | Обязательное | Ограничение |
|---|---|---|---|
api_code | integer | Да | const 200 |
api_result | object | Да | другие поля допустимы |
empty | boolean | Нет | - |
Другие поля верхнего уровня запрещены.
Исходная схема
Файлы ниже скопированы из снимка без изменений. Фрагмент по $ref приведён отдельным блоком, схемы не сливаются.
Запрос: main-app://schemas/api_file_app/issue_access_token.request.json
json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "main-app://schemas/api_file_app/issue_access_token.request.json",
"title": "POST /web_api/file_app/issue_access_token body",
"type": "object",
"required": [],
"additionalProperties": true,
"properties": {
"entity_type": {
"type": "string"
},
"entity_id": {
"type": "integer"
},
"ttl_seconds": {
"type": "integer"
},
"size_bytes": {
"type": "integer"
}
}
}Ответ: main-app://schemas/api_file_app/issue_access_token.response.json
json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "main-app://schemas/api_file_app/issue_access_token.response.json",
"title": "POST /web_api/file_app/issue_access_token success",
"allOf": [
{
"$ref": "main-app://schemas/_shared/envelope-success.json"
},
{
"type": "object",
"properties": {
"api_result": {
"type": "object",
"additionalProperties": true
}
}
}
]
}Фрагмент: main-app://schemas/_shared/envelope-success.json
json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "main-app://schemas/_shared/envelope-success.json",
"title": "Canonical success envelope",
"type": "object",
"required": ["api_code", "api_result"],
"properties": {
"api_code": { "const": 200 },
"api_result": true,
"empty": { "type": "boolean" }
},
"additionalProperties": false
}Страница не помогла?