Idle times
POST
{{server}}/api/v1/counter/session/idleTimesFor clerk statistics, the counter should send the measured idle times to the server. It can be sent everytime during the clerk session. It's recommended to send when the counter calls a ticket or stop the session.
If it was successful, it returns 204 and should reset the local measured values.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Bearer {{counterToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Body (json)
{
"idleTime": {
"passive": 123,
"active": 456
}
}
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/counter/session/idleTimes' \
-H 'Accept: application/json' \
-H 'X-WSID: {{counterWsID}}' \
-H 'Authorization: Bearer {{counterToken}}' \
-H 'Content-Type: application/json' \
-d '{
"idleTime": {
"passive": 123,
"active": 456
}
}'
const response = await fetch("{{server}}/api/v1/counter/session/idleTimes", {
method: "POST",
headers: {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"idleTime": {
"passive": 123,
"active": 456
}
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/counter/session/idleTimes"
headers = {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}",
"Content-Type": "application/json"
}
payload = {
"idleTime": {
"passive": 123,
"active": 456
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Example
Example request
POST
{{server}}/api/v1/counter/session/idleTimesHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Body
{
"idleTime": {
"passive": 123,
"active": 456
}
}
Example response 204 No Content
No response body