What is the meta field in the response of the user REST API?

Question

I use this command to send to the API:

curl -X 'GET' 
  'https://www.domain.com/wp-json/wp/v2/users/14?context=view' 
  -H 'accept: application/json' 
  -H 'authorization: Basic SmVmZnJleTpCdW1ibGViZWUwNjA0'

and I get this response:


{
  "id": 14,
  "name": "User",
  "url": "",
  "description": "",
  "link": "https://www.domain.com/author/User/",
  "slug": "User",
  "avatar_urls": {
    "24": "https://secure.gravatar.com/avatar/",
    "48": "https://secure.gravatar.com/avatar/",
    "96": "https://secure.gravatar.com/avatar/"
  },
  "meta": [],
  "_links": {
    "self": [
      {
        "href": "https://www.domain.com/wp-json/wp/v2/users/14"
      }
    ],
    "collection": [
      {
        "href": "https://www.domain.com/wp-json/wp/v2/users"
      }
    ]
  }
}

Does anyone know what the “Meta”:[] field is? If it is the user’s Metadata then how do I use this?

0
jeffinter 4 weeks 2021-09-24T07:21:57-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse