GET /api/users
List all users.

參數

參數名字 描述
search
選填

篩選結果

Validations:

  • Must be String

order
選填

排序結果

Validations:

  • Must be String

page
選填

編頁結果

Validations:

  • Must be String

per_page
選填

每個請求的項目數量

Validations:

  • Must be String


GET /api/users/:id
Show an user.

參數

參數名字 描述
id
必填

Validations:

  • Must be String


POST /api/users
Create an user.

Adds role 'Anonymous' to the user by default

參數

參數名字 描述
user
必填

Validations:

  • Must be a Hash

user[login]
必填

Validations:

  • Must be String

user[firstname]
選填

Validations:

  • Must be String

user[lastname]
選填

Validations:

  • Must be String

user[mail]
必填

Validations:

  • Must be String

user[admin]
選填

Is an admin account?

Validations:

  • Must be 'true' or 'false' or '1' or '0'

user[password]
必填

Validations:

  • Must be String

user[auth_source_id]
必填

Validations:

  • Must be Integer


PUT /api/users/:id
Update an user.

Adds role 'Anonymous' to the user if it is not already present. Only admin can set admin account.

參數

參數名字 描述
id
必填

Validations:

  • Must be String

user
必填

Validations:

  • Must be a Hash

user[login]
選填

Validations:

  • Must be String

user[firstname]
選填 , 允許空值

Validations:

  • Must be String

user[lastname]
選填 , 允許空值

Validations:

  • Must be String

user[mail]
選填

Validations:

  • Must be String

user[admin]
選填

Is an admin account?

Validations:

  • Must be 'true' or 'false' or '1' or '0'

user[password]
選填

Validations:

  • Must be String


DELETE /api/users/:id
Delete an user.

參數

參數名字 描述
id
必填

Validations:

  • Must be String