List agents and groups
List the agents and groups a record can be assigned to.
GET https://cotlet.dev/api/v1/sysaid/agents-and-groups
read
Returns each agent or group with its ID and name, and for groups the agents inside. Which of them can take a record depends on how assignees are configured for your account: a user, a group, or both.
Parameters
| Name | Type | Description |
|---|---|---|
| kind string | string | agent or group. Both when left out. |
| query string | string | Part of a name to search for. |
Request
curl https://cotlet.dev/api/v1/sysaid/agents-and-groups \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("sysaid", "list_agents_and_groups") const result = await cotlet.call('sysaid', 'list_agents_and_groups'); cotlet call sysaid list_agents_and_groups Example response
{
"groups": [
{
"id": "g332",
"name": "IT Support",
"members": [
"Jordan Reyes",
"Priya Nair"
]
},
{
"id": "g341",
"name": "Network",
"members": [
"Marcus Hill"
]
}
],
"agents": [
{
"id": "u2342",
"name": "Jordan Reyes"
},
{
"id": "u2351",
"name": "Priya Nair"
},
{
"id": "u2360",
"name": "Marcus Hill"
}
]
}