Get alarm status
GET
{{server}}/api/v1/dispenser/alarmCall this endpoint to get the alarm status.
Response
status(boolean): State of alarm
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/alarm' \
-H 'Accept: application/json' \
-H 'X-WSID: {{dispenserWsID}}' \
-H 'Authorization: Apikey {{dispenserApikey}}'
const response = await fetch("{{server}}/api/v1/dispenser/alarm", {
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/alarm"
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/alarmHeaders (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 | 16 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
Body
{
"status": false
}