{ "namespace": "wp/v2", "methods": [ "GET", "POST" ], "endpoints": [ { "methods": [ "GET" ], "args": { "context": { "description": "Рамки в которых сделан запрос, определяют поля в ответе.", "type": "string", "enum": [ "view", "embed", "edit" ], "default": "view", "required": false }, "page": { "description": "Текущая страница коллекции.", "type": "integer", "default": 1, "minimum": 1, "required": false }, "per_page": { "description": "Максимальное число объектов возвращаемое в выборке.", "type": "integer", "default": 10, "minimum": 1, "maximum": 100, "required": false }, "search": { "description": "Ограничить результаты до совпадающих со строкой.", "type": "string", "required": false }, "exclude": { "description": "Убедиться что выборка исключает определенные ID.", "type": "array", "items": { "type": "integer" }, "default": [], "required": false }, "include": { "description": "Ограничить выборку до определенных ID.", "type": "array", "items": { "type": "integer" }, "default": [], "required": false }, "offset": { "description": "Сдвиг выборки на определенное число объектов.", "type": "integer", "required": false }, "order": { "default": "asc", "description": "Упорядочить сортировку атрибута по возрастанию или убыванию.", "enum": [ "asc", "desc" ], "type": "string", "required": false }, "orderby": { "default": "name", "description": "Сортировать коллекцию по атрибуту объекта.", "enum": [ "id", "include", "name", "registered_date", "slug", "include_slugs", "email", "url" ], "type": "string", "required": false }, "slug": { "description": "Ограничить выборку пользователями с одним или более специальными ярлыками.", "type": "array", "items": { "type": "string" }, "required": false }, "roles": { "description": "Ограничить выборку до пользователей удовлетворяющих как минимум одной указанной роли. Можно указать CSV список или одну роль.", "type": "array", "items": { "type": "string" }, "required": false }, "who": { "description": "Ограничить выборку пользователями-авторами.", "type": "string", "enum": [ "authors" ], "required": false } } }, { "methods": [ "POST" ], "args": { "username": { "description": "Имя входа для пользователя.", "type": "string", "required": true }, "name": { "description": "Отображаемое имя пользователя.", "type": "string", "required": false }, "first_name": { "description": "Имя пользователя.", "type": "string", "required": false }, "last_name": { "description": "Фамилия пользователя.", "type": "string", "required": false }, "email": { "description": "Адрес email пользователя.", "type": "string", "format": "email", "required": true }, "url": { "description": "URL пользователя.", "type": "string", "format": "uri", "required": false }, "description": { "description": "Описание пользователя.", "type": "string", "required": false }, "locale": { "description": "Локаль для пользователя.", "type": "string", "enum": [ "", "en_US", "ru_RU" ], "required": false }, "nickname": { "description": "Ник пользователя.", "type": "string", "required": false }, "slug": { "description": "Буквенно-цифровой идентификатор пользователя.", "type": "string", "required": false }, "roles": { "description": "Роли назначенные пользователю.", "type": "array", "items": { "type": "string" }, "required": false }, "password": { "description": "Пароль пользователя (никогда не показывается).", "type": "string", "required": true }, "meta": { "description": "Мета поля.", "type": "object", "properties": [], "required": false } } } ], "schema": { "$schema": "http://json-schema.org/draft-04/schema#", "title": "user", "type": "object", "properties": { "id": { "description": "Уникальный идентификатор пользователя.", "type": "integer", "context": [ "embed", "view", "edit" ], "readonly": true }, "username": { "description": "Имя входа для пользователя.", "type": "string", "context": [ "edit" ], "required": true }, "name": { "description": "Отображаемое имя пользователя.", "type": "string", "context": [ "embed", "view", "edit" ] }, "first_name": { "description": "Имя пользователя.", "type": "string", "context": [ "edit" ] }, "last_name": { "description": "Фамилия пользователя.", "type": "string", "context": [ "edit" ] }, "email": { "description": "Адрес email пользователя.", "type": "string", "format": "email", "context": [ "edit" ], "required": true }, "url": { "description": "URL пользователя.", "type": "string", "format": "uri", "context": [ "embed", "view", "edit" ] }, "description": { "description": "Описание пользователя.", "type": "string", "context": [ "embed", "view", "edit" ] }, "link": { "description": "URL автора для пользователя.", "type": "string", "format": "uri", "context": [ "embed", "view", "edit" ], "readonly": true }, "locale": { "description": "Локаль для пользователя.", "type": "string", "enum": [ "", "en_US", "ru_RU" ], "context": [ "edit" ] }, "nickname": { "description": "Ник пользователя.", "type": "string", "context": [ "edit" ] }, "slug": { "description": "Буквенно-цифровой идентификатор пользователя.", "type": "string", "context": [ "embed", "view", "edit" ] }, "registered_date": { "description": "Дата регистрации пользователя.", "type": "string", "format": "date-time", "context": [ "edit" ], "readonly": true }, "roles": { "description": "Роли назначенные пользователю.", "type": "array", "items": { "type": "string" }, "context": [ "edit" ] }, "password": { "description": "Пароль пользователя (никогда не показывается).", "type": "string", "context": [], "required": true }, "capabilities": { "description": "Все возможности назначенные пользователю.", "type": "object", "context": [ "edit" ], "readonly": true }, "extra_capabilities": { "description": "Любые дополнительные возможности назначенные пользователю.", "type": "object", "context": [ "edit" ], "readonly": true }, "avatar_urls": { "description": "URL аватара пользователя.", "type": "object", "context": [ "embed", "view", "edit" ], "readonly": true, "properties": { "24": { "description": "URL аватары с размером изображения в 24 пикселей.", "type": "string", "format": "uri", "context": [ "embed", "view", "edit" ] }, "48": { "description": "URL аватары с размером изображения в 48 пикселей.", "type": "string", "format": "uri", "context": [ "embed", "view", "edit" ] }, "96": { "description": "URL аватары с размером изображения в 96 пикселей.", "type": "string", "format": "uri", "context": [ "embed", "view", "edit" ] } } }, "meta": { "description": "Мета поля.", "type": "object", "context": [ "view", "edit" ], "properties": [] } } }, "_links": { "self": [ { "href": "https://wp-kama.ru/api/wp/v2/users" } ] } }