Perform CRUD actions for roles.
Create a role.
this API is only for SysAdmin from Versafleet. OrgID in URL determine the organization that the role belongs to.
root, sysadmin, admin, sys, system, FreelanceDriver and their upper case, lower case case variations are not allowed to be used.
versafleet, gotsurge and their upper case, lower case case variations are not allowed to be used in the name.
orgID required | string ID of the organization |
role_name | string |
type | string |
{- "role_name": "My Role",
- "type": "built-in"
}
{- "message": "Successfully created a role"
}
This API is only for SysAdmin
Role name can be updated to :
orgID required | string ID of the organization |
role_name | string Enum: "OrgAdmin" "OrgTransporter" |
{- "role_name": "OrgAdmin"
}
{- "message": "Successfully updated a role"
}
Assign role to user for SysAdmin.
userID required | string ID of the user |
roleID required | string ID of the role |
{- "message": "Successfully assign role to user"
}
Assign role to user for OrgAdmin and OrgTransporter.
userID required | string ID of the user |
roleID required | string ID of the role |
{- "message": "Successfully assign role to user"
}
For now, this API return the roles that a user has.
In the future, this API will return claims instead of role.
userID required | string ID of the user |
{- "roles": [ ]
}
For now, this API return the roles that a user has.
In the future, this API will return claims instead of role.
userID required | string ID of the user |
{- "roles": [ ]
}
Return the list of roles within the organization given list
org_ids | Array of strings |
{- "org_ids": [
- "xxxxxx-xxxxx-xxxxx-xxxxxx"
]
}
{- "roles": [ ]
}
Assign role to user for OrgAdmin and OrgTransporter.
userID required | string ID of the user |
roleID required | string ID of the role |
{- "message": "Successfully assign role to user"
}