OpenAPI
Интерактивная спецификация OpenAPI для /api/v2.
Спецификация генерируется из PHP attributes (swagger-php) в репозитории dle_api: apidata/openapi.yaml.
cd upload/api && composer openapiСырой файл: openapi.yaml
Интерактивный playground рендерится ниже через Fumadocs OpenAPI (app/lib/openapi.ts).
Операции
/oauth/token
Предпочтительно credential_type=api_key|auth|oauth_client. Альтернатива: grant_type=client_credentials|password|authorization_code|refresh_token. В DEMO_MODE при успехе — authorized без access_token.
Request Body
application/json
Параметры credential_type или OAuth2 grant
Response Body
application/json
application/json
curl -X POST "https://example.com/oauth/token" \ -H "Content-Type: application/json" \ -d '{ "credential_type": "api_key", "api_key": "your_api_key" }'{ "access_token": "…", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "…"}/.well-known/oauth-authorization-server
curl -X GET "https://example.com/.well-known/oauth-authorization-server"{ "issuer": "string", "authorization_endpoint": "string", "token_endpoint": "string", "revocation_endpoint": "string", "userinfo_endpoint": "string", "response_types_supported": [ "string" ], "grant_types_supported": [ "string" ], "code_challenge_methods_supported": [ "string" ], "token_endpoint_auth_methods_supported": [ "string" ], "credential_types_supported": [ "string" ]}/me
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/me"{ "sub": "string", "user_id": 0, "name": "string", "email": "string", "user_group": 0, "user": {}, "api_key_id": 0, "access_level": {}, "client_id": "string", "auth_via": "access_token"}/key/check
Принимает Authorization: Bearer , возвращает ключ, scopes и payload me. validTo = null означает бессрочный ключ.
Authorization
rawApiKeyBearer Сырой API-ключ только для GET /key/check. Формат: Authorization: Bearer .
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/key/check"{ "apiKey": { "key": "string", "validFrom": "2019-08-24T14:15:22Z", "validTo": "2019-08-24T14:15:22Z", "accessLevel": {} }, "scopes": { "property1": { "read": true, "write": true, "edit": true, "delete": true }, "property2": { "read": true, "write": true, "edit": true, "delete": true } }, "me": {}}/oauth/userinfo
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/oauth/userinfo"{ "sub": "string", "user_id": 0, "name": "string", "email": "string", "user_group": 0, "user": {}, "api_key_id": 0, "access_level": {}, "client_id": "string", "auth_via": "string"}/oauth/revoke
curl -X POST "https://example.com/oauth/revoke" \ -H "Content-Type: application/json" \ -d '{ "token": "string" }'{ "revoked": true}/post/
Query-параметры колонок схемы; xf[name]=value для доп. полей; ! и % префиксы значений. Legacy: HTTP-заголовки с именами колонок (BC). category — virtual FK csv + post_extras_cats.
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Query Parameters
200Колонка сортировки
"DESC"Value in
- "ASC"
- "DESC"
Virtual FK csv → category.id (FIND_IN_SET + post_extras_cats). !negate, %LIKE
Доп. поля: xf[field]=value (pad-LIKE по xfields). Пример: xf[title]=foo
Response Body
application/json
application/json
curl -X GET "https://example.com/post/"{ "data": [ { "id": 0, "autor": "string", "date": "string", "short_story": "string", "full_story": "string", "xfields": "string", "title": "string", "descr": "string", "keywords": "string", "category": "string", "alt_name": "string", "comm_num": 0, "allow_comm": 0, "allow_main": 0, "approve": 0, "fixed": 0, "allow_br": 0, "symbol": "string", "tags": "string", "metatitle": "string" } ], "count": 0}Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Request Body
application/json
Новость + optional nested children
Схема таблицы post.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/post/" \ -H "Content-Type: application/json" \ -d '{}'{ "id": 1}/post/{id}
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/post/0"{ "data": { "id": 0, "autor": "string", "date": "string", "short_story": "string", "full_story": "string", "xfields": "string", "title": "string", "descr": "string", "keywords": "string", "category": "string", "alt_name": "string", "comm_num": 0, "allow_comm": 0, "allow_main": 0, "approve": 0, "fixed": 0, "allow_br": 0, "symbol": "string", "tags": "string", "metatitle": "string" }}/table/{name}
Любая таблица SchemaRegistry. Фильтры = query-параметры колонок. Virtual FK (RelationMap): csv→FIND_IN_SET, one→=. Операторы: !negate, %LIKE. Пример: /table/banners/?category=1&approve=1. xf[name] если есть колонка xfields.
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Логическое имя таблицы SchemaRegistry (banners, post, category, …)
Query Parameters
200Колонка сортировки (из схемы)
"DESC"Value in
- "ASC"
- "DESC"
Доп. поля (если у таблицы есть xfields): xf[field]=value. Пример: xf[title]=foo
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/table/string"{ "data": [ { "id": 0, "name": "string", "date": 0, "ip": "string", "action": 0, "extras": "string" } ], "count": 0, "table": "string"}Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Логическое имя таблицы SchemaRegistry
Request Body
application/json
Колонки выбранной таблицы (+ optional nested children). Схема = oneOf TableRow.
Тело записи: выберите схему по логическому имени таблицы в path {name} (SchemaRegistry).
Схема таблицы admin_logs.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/table/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": 1, "table": "banners"}/table/{name}/{id}
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Логическое имя таблицы SchemaRegistry
Значение первичного ключа
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/table/string/string"{ "data": { "id": 0, "name": "string", "date": 0, "ip": "string", "action": 0, "extras": "string" }, "table": "string"}Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Логическое имя таблицы SchemaRegistry
Request Body
application/json
Тело записи: выберите схему по логическому имени таблицы в path {name} (SchemaRegistry).
Схема таблицы admin_logs.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/table/string/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "1", "table": "banners", "updated": true}Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Логическое имя таблицы SchemaRegistry
Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/table/string/string"{ "id": "1", "table": "banners", "deleted": true}/user/
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Request Body
application/json
Схема таблицы users.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/user/" \ -H "Content-Type: application/json" \ -d '{}'{ "id": 1}/usergroup/
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Request Body
application/json
Схема таблицы usergroups.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/usergroup/" \ -H "Content-Type: application/json" \ -d '{}'{ "id": 1}/plugin/
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Request Body
application/json
Схема таблицы plugins.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/plugin/" \ -H "Content-Type: application/json" \ -d '{}'{ "id": 1}/upload/
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Request Body
multipart/form-data
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/upload/" \ -F file="string"{ "url": "/uploads/files/…", "name": "file.jpg"}/conversations/
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/conversations/"{ "data": [ { "id": 0, "subject": "string", "created_at": 0, "updated_at": 0, "sender_id": 0, "recipient_id": 0 } ]}/xfields/{scope}/
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Value in
- "post"
- "user"
Response Body
application/json
application/json
curl -X GET "https://example.com/xfields/post/"{ "data": { "fields": { "property1": { "name": "string", "description": "string", "hint": "string", "group": "string", "category": "string", "allow_add_usergroups": "string", "allow_view_usergroups": "string", "type": "text", "min": "string", "max": "string", "storage": "string", "max_files": "string", "max_size": "string", "image_sizes": "string", "image_size": "string", "image_side": "string", "image_max_size": "string", "thumb_size": "string", "thumb_side": "string", "max_images": "string", "files_ext": "string", "file_max_size": "string", "condition": "string", "date_format": "string", "date_view_format": "string", "select_separator": "string", "links_separator": "string", "not_required": 0, "default": "string", "allow_multi": 0, "use_as_links": 0, "use_editor": 0, "safe_mode": 0, "make_watermark": 0, "make_thumb": 0, "use_opengraph": "string", "is_public": "string", "date_local": "string", "date_declension": "string", "allow_in_news": 0, "lazy_load": "string" }, "property2": { "name": "string", "description": "string", "hint": "string", "group": "string", "category": "string", "allow_add_usergroups": "string", "allow_view_usergroups": "string", "type": "text", "min": "string", "max": "string", "storage": "string", "max_files": "string", "max_size": "string", "image_sizes": "string", "image_size": "string", "image_side": "string", "image_max_size": "string", "thumb_size": "string", "thumb_side": "string", "max_images": "string", "files_ext": "string", "file_max_size": "string", "condition": "string", "date_format": "string", "date_view_format": "string", "select_separator": "string", "links_separator": "string", "not_required": 0, "default": "string", "allow_multi": 0, "use_as_links": 0, "use_editor": 0, "safe_mode": 0, "make_watermark": 0, "make_thumb": 0, "use_opengraph": "string", "is_public": "string", "date_local": "string", "date_declension": "string", "allow_in_news": 0, "lazy_load": "string" } }, "groups": { "property1": { "title": "string", "description": "string" }, "property2": { "title": "string", "description": "string" } } }, "scope": "post"}Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Value in
- "post"
- "user"
Request Body
application/json
Описание одного доп. поля новости (xfields.json → fields.*).
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/xfields/post/" \ -H "Content-Type: application/json" \ -d '{}'{ "name": "string", "scope": "string", "data": { "name": "string", "description": "string", "hint": "string", "group": "string", "category": "string", "allow_add_usergroups": "string", "allow_view_usergroups": "string", "type": "text", "min": "string", "max": "string", "storage": "string", "max_files": "string", "max_size": "string", "image_sizes": "string", "image_size": "string", "image_side": "string", "image_max_size": "string", "thumb_size": "string", "thumb_side": "string", "max_images": "string", "files_ext": "string", "file_max_size": "string", "condition": "string", "date_format": "string", "date_view_format": "string", "select_separator": "string", "links_separator": "string", "not_required": 0, "default": "string", "allow_multi": 0, "use_as_links": 0, "use_editor": 0, "safe_mode": 0, "make_watermark": 0, "make_thumb": 0, "use_opengraph": "string", "is_public": "string", "date_local": "string", "date_declension": "string", "allow_in_news": 0, "lazy_load": "string" }}/xfields/{scope}/encode
Body: {fields:{name:value}} или {name,value}. Ответ: raw + parsed.
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Value in
- "post"
- "user"
Request Body
application/json
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/xfields/post/encode" \ -H "Content-Type: application/json" \ -d '{}'{ "raw": "string", "parsed": {}}/xfields/{scope}/{name}
Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Value in
- "post"
- "user"
Query Parameters
Projection по типу (image, text, …)
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/xfields/post/string"{ "data": { "name": "string", "description": "string", "hint": "string", "group": "string", "category": "string", "allow_add_usergroups": "string", "allow_view_usergroups": "string", "type": "text", "min": "string", "max": "string", "storage": "string", "max_files": "string", "max_size": "string", "image_sizes": "string", "image_size": "string", "image_side": "string", "image_max_size": "string", "thumb_size": "string", "thumb_side": "string", "max_images": "string", "files_ext": "string", "file_max_size": "string", "condition": "string", "date_format": "string", "date_view_format": "string", "select_separator": "string", "links_separator": "string", "not_required": 0, "default": "string", "allow_multi": 0, "use_as_links": 0, "use_editor": 0, "safe_mode": 0, "make_watermark": 0, "make_thumb": 0, "use_opengraph": "string", "is_public": "string", "date_local": "string", "date_declension": "string", "allow_in_news": 0, "lazy_load": "string" }, "scope": "string"}Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Value in
- "post"
- "user"
Request Body
application/json
Описание одного доп. поля новости (xfields.json → fields.*).
Response Body
application/json
application/json
application/json
curl -X PUT "https://example.com/xfields/post/string" \ -H "Content-Type: application/json" \ -d '{}'{ "name": "myfield", "updated": true}Authorization
bearerAuth Access token из POST /oauth/token (credential_type или grant_type). Сырой API-ключ на ресурсах не принимается.
In: header
Path Parameters
Value in
- "post"
- "user"
Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/xfields/post/string"{ "name": "myfield", "deleted": true}/health
curl -X GET "https://example.com/health"{ "version": "200.1.0", "api": "v2", "auth": "Bearer"}Схемы
Компоненты components.schemas из OpenAPI.
AdminLogs
Схема таблицы admin_logs.
AdminSections
Схема таблицы admin_sections.
ApiError
Единый JSON-формат ошибки API v2: error, message, details?
Example
{ "error": "unauthorized", "message": "Требуется Authorization: Bearer <AuthToken>"}Banned
Схема таблицы banned.
Banners
BannersLogs
BannersRubrics
Category
Схема таблицы category.
CommentRatingLog
Схема таблицы comment_rating_log.
Comments
CommentsFiles
Схема таблицы comments_files.
Complaint
Схема таблицы complaint.
ConversationReads
Схема таблицы conversation_reads.
ConversationUsers
Схема таблицы conversation_users.
Conversations
Схема таблицы conversations.
ConversationsMessages
Схема таблицы conversations_messages.
DownloadsLog
Схема таблицы downloads_log.
Схема таблицы email.
Files
Схема таблицы files.
Flood
Схема таблицы flood.
IgnoreList
Схема таблицы ignore_list.
Images
Схема таблицы images.
Links
Схема таблицы links.
LoginLog
Схема таблицы login_log.
Logs
Схема таблицы logs.
Lostdb
Схема таблицы lostdb.
MailLog
Схема таблицы mail_log.
Metatags
NewsletterTemplateCategories
NewsletterTemplateItems
Notice
Схема таблицы notice.
Plugins
Схема таблицы plugins.
PluginsFiles
Схема таблицы plugins_files.
PluginsLogs
Схема таблицы plugins_logs.
Poll
Схема таблицы poll.
PollLog
Схема таблицы poll_log.
Post
Схема таблицы post.
PostExtras
Схема таблицы post_extras.
PostExtrasCats
Схема таблицы post_extras_cats.
PostLog
Схема таблицы post_log.
PostPass
Схема таблицы post_pass.
PostXfieldField
Описание одного доп. поля новости (xfields.json → fields.*).
PostXfieldGroup
Группа доп. полей новости (xfields.json → groups.*).
PostXfieldsCatalog
Каталог доп. полей новостей (xfields.json).
Question
Схема таблицы question.
ReadLog
Схема таблицы read_log.
Redirects
Схема таблицы redirects.
Rss
Схема таблицы rss.
Rssinform
Схема таблицы rssinform.
Sendlog
Схема таблицы sendlog.
SocialLogin
SpamLog
Схема таблицы spam_log.
Static
Схема таблицы static.
StaticFiles
Схема таблицы static_files.
Storage
Схема таблицы storage.
Subscribe
Схема таблицы subscribe.
TableRow
Тело записи: выберите схему по логическому имени таблицы в path {name} (SchemaRegistry).
Tags
Twofactor
Схема таблицы twofactor.
UserXfieldField
Описание доп. поля профиля (userxfields.json → fields.*).
UserXfieldsCatalog
Каталог доп. полей профиля (userxfields.json).
Usergroups
Схема таблицы usergroups.
Users
Схема таблицы users.
UsersDelete
Схема таблицы users_delete.
Views
Схема таблицы views.
Vote
Схема таблицы vote.
VoteResult
Схема таблицы vote_result.
Xfsearch
Схема таблицы xfsearch.
Схема таблицы
comments.