Back to top

API TITLE HERE

API

Resource

GET/v1/users/{id}

description

Fetch the user

Note

Example URI

GET https://api.example.com/v1/users/1
URI Parameters
HideShow
id
number (required) Example: 1

user id

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "name": "name",
  "email": "example@example.com",
  "created_at": "2017-08-23 00:43:21",
  "updated_at": "2017-08-23 00:43:21"
}

Resource

GET/v1/users?{&name,email,limit,offset,order_by,direction}

description

Search users

Note

Example URI

GET https://api.example.com/v1/users?&name=name&email=example&limit=10&offset=10&order_by=created_at&direction=desc
URI Parameters
HideShow
name
string (optional) Example: name

Name

email
string (optional) Example: example

Email

limit
number (required) Example: 10

Limit for the pagination

offset
number (required) Example: 10

Offset for the pagination

order_by
string (optional) Example: created_at

Order key for the order

direction
string (optional) Example: desc

Direction for the order

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "total_count": "2",
    "users": [
        {
            "id": 1,
            "name": "name",
            "email": "example@example.com",
            "created_at": "2017-08-23 00:43:21",
            "updated_at": "2017-08-23 00:43:21"
        },
        {
            "id": 2,
            "name": "name",
            "email": "example2@example.com",
            "created_at": "2017-08-23 00:43:21",
            "updated_at": "2017-08-23 00:43:21"
        }
    ],
}

Resource

POST/v1/users

description

Create an user

body params

Name Type Required Description Example
name string required Name name
email string required Email example@example.com
password string required Password password

Note

Example URI

POST https://api.example.com/v1/users
Response  201
HideShow
Headers
Content-Type: application/json

Resource

PUT/v1/users/{id}

description

Update the users

body params

Name Type Required Description Example
name string optional Name name
email string optional Email example@example.com

Note

Example URI

PUT https://api.example.com/v1/users/1
URI Parameters
HideShow
id
number (required) Example: 1

user id.

Response  204
HideShow
Headers
Content-Type: application/json

Resource

DELETE/v1/users/{id}

description

Delete the user

Note

Example URI

DELETE https://api.example.com/v1/users/1
URI Parameters
HideShow
id
number (required) Example: 1

user id.

Response  204
HideShow
Headers
Content-Type: application/json

Generated by aglio on 24 Aug 2017