-
Notifications
You must be signed in to change notification settings - Fork 7
get users id
Harmun edited this page May 14, 2019
·
1 revision
get | /users/:id | User | Return a user specified by id | None | { id, userName, dateCreated } |
Returns a single user specified by the id parameter.
See GET users for getting users in bulk.
- Users can only access data for their own ID, unless they have the admin user role.
- The id parameter must be numeric.
Response formats | JSON |
Requires authentication? | Yes |
curl -X GET \
http://localhost:3000/users/2 \
-H 'Authorization: Bearer 123testtoken123' \
-H 'Host: localhost:3000'
A single user is returned as an object like this:
{
"id": 2,
"userName": "SteveRogers1918",
"dateCreated": "2019-05-14T10:01:56.000Z"
}