Roles

add role

POST https://ushahididocs.api.ushahidi.io/api/v3/roles

Request Body

Name
Type
Description

name

String

Name of the User

permissions

array

An array containing strings of role permissions

description

String

Role description

display_name

String

The user display name

protected

Boolean

Set True to protect the role and false for unprotected

{
  "id": 0,
  "url": "string",
  "name": "string",
  "display_name": "string",
  "description": "string",
  "permissions": [
    true
  ],
  "allowed_priviledges": [
    "string"
  ]
}

edit role

PUT https://ushahididocs.api.ushahidi.io/api/v3/roles/1

Request Body

Name
Type
Description

display_name

String

Display name

permissions

Array

An array containing strings of permissions

description

String

Role description

protected

Boolean

Set True to protect the role and false for unprotected

{
  "id": 1,
  "url": "https://ushahididocs.api.ushahidi.io//api/v3/roles/1",
  "name": "user",
  "display_name": "test user2",
  "description": "test user description",
  "permissions": [
    "Edit their own posts",
    "Delete Their Own Posts"
  ],
  "protected": true,
  "allowed_privileges": [
    "read",
    "create",
    "update",
    "search"
  ]
}