This repository was archived by the owner on Dec 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Users Resource
ashley williams edited this page Jun 12, 2015
·
1 revision
API Documentation
The User resource is represented in the database as such:
{
id: <Type.Integer.unique>
name: <Type.String.unique>
}
Creates a new User object.
Expects a request.payload with a single attribute, name, which is a unique String representing the user's name, e.g.:
{
name: "sedge"
}
Retrieves a collection of User objects.
Example response:
[
{
"id": 1,
"name": "ag_dubs"
},
{
"id": 2,
"name": "k88hudson"
},
{
"id": 3,
"name": "jbuckca"
}
]
Retrieves a single User object.
Example response:
// GET /users/1
{
"id": 1,
"name": "ag_dubs"
}
PUT /users/{id}
Updates a User object based on its id attribute.
Expects a request.payload with a single attribute, name, which is a unique String representing the user's name, e.g.:
// PUT /users/4
{
name: "gideon"
}
DELETE /users/{id}
Deletes a User object based on its id attribute.