^Login

Roles API Retrieve Roles

This guide documents the Roles endpoint:




Retrieving Roles (get_roles)

The get_roles call returns all roles (active and inactive) that belong to the authenticated business, including their associated skills.

VariableValues & example
mk_actionget_roles
mk_data
{ "status":"all" }


Response

FieldDescription
rolesArray of role objects (see below)


FieldDescriptionExample
ROIDMicrokeeper Role ID1234
titleRole name / titleBar Manager
GIDGroup ID269
JIDJob ID5
active"1" (active) or "0" (inactive)1
skill_listArray of skills associated with this role[{"SMID":"10","title":"Driver License"},{"SMID":"15","title":"RSA"}]


skill_list array objects

FieldDescriptionExample
SMIDSkill Management ID10
titleSkill name / titleDriver License




Example Response

{
"success": "1",
"authenticated": "1",
"message": "Roles data",
"data": {
"roles": [
{
"ROID": "1234",
"title": "Senior Developer",
"GID": "269",
"JID": "5",
"active": "1",
"skill_list": [
{
"SMID": "10",
"title": "JavaScript"
},
{
"SMID": "15",
"title": "PHP"
},
{
"SMID": "22",
"title": "Database Design"
}
]
},
{
"ROID": "1235",
"title": "Project Manager",
"GID": "270",
"JID": "6",
"active": "1",
"skill_list": [
{
"SMID": "25",
"title": "Project Management"
},
{
"SMID": "30",
"title": "Team Leadership"
}
]
},
{
"ROID": "1236",
"title": "Junior Developer",
"GID": "269",
"JID": "5",
"active": "0",
"skill_list": []
}
]
}
}


Error Responses

ErrorDescriptionResponse
Missing statusThe status variable must be included
{ "success":"0", "authenticated":"1", "message":"The status variable must be included" }
Invalid statusStatus must be set to 'all'
{ "success":"0", "authenticated":"1", "message":"Roles API field status must be set to all" }
No roles foundNo roles exist in the account
{ "success":"0", "authenticated":"1", "message":"There are no roles in Microkeeper yet" }




Adding and Updating Roles

This feature is not yet available via the Microkeeper API, reach out to our support staff to discuss your options.