GET /api/users
List all users.

参数

参数名字 描述
search
选填

过滤结果

Validations:

  • Must be a String

order
选填

结果排序

Validations:

  • Must be a String

page
选填

编页结果

Validations:

  • Must be a String

per_page
选填

每个请求中的条目数

Validations:

  • Must be a String


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

参数

参数名字 描述
id
必填

Validations:

  • Must be a String


POST /api/users
Create an user.

Adds role 'Default role' to the user by default

参数

参数名字 描述
user
必填

Validations:

  • Must be a Hash

user[login]
必填

Validations:

  • Must be a String

user[firstname]
选填

Validations:

  • Must be a String

user[lastname]
选填

Validations:

  • Must be a String

user[mail]
必填

Validations:

  • Must be a String

user[admin]
选填

Is an admin account?

Validations:

  • Must be one of: true, false, 1, 0

user[password]
必填

Validations:

  • Must be a String

user[auth_source_id]
必填

Validations:

  • Must be a Integer


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

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

参数

参数名字 描述
id
必填

Validations:

  • Must be a String

user
必填

Validations:

  • Must be a Hash

user[login]
选填

Validations:

  • Must be a String

user[firstname]
选填 , 允许空值

Validations:

  • Must be a String

user[lastname]
选填 , 允许空值

Validations:

  • Must be a String

user[mail]
选填

Validations:

  • Must be a String

user[admin]
选填

Is an admin account?

Validations:

  • Must be one of: true, false, 1, 0

user[password]
选填

Validations:

  • Must be a String


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

参数

参数名字 描述
id
必填

Validations:

  • Must be a String