Roles

Get roles

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
orderbystringOptional

Sorting parameter Available values : entity fields Default value : id

orderstringOptional

Sorting parameter Available values : [ASC,DESC] Default value : ASC !! not work

limitinteger · int32Optional

Paging parameter Default value : null

offsetinteger · int32Optional

Paging parameter Default value : 0

qstringOptional

Filter parameter if this parameter is set then the api will return posts containing q text in name property

namestringOptional

Filter parameter return the roles with name value

Responses
200

OK

application/json
get
/api/v3/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

Get role

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
get
/api/v3/roles/100

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

Delete role

delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
delete
/api/v3/roles/8