Examples

POST /api/usergroups
{
  "usergroup": {
    "name": "test_usergroup",
    "user_ids": [
      980190962,
      298486374,
      200482051
    ]
  }
}
201
{
  "admin": false,
  "created_at": "2019-09-11 14:33:33 UTC",
  "updated_at": "2019-09-11 14:33:33 UTC",
  "name": "test_usergroup",
  "id": 2,
  "external_usergroups": [],
  "usergroups": [],
  "users": [
    {
      "id": 980190962,
      "login": "one",
      "description": null
    },
    {
      "id": 298486374,
      "login": "two",
      "description": null
    },
    {
      "id": 200482051,
      "login": "test",
      "description": null
    }
  ],
  "roles": []
}

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

usergroup
required

Validations:

  • Must be a Hash

usergroup[name]
required

Validations:

  • Must be a String

usergroup[admin]
optional , nil allowed

is an admin user group

Validations:

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

usergroup[user_ids]
optional , nil allowed

Validations:

  • Must be an array of any type

usergroup[usergroup_ids]
optional , nil allowed

Validations:

  • Must be an array of any type

usergroup[role_ids]
optional , nil allowed

Validations:

  • Must be an array of any type