Set alarm
POST
{{server}}/api/v1/counter/alarmThis endpoint initializes alarm. There is no any response, if it was successful.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Bearer {{counterToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/counter/alarm' \
-H 'Accept: application/json' \
-H 'X-WSID: {{counterWsID}}' \
-H 'Authorization: Bearer {{counterToken}}'
const response = await fetch("{{server}}/api/v1/counter/alarm", {
method: "POST",
headers: {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}"
},
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/counter/alarm"
headers = {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}"
}
response = requests.post(url, headers=headers)
print(response.status_code)
print(response.json())