Spaces
Get the number of Agents in a Space
Returns the number of Agents in the specified Space as a single total, so callers that only need a count do not have to fetch the full Agent list and count it themselves.
The total always matches the number of Agents returned by
GET /api/v1/spaces/{spaceId}/agents for the same Space and the same includeArchived
value, when that endpoint’s status filter is not set: archived Agents are excluded from
both unless includeArchived is set, and Space contents that are not Agents are not counted.
GET
/
api
/
v1
/
spaces
/
{spaceId}
/
agents
/
count
cURL
curl https://dashboard.sequentum.com/api/v1/spaces/42/agents/count \
-H "Authorization: ApiKey $SEQUENTUM_API_KEY"
# => { "totalCount": 73 }const res = await fetch("https://dashboard.sequentum.com/api/v1/spaces/42/agents/count", {
headers: {
"Authorization": `ApiKey ${process.env.SEQUENTUM_API_KEY}`,
},
});
const { totalCount } = await res.json();
console.log(`${totalCount} agents in this space`);import os
import requests
response = requests.get(
"https://dashboard.sequentum.com/api/v1/spaces/42/agents/count",
headers={"Authorization": f"ApiKey {os.environ['SEQUENTUM_API_KEY']}"},
)
response.raise_for_status()
print(response.json()["totalCount"]) # e.g. 73{
"totalCount": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"statusCode": 123,
"statusDescription": "<string>",
"message": "<string>",
"severity": 0,
"errorCode": "<string>"
}