Get waiting info
GET
{{server}}/api/v1/dispenser/waitingInfoThis endpoint returns the waiting info by services in the branch.
Response
-
service: The service key -
time: Estimated waiting time in milliseconds -
tickets: Number of waiting tickets -
relation: Waiting time relation.-
gtmeans, greater than thetime -
eqmeans, the given value oftime -
ltmeans, less than thetime
-
Request
Authorization
| Header | Value |
|---|---|
Authorization | Apikey {{dispenserApikey}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{dispenserWsID}} |
Code snippets
- cURL
- JavaScript
- Python
curl -X GET '{{server}}/api/v1/dispenser/waitingInfo' \
-H 'Accept: application/json' \
-H 'X-WSID: {{dispenserWsID}}' \
-H 'Authorization: Apikey {{dispenserApikey}}'
const response = await fetch("{{server}}/api/v1/dispenser/waitingInfo", {
method: "GET",
headers: {
"Accept": "application/json",
"X-WSID": "{{dispenserWsID}}",
"Authorization": "Apikey {{dispenserApikey}}"
},
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/dispenser/waitingInfo"
headers = {
"Accept": "application/json",
"X-WSID": "{{dispenserWsID}}",
"Authorization": "Apikey {{dispenserApikey}}"
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
Example
Example request
GET
{{server}}/api/v1/dispenser/waitingInfoHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{dispenserWsID}} |
Example response 200 Ok
Response headers (9)
| Key | Value |
|---|---|
Access-Control-Expose-Headers | * |
Cache-Control | no-store, no-cache, must-revalidate |
Access-Control-Allow-Origin | * |
Access-Control-Allow-Methods | POST, PUT, GET, OPTIONS, DELETE |
Access-Control-Allow-Credentials | true |
Content-Length | 1421 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
Body
[
{
"service": "00000000-0000-4000-0007-000000000001",
"time": 120000,
"tickets": 0,
"counter": "18ed1b9a-a052-418c-6d54-94bc2fa03af1",
"relation": "lt"
},
{
"service": "00000000-0000-4000-0007-000000000002",
"time": 120000,
"tickets": 0,
"counter": "18ed1b9a-a052-418c-6d54-94bc2fa03af1",
"relation": "lt"
},
{
"service": "00000000-0000-4000-0007-000000000006",
"time": 120000,
"tickets": 0,
"counter": "18ed1b9a-a052-418c-6d54-94bc2fa03af1",
"relation": "lt"
},
{
"service": "00000000-0000-4000-0007-000000000005",
"time": 120000,
"tickets": 0,
"counter": "18ed1b9a-a052-418c-6d54-94bc2fa03af1",
"relation": "lt"
},
{
"service": "18ed1ace-7774-441b-648f-98d54a257490",
"time": 120000,
"tickets": 0,
"counter": "18ed1b9a-a052-418c-6d54-94bc2fa03af1",
"relation": "lt"
},
{
"service": "18ed1aa2-c5a3-4946-8ba7-f71bb5ce69c1",
"time": 120000,
"tickets": 0,
"counter": "18ed1b9a-a052-418c-6d54-94bc2fa03af1",
"relation": "lt"
},
{
"service": "18ed1abe-b483-48ee-38e4-1029aafe62af",
"time": 120000,
"tickets": 0,
"counter": "18ed1b9a-a052-418c-6d54-94bc2fa03af1",
"relation": "lt"
},
{
"service": "00000000-0000-4000-0007-000000000004",
"time": 120000,
"tickets": 0,
"counter": "18ed1b9a-a052-418c-6d54-94bc2fa03af1",
"relation": "lt"
},
{
"service": "00000000-0000-4000-0007-000000000003",
"time": 120000,
"tickets": 0,
"counter": "18ed1b9a-a052-418c-6d54-94bc2fa03af1",
"relation": "lt"
},
{
"service": "18ed1ac5-8602-44e0-0e48-05356a4733ea",
"time": 120000,
"tickets": 0,
"counter": "18ed1b9a-a052-418c-6d54-94bc2fa03af1",
"relation": "lt"
}
]