Core - Count sessions
curl --request POST \
--url 'https://router.toqan.ai/eu/v2/sessions/count' \
--header "Authorization: Bearer $TOQAN_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"filters": {
"interval": "SESSION_INTERVAL_LAST_24_HOURS",
"project_id": "proj_01HZXW2K7Y8Q9M0N1P2R3S4T5V",
"tags": ["support"]
},
"limit": 25,
"page": 1
}'
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
project_id: '<string>',
tags: ['<string>'],
start_date: '<string>',
end_date: '<string>',
client: '<string>',
repo: '<string>'
},
limit: 123,
page: 123
})
};
fetch('https://router.toqan.ai/eu/v2/sessions/count', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://router.toqan.ai/eu/v2/sessions/count"
payload = {
"filters": {
"project_id": "<string>",
"tags": ["<string>"],
"start_date": "<string>",
"end_date": "<string>",
"client": "<string>",
"repo": "<string>"
},
"limit": 123,
"page": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"count": 123
}{
"message": "<string>",
"code": 123,
"details": [
"<unknown>"
]
}Threads
Get thread count
Get total count of trace threads.
POST
/
v2
/
sessions
/
count
Core - Count sessions
curl --request POST \
--url 'https://router.toqan.ai/eu/v2/sessions/count' \
--header "Authorization: Bearer $TOQAN_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"filters": {
"interval": "SESSION_INTERVAL_LAST_24_HOURS",
"project_id": "proj_01HZXW2K7Y8Q9M0N1P2R3S4T5V",
"tags": ["support"]
},
"limit": 25,
"page": 1
}'
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
project_id: '<string>',
tags: ['<string>'],
start_date: '<string>',
end_date: '<string>',
client: '<string>',
repo: '<string>'
},
limit: 123,
page: 123
})
};
fetch('https://router.toqan.ai/eu/v2/sessions/count', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://router.toqan.ai/eu/v2/sessions/count"
payload = {
"filters": {
"project_id": "<string>",
"tags": ["<string>"],
"start_date": "<string>",
"end_date": "<string>",
"client": "<string>",
"repo": "<string>"
},
"limit": 123,
"page": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"count": 123
}{
"message": "<string>",
"code": 123,
"details": [
"<unknown>"
]
}
