Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
local ➜ ~ http OPTIONS wordpress-develop.dev/wp-json/wp/v2/users
{
"_links": {
"self": "http://wordpress-develop.dev/wp-json/wp/v2/users"
},
"endpoints": [
{
"args": {
"context": {
"default": "view",
"description": "Change the response format based on request context.",
"enum": [
"embed",
"view",
"edit"
],
"required": false
},
"order": {
"default": "asc",
"description": "Order sort attribute ascending or descending.",
"enum": [
"asc",
"desc"
],
"required": false
},
"orderby": {
"default": "name",
"description": "Sort collection by object attribute.",
"enum": [
"id",
"name",
"registered_date"
],
"required": false
},
"page": {
"default": 1,
"description": "Current page of the collection.",
"required": false
},
"per_page": {
"default": 10,
"description": "Maximum number of items to be returned in result set.",
"required": false
},
"search": {
"description": "Limit results to those matching a string.",
"required": false
}
},
"methods": [
"GET"
]
},
{
"args": {
"capabilities": {
"required": false
},
"description": {
"required": false
},
"email": {
"required": true
},
"first_name": {
"required": false
},
"last_name": {
"required": false
},
"name": {
"required": false
},
"nickname": {
"required": false
},
"password": {
"required": true
},
"role": {
"required": false
},
"slug": {
"required": false
},
"username": {
"required": true
}
},
"methods": [
"POST"
]
}
],
"methods": [
"GET",
"POST"
],
"namespace": "wp/v2",
"schema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"avatar_urls": {
"context": [
"embed",
"view",
"edit"
],
"description": "Avatar URLs for the object.",
"properties": {
"24": {
"context": [
"embed",
"view",
"edit"
],
"description": "Avatar URL with image size of 24 pixels.",
"type": "uri"
},
"48": {
"context": [
"embed",
"view",
"edit"
],
"description": "Avatar URL with image size of 48 pixels.",
"type": "uri"
},
"96": {
"context": [
"embed",
"view",
"edit"
],
"description": "Avatar URL with image size of 96 pixels.",
"type": "uri"
}
},
"readonly": true,
"type": "object"
},
"capabilities": {
"context": [
"view",
"edit"
],
"description": "All capabilities assigned to the user.",
"type": "object"
},
"description": {
"context": [
"embed",
"view",
"edit"
],
"description": "Description of the object.",
"type": "string"
},
"email": {
"context": [
"view",
"edit"
],
"description": "The email address for the object.",
"format": "email",
"required": true,
"type": "string"
},
"extra_capabilities": {
"context": [
"edit"
],
"description": "Any extra capabilities assigned to the user.",
"readonly": true,
"type": "object"
},
"first_name": {
"context": [
"view",
"edit"
],
"description": "First name for the object.",
"type": "string"
},
"id": {
"context": [
"embed",
"view",
"edit"
],
"description": "Unique identifier for the object.",
"readonly": true,
"type": "integer"
},
"last_name": {
"context": [
"view",
"edit"
],
"description": "Last name for the object.",
"type": "string"
},
"link": {
"context": [
"embed",
"view",
"edit"
],
"description": "Author URL to the object.",
"format": "uri",
"readonly": true,
"type": "string"
},
"name": {
"context": [
"embed",
"view",
"edit"
],
"description": "Display name for the object.",
"type": "string"
},
"nickname": {
"context": [
"view",
"edit"
],
"description": "The nickname for the object.",
"type": "string"
},
"registered_date": {
"context": [
"view",
"edit"
],
"description": "Registration date for the user.",
"readonly": true,
"type": "date-time"
},
"role": {
"description": "Role assigned to the user.",
"enum": [
"administrator",
"editor",
"author",
"contributor",
"subscriber"
],
"type": "string"
},
"roles": {
"context": [
"view",
"edit"
],
"description": "Roles assigned to the user.",
"readonly": true,
"type": "array"
},
"slug": {
"context": [
"embed",
"view",
"edit"
],
"description": "An alphanumeric identifier for the object unique to its type.",
"type": "string"
},
"url": {
"context": [
"embed",
"view",
"edit"
],
"description": "URL of the object.",
"format": "uri",
"readonly": true,
"type": "string"
},
"username": {
"context": [
"edit"
],
"description": "Login name for the user.",
"required": true,
"type": "string"
}
},
"title": "user",
"type": "object"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment