Agents
Get the number of Agents matching a search
Returns how many Agents match a search term, as a single total.
Use this instead of counting the response of GET /api/v1/agent/search. That endpoint
returns at most maxRecords results — 50 by default — so counting it reports the limit
rather than the number of matches whenever a search matches more Agents than the limit.
The term is matched the same way as GET /api/v1/agent/search: against Agent names and
descriptions, case-insensitive, and archived Agents are excluded unless includeArchived
is set. So this total always equals the number of Agents that search would return if its
limit were high enough.
GET
/
api
/
v1
/
agent
/
search
/
count
cURL
curl "https://dashboard.sequentum.com/api/v1/agent/search/count?query=checkout" \
-H "Authorization: ApiKey $SEQUENTUM_API_KEY"
# => { "totalCount": 214 }
# Include archived agents in the count:
# curl "https://dashboard.sequentum.com/api/v1/agent/search/count?query=checkout&includeArchived=true" \
# -H "Authorization: ApiKey $SEQUENTUM_API_KEY"const params = new URLSearchParams({ query: "checkout" });
const res = await fetch(`https://dashboard.sequentum.com/api/v1/agent/search/count?${params}`, {
headers: {
"Authorization": `ApiKey ${process.env.SEQUENTUM_API_KEY}`,
},
});
const { totalCount } = await res.json();
console.log(`${totalCount} agents match`);import os
import requests
response = requests.get(
"https://dashboard.sequentum.com/api/v1/agent/search/count",
params={"query": "checkout"},
headers={"Authorization": f"ApiKey {os.environ['SEQUENTUM_API_KEY']}"},
)
response.raise_for_status()
print(response.json()["totalCount"]) # e.g. 214{
"totalCount": 123
}{
"statusCode": 123,
"statusDescription": "<string>",
"message": "<string>",
"severity": 0,
"errorCode": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}