Search Roles (Read-Only)

GET/api/roles/search/{keyword}

Turns a role name into a role id. Search results never carry the permissions column.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
keyword String Search keywords, matched against the role title
curl -X GET "https://yoursite.com/api/roles/search/acme" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
  { "id": "1", "title": "Project manager" }
]

Error-Response:

HTTP/1.1 404 Not Found
{ "status": false, "messages": { "error": "No data were found" } }
MethodGET
Path/api/roles/search/{keyword}
GroupRoles
Sincev1.0.0
Defined inRestApi/Controllers/RolesController.php