Roles

add role

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

Request Body

{
  "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

{
  "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"
  ]
}