GET /api/v1/roles
Display all available user roles.

Metadata

- Authentication: The user must be authenticated to perform this action.

GET /api/v1/roles/:id
Display a role.

Metadata

- Authentication: The user must be authenticated to perform this action.

Params

Param name Description
id
required

ID of the role to be displayed.

Validations:

  • Must be a String


POST /api/v1/roles
Create a new role.

Metadata

- Authentication: The user must be authenticated to perform this action.
- Admin privileges: The user has to have administrative privileges to perform this
    action.

Params

Param name Description
role
optional , nil allowed

Validations:

  • Must be a Hash

role[name]
required

Name of the role.

Validations:

  • Must be a String

role[role_matrix]
required

Capabilities of the role.

Validations:

  • Must be a Hash


PUT /api/v1/roles/:id
Update a role.

Metadata

- Authentication: The user must be authenticated to perform this action.
- Admin privileges: The user has to have administrative privileges to perform this
    action.

Params

Param name Description
role
optional , nil allowed

Validations:

  • Must be a Hash

role[name]
optional

Name of the role.

Validations:

  • Must be a String

role[role_matrix]
optional

Capabilities of the role.

Validations:

  • Must be a Hash


DELETE /api/v1/roles/:id
Delete a role.

Metadata

- Authentication: The user must be authenticated to perform this action.
- Admin privileges: The user has to have administrative privileges to perform this
    action.

Params

Param name Description
id
required

ID of the role ti be deleted.

Validations:

  • Must be a String