Get Users of a Role
- Print
- DarkLight
- PDF
Get Users of a Role
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Get
/api/v1/roles.getUsersInRole
Gets the users that belong to a specific role.
Changelog
Version | Description |
---|---|
1.3.0 | Added |
Header parameters
X-User-Id
stringRequired
The authenticated user ID.
ExamplerbAXPnMktTFbNpwtJ
X-Auth-Token
stringRequired
The authenticated user token.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
Query parameters
role
stringRequired
The role name or the role ID. For custom roles, use the role ID.
Example653ec9873c7460e18e6f
roomId
string
The room ID.
Examplehfiec783ifjl
offset
integer
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items.
Example50
count
integer
How many items to return.
Example50
Responses
200
OK
Success Example
{
"users": [
{
"_id": "voakrL3cHjYBwwRPq",
"username": "a",
"type": "user",
"status": "offline",
"active": true,
"name": "a"
},
{
"_id": "N2s7KG6YkzgJfXbyn",
"username": "b",
"type": "user",
"status": "offline",
"active": true,
"name": "b"
}
],
"success": true
}
object
users
Array of object
object
_id
string
username
string
type
string
status
string
active
boolean
name
string
success
boolean
400
Bad Request
Example 1
{
"success": false,
"error": "Query param \"role\" is required [error-param-not-provided]",
"errorType": "error-param-not-provided"
}
Example 2
{
"success": false,
"error": "[error-invalid-roleId]",
"errorType": "error-invalid-roleId"
}
object
success
boolean
error
string
errorType
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
Was this article helpful?