Skip to content

Latest commit

 

History

History
108 lines (90 loc) · 1.51 KB

users.md

File metadata and controls

108 lines (90 loc) · 1.51 KB

Table of Contents

GET /users

Get All Users

Permissions

  • users:*
  • users:get

Parameters

required

  • name string (except: [bob, john]) - user name

option

  • status numric (default: 10, only: [10, 20, 30]) - user status

📝 note

  • Here is note1
  • Here is note2

Example

200 Success

Request

GET /users
Content-Type: application/json

{
    "status": 10,
    "name": "tarou"
}

Response

200
Content-Type: application/json; charset=utf-8

{
    "id": 1,
    "name": "tarou",
    "status": 10,
    "created_at": "2015-04-21T14:55:09.351Z",
    "updated_at": "2015-04-21T14:55:09.351Z"
}

404 Not Found

Request

GET /users
Content-Type: application/json

{
    "status": 20,
    "name": "tarou"
}

Response

404
Content-Type: application/json; charset=utf-8

{
    "message": "not found"
}

POST /users/new

Post New User

Permissions

  • users:*
  • users:store

Parameters

required

  • name string (except: [bob, john]) - user name

option

  • status numric (default: 10, only: [10, 20, 30]) - user status

📝 note

  • Here is note1
  • Here is note2

Example

200 Success

Request

POST /users/new
Content-Type: application/json

{
    "status": 10,
    "name": "ichiro"
}

Response

200
Content-Type: application/json; charset=utf-8

{
    "id": 1,
    "created_at": "2015-04-21T14:55:09.351Z"
}