Returns json data about a single user.
-
URL
/users/:id
-
Method:
GET
-
URL Params
Required:
id=[integer]
-
Data Params
None
-
Success Response:
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": [{
"type": "users",
"id": "1"
}]
}
- Error Response(s):
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/vnd.api+json
{
"errors": [
{
"status": "422",
"source": { "pointer": "/data/attributes/firstName" },
"title": "Invalid Attribute",
"detail": "First name must contain at least three characters."
}
]
}
HTTP/1.1 400 Bad Request
Content-Type: application/vnd.api+json
{
"errors": [
{
"status": "403",
"source": { "pointer": "/data/attributes/secretPowers" },
"detail": "Editing secret powers is not authorized on Sundays."
},
{
"status": "422",
"source": { "pointer": "/data/attributes/volume" },
"detail": "Volume does not, in fact, go to 11."
},
{
"status": "500",
"source": { "pointer": "/data/attributes/reputation" },
"title": "The backend responded with an error",
"detail": "Reputation service not responding after three requests."
}
]
}
- Sample Call:
curl --location --request GET "{{base-url}}/articles/1?=" \
--header "Authorization: {{token_type}} {{access_token}}"