{ "namespace": "wp/v2", "methods": [ "GET", "POST", "PUT", "PATCH", "DELETE" ], "endpoints": [ { "methods": [ "GET" ], "args": { "id": { "required": false, "description": "Уникальный идентификатор для объекта.", "type": "integer" }, "context": { "required": false, "default": "view", "enum": [ "view", "embed", "edit" ], "description": "Рамки в которых сделан запрос, определяют поля в ответе.", "type": "string" }, "password": { "required": false, "description": "Пароль для записи, если она защищена паролем.", "type": "string" } } }, { "methods": [ "POST", "PUT", "PATCH" ], "args": { "id": { "required": false, "description": "Уникальный идентификатор для объекта.", "type": "integer" }, "date": { "required": false, "description": "Дата публикации объекта, по временной зоне сайта.", "type": "string" }, "date_gmt": { "required": false, "description": "Время публикации объекта, по GMT.", "type": "string" }, "slug": { "required": false, "description": "Буквенно-цифровой идентификатор для объекта уникальный для его типа.", "type": "string" }, "status": { "required": false, "enum": [ "publish", "future", "draft", "pending", "private" ], "description": "Именованный статус для объекта.", "type": "string" }, "password": { "required": false, "description": "Пароль для защиты содержания и отрывка.", "type": "string" }, "title": { "required": false, "description": "Название для объекта.", "type": "object" }, "content": { "required": false, "description": "Содержимое объекта.", "type": "object" }, "author": { "required": false, "description": "ID автора объекта.", "type": "integer" }, "excerpt": { "required": false, "description": "Отрывок объекта.", "type": "object" }, "featured_media": { "required": false, "description": "ID избранного медиа для объекта.", "type": "integer" }, "comment_status": { "required": false, "enum": [ "open", "closed" ], "description": "Открыты ли комментарии для объекта.", "type": "string" }, "ping_status": { "required": false, "enum": [ "open", "closed" ], "description": "Принимает ли объект уведомления.", "type": "string" }, "format": { "required": false, "enum": [ "standard", "aside", "chat", "gallery", "link", "image", "quote", "status", "video", "audio" ], "description": "Формат для объекта.", "type": "string" }, "meta": { "required": false, "description": "Мета поля.", "type": "object" }, "sticky": { "required": false, "description": "Считать ли объект прилепленным или нет.", "type": "boolean" }, "template": { "required": false, "description": "Файл темы используемый для показа объекта.", "type": "string" }, "categories": { "required": false, "description": "Элементы назначенные объекту в таксономии category.", "type": "array", "items": { "type": "integer" } }, "tags": { "required": false, "description": "Элементы назначенные объекту в таксономии post_tag.", "type": "array", "items": { "type": "integer" } } } }, { "methods": [ "DELETE" ], "args": { "id": { "required": false, "description": "Уникальный идентификатор для объекта.", "type": "integer" }, "force": { "required": false, "default": false, "description": "Игнорировать ли перемещение в корзину и принудительно удалять.", "type": "boolean" } } } ], "schema": { "$schema": "http://json-schema.org/draft-04/schema#", "title": "post", "type": "object", "properties": { "date": { "description": "Дата публикации объекта, по временной зоне сайта.", "type": "string", "format": "date-time", "context": [ "view", "edit", "embed" ] }, "date_gmt": { "description": "Время публикации объекта, по GMT.", "type": "string", "format": "date-time", "context": [ "view", "edit" ] }, "guid": { "description": "Глобальный уникальный идентификатор для объекта.", "type": "object", "context": [ "view", "edit" ], "readonly": true, "properties": { "raw": { "description": "GUID для объекта, как он существует в базе данных.", "type": "string", "context": [ "edit" ], "readonly": true }, "rendered": { "description": "GUID для объекта, преобразованный для показа.", "type": "string", "context": [ "view", "edit" ], "readonly": true } } }, "id": { "description": "Уникальный идентификатор для объекта.", "type": "integer", "context": [ "view", "edit", "embed" ], "readonly": true }, "link": { "description": "URL объекта.", "type": "string", "format": "uri", "context": [ "view", "edit", "embed" ], "readonly": true }, "modified": { "description": "Дата последнего изменения объекта, по временной зоне сайта.", "type": "string", "format": "date-time", "context": [ "view", "edit" ], "readonly": true }, "modified_gmt": { "description": "Дата последнего изменения объекта, в GMT.", "type": "string", "format": "date-time", "context": [ "view", "edit" ], "readonly": true }, "slug": { "description": "Буквенно-цифровой идентификатор для объекта уникальный для его типа.", "type": "string", "context": [ "view", "edit", "embed" ] }, "status": { "description": "Именованный статус для объекта.", "type": "string", "enum": [ "publish", "future", "draft", "pending", "private" ], "context": [ "view", "edit" ] }, "type": { "description": "Тип записи для объекта.", "type": "string", "context": [ "view", "edit", "embed" ], "readonly": true }, "password": { "description": "Пароль для защиты содержания и отрывка.", "type": "string", "context": [ "edit" ] }, "title": { "description": "Название для объекта.", "type": "object", "context": [ "view", "edit", "embed" ], "properties": { "raw": { "description": "Название объекта как оно существует в базе данных.", "type": "string", "context": [ "edit" ] }, "rendered": { "description": "HTML название объекта, преобразованное для показа.", "type": "string", "context": [ "view", "edit", "embed" ], "readonly": true } } }, "content": { "description": "Содержимое объекта.", "type": "object", "context": [ "view", "edit" ], "properties": { "raw": { "description": "Содержимое объекта как оно существует в базе данных.", "type": "string", "context": [ "edit" ] }, "rendered": { "description": "HTML содержимое объекта преобразованное для показа.", "type": "string", "context": [ "view", "edit" ], "readonly": true }, "protected": { "description": "Защищено ли содержимое паролем.", "type": "boolean", "context": [ "view", "edit", "embed" ], "readonly": true } } }, "author": { "description": "ID автора объекта.", "type": "integer", "context": [ "view", "edit", "embed" ] }, "excerpt": { "description": "Отрывок объекта.", "type": "object", "context": [ "view", "edit", "embed" ], "properties": { "raw": { "description": "Отрывок объекта как он существует в базе данных.", "type": "string", "context": [ "edit" ] }, "rendered": { "description": "HTML отрывок объекта, преобразованный для показа.", "type": "string", "context": [ "view", "edit", "embed" ], "readonly": true }, "protected": { "description": "Защищать ли паролем отрывок.", "type": "boolean", "context": [ "view", "edit", "embed" ], "readonly": true } } }, "featured_media": { "description": "ID избранного медиа для объекта.", "type": "integer", "context": [ "view", "edit", "embed" ] }, "comment_status": { "description": "Открыты ли комментарии для объекта.", "type": "string", "enum": [ "open", "closed" ], "context": [ "view", "edit" ] }, "ping_status": { "description": "Принимает ли объект уведомления.", "type": "string", "enum": [ "open", "closed" ], "context": [ "view", "edit" ] }, "format": { "description": "Формат для объекта.", "type": "string", "enum": [ "standard", "aside", "chat", "gallery", "link", "image", "quote", "status", "video", "audio" ], "context": [ "view", "edit" ] }, "meta": { "description": "Мета поля.", "type": "object", "context": [ "view", "edit" ], "properties": [] }, "sticky": { "description": "Считать ли объект прилепленным или нет.", "type": "boolean", "context": [ "view", "edit" ] }, "template": { "description": "Файл темы используемый для показа объекта.", "type": "string", "context": [ "view", "edit" ] }, "categories": { "description": "Элементы назначенные объекту в таксономии category.", "type": "array", "items": { "type": "integer" }, "context": [ "view", "edit" ] }, "tags": { "description": "Элементы назначенные объекту в таксономии post_tag.", "type": "array", "items": { "type": "integer" }, "context": [ "view", "edit" ] } }, "links": [ { "rel": "https://api.w.org/action-publish", "title": "Текущий пользователь может опубликовать эту запись.", "href": "http://wptest.ru/wp-json/wp/v2/posts/{id}", "targetSchema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "publish", "future" ] } } } }, { "rel": "https://api.w.org/action-sticky", "title": "Текущий пользователь может сделать эту запись прикрепленной.", "href": "http://wptest.ru/wp-json/wp/v2/posts/{id}", "targetSchema": { "type": "object", "properties": { "sticky": { "type": "boolean" } } } }, { "rel": "https://api.w.org/action-assign-author", "title": "Текущий пользователь может сменить автора для этой записи.", "href": "http://wptest.ru/wp-json/wp/v2/posts/{id}", "targetSchema": { "type": "object", "properties": { "author": { "type": "integer" } } } }, { "rel": "https://api.w.org/action-assign-categories", "title": "Текущий пользователь может назначать элементы в таксономии category.", "href": "http://wptest.ru/wp-json/wp/v2/posts/{id}", "targetSchema": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "integer" } } } } }, { "rel": "https://api.w.org/action-create-categories", "title": "Текущий пользователь может создавать элементы в таксономии category.", "href": "http://wptest.ru/wp-json/wp/v2/posts/{id}", "targetSchema": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "integer" } } } } }, { "rel": "https://api.w.org/action-assign-tags", "title": "Текущий пользователь может назначать элементы в таксономии post_tag.", "href": "http://wptest.ru/wp-json/wp/v2/posts/{id}", "targetSchema": { "type": "object", "properties": { "tags": { "type": "array", "items": { "type": "integer" } } } } }, { "rel": "https://api.w.org/action-create-tags", "title": "Текущий пользователь может создавать элементы в таксономии post_tag.", "href": "http://wptest.ru/wp-json/wp/v2/posts/{id}", "targetSchema": { "type": "object", "properties": { "tags": { "type": "array", "items": { "type": "integer" } } } } } ] } }