Last updated 22 days ago
Successful operation
const response = await fetch('/workspaces/{workspaceId}/inbox/capacity/{capacityRuleId}/agents', { method: 'GET', headers: { "Authorization": "Bearer jwt" }, }); const data = await response.json();
{ "agents": [ "123e4567-e89b-12d3-a456-426614174000" ] }
OK
const response = await fetch('/workspaces/{workspaceId}/inbox/capacity/{capacityRuleId}', { method: 'DELETE', headers: { "Authorization": "Bearer jwt" }, }); const data = await response.json();
{ "code": "text", "message": "text" }
ok
const response = await fetch('/workspaces/{workspaceId}/inbox/capacity/{capacityRuleId}', { method: 'GET', headers: { "Authorization": "Bearer jwt" }, }); const data = await response.json();
{ "id": "text", "workspaceId": "text", "name": "text", "description": "text", "default": false, "capacity": {}, "assignedAgentIds": [ "123e4567-e89b-12d3-a456-426614174000" ], "createdAt": "text", "updatedAt": "text" }
Retrieve list of capacity rule
const response = await fetch('/workspaces/{workspaceId}/inbox/capacity', { method: 'GET', headers: { "Authorization": "Bearer jwt" }, }); const data = await response.json();
{ "results": [ { "id": "text", "workspaceId": "text", "name": "text", "description": "text", "default": false, "capacity": {}, "assignedAgentIds": [ "123e4567-e89b-12d3-a456-426614174000" ], "createdAt": "text", "updatedAt": "text" } ] }
Assigned a Capacity Rule.
const response = await fetch('/workspaces/{workspaceId}/inbox/capacity/{capacityRuleId}/agents', { method: 'POST', headers: { "Authorization": "Bearer jwt", "Content-Type": "application/json" }, body: JSON.stringify({ "agents": [ "123e4567-e89b-12d3-a456-426614174000" ] }), }); const data = await response.json();