Download OpenAPI specification:Download
Using the RESTful Alarms API, you can retrieve and trigger alarms in XProtect. You can also get alarm statistics, list alarm messages and work with alarm snapshots. To get started quickly with the Alarms REST API, refer to our comprehensive quickstart quide. For more detailed information about the Alarms REST API and its endpoints, refer to the complete API reference.
⚠️ The Alarms REST API is currently in beta version. Future releases of this API might break backwards compatibility.
An alarm is an alert that requires attention or action from the security operator. Security operators view alarms in the Alarm Manager tab of Smart Client. Alarms have a state, priority and assigned user.
The state of an alarm describes how it is being handled. For example, it can be New
, In progress
, On hold
or Closed
. Each state is associated to a state level (integer). You can create custom state levels or view existing ones in the Alarms / Alarm Data Settings node in Management Client.
The priority of an alarm describes its importance or urgency. For example, it can be High
, Medium
or Low
. Each priority is associated to a priority level (integer). You can create custom priority levels or view existing ones in the Alarms / Alarm Data Settings node in Management Client.
The assigned user of an alarm is the owner of the alarm. For example, the security operator that is verifying the alarm.
Alarms can be created in two ways:
You can create an Alarm Definition with the Configuration REST API: Alarm definitions for a specific event type.
If you trigger an event with the Events REST API, a new alarm will be created if the event type matches the Alarm definition.
To use the Alarms REST API, you must have:
A system running XProtect 2023 R2 or later. You are recommended to set up a small separate system for development. If you don't have one, install XProtect following the Get started guide.
A Basic user or Windows user with access to some devices. If you don't have one, go to Create basic users.
⚠️ User credentials, bearer tokens, and other sensitive data are transmitted in cleartext if you do not set up certificates and use HTTPS. Make sure that your XProtect system is set up with HTTPS in production.
⚠️ To use most of the Alarms REST API you need a license including Alarm Manager. Check your license capabilities in the Product index
Follow this quickstart guide to retrieve alarms with cURL.
Verify the requirements
Check the initial Requirements.
Get an auth token
Replace the hostname test-01.example.com
, username myUser
, and password myPassword
before running the following sample.
curl --insecure --request POST "https://test-01.example.com/idp/connect/token" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=password" \
--data-urlencode "username=myUsername" \
--data-urlencode "password=myPassword" \
--data-urlencode "client_id=GrantValidatorClient"
In Windows Command Prompt (CMD), replace the line continuation character
\
with^
.
Retrieve alarms
Replace the hostname test-01.example.com
and the sample token eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L... ay0ferTwm-DZ4OxNXGTHk5t7R_YTWPjg
before running the following sample.
curl --insecure --request GET "https://test-01.example.com/api/rest/v1/alarms" \
--header "Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L... ay0ferTwm-DZ4OxNXGTHk5t7R_YTWPjg"
In Windows Command Prompt (CMD), replace the line continuation character
\
with^
.
☑️ If you receive an empty array, make sure that you have some alarm definitions set up and that they are triggered.
Follow this quickstart guide to retrieve alarms with Python.
Verify the requirements
Check the initial Requirements.
Install dependencies
pip install requests
Retrieve alarms
Replace the USERNAME username
, PASSWORD password
, and SERVER_URL https://test-01.example.com
before running the following sample.
import requests # pip install requests
USERNAME = 'username' # replace with your basic user name
PASSWORD = 'password' # replace with your basic user password
SERVER_URL = 'https://test-01.example.com' # replace with your server URL
VERIFY_CERTIFICATES = True # set to False in development if your certificates are self-signed
def main():
session = requests.Session()
# 1. Retrieve a token from IDP
response = session.request("POST",
f"{SERVER_URL}/IDP/connect/token",
headers={
'Content-Type': 'application/x-www-form-urlencoded'
},
data=f"grant_type=password"
f"&username={USERNAME}"
f"&password={PASSWORD}"
f"&client_id=GrantValidatorClient",
verify=VERIFY_CERTIFICATES)
if response.status_code != 200:
return print(f"Unable to retrieve token: {response.status_code}")
token = response.json()['access_token']
# 2. Retrieve alarms with the token
response = session.request("GET",
f"{SERVER_URL}/api/rest/v1/alarms",
headers={
'Authorization': f'Bearer {token}'
},
verify=VERIFY_CERTIFICATES)
if response.status_code != 200:
return print(f"Unable to retrieve alarms: {response.status_code}")
alarms = response.json()
print(f"GET /alarms response:\n{alarms}\n\n")
if __name__ == '__main__':
main()
☑️ If you receive an empty array, make sure that you have some alarm definitions set up and that they are triggered.
Follow this quickstart guide to retrieve alarms with Python using a Windows users.
Verify the requirements
Check the initial Requirements.
Install dependencies
pip install requests requests-ntlm
Retrieve alarms
Replace the USERNAME username
, PASSWORD password
, and SERVER_URL https://test-01.example.com
before running the following sample.
import requests # pip install requests
from requests_ntlm import HttpNtlmAuth # pip install requests-ntlm
USERNAME = 'domain\\username' # replace with your windows domain and username
PASSWORD = 'password' # replace with your windows user password
SERVER_URL = 'https://test-01.example.com' # replace with your server URL
VERIFY_CERTIFICATES = True # set to False in development if your certificates are self-signed
def main():
session = requests.Session()
# 1. Retrieve a token from IDP
response = session.request("POST",
f"{SERVER_URL}/IDP/connect/token",
headers={
'Content-Type': 'application/x-www-form-urlencoded'
},
data="grant_type=windows_credentials&client_id=GrantValidatorClient",
verify=VERIFY_CERTIFICATES,
auth=HttpNtlmAuth(USERNAME, PASSWORD))
if response.status_code != 200:
return print(f"Unable to retrieve token: {response.status_code}")
token = response.json()['access_token']
# 2. Retrieve alarms with the token
response = session.request("GET",
f"{SERVER_URL}/api/rest/v1/alarms",
headers={
'Authorization': f'Bearer {token}'
},
verify=VERIFY_CERTIFICATES)
if response.status_code != 200:
return print(f"Unable to retrieve alarms: {response.status_code}")
alarms = response.json()
print(f"GET /alarms response:\n{alarms}\n\n")
if __name__ == '__main__':
main()
☑️ If you receive an empty array, make sure that you have some alarm definitions set up and that they are triggered.
Follow this quickstart guide to retrieve alarms with Node.js.
Verify the requirements
Check the initial Requirements.
Retrieve alarms
Replace the USERNAME username
, PASSWORD password
, and SERVER_URL https://test-01.example.com
before running the following sample.
const USERNAME = 'username'; // replace with your basic user name
const PASSWORD = 'password'; // replace with your basic user password
const SERVER_URL = 'https://test-01.example.com'; // replace with your server URL
const VERIFY_CERTIFICATES = true; // set to False in development if your certificates are self-signed
if (!VERIFY_CERTIFICATES) process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
fetch(`${SERVER_URL}/IDP/connect/token`, {
method: 'POST',
headers:{
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
grant_type: 'password',
username: USERNAME,
password: PASSWORD,
client_id: 'GrantValidatorClient'
})
})
.then(response => response.json())
.then(token_response => {
const token = token_response['access_token'];
return fetch(`${SERVER_URL}/api/rest/v1/alarms`, {
headers:{
'Authorization': `Bearer ${token}`
}
})
})
.then(response => response.json())
.then(alarms => console.log(alarms))
.catch((err) => {
console.log(err);
});
☑️ If you receive an empty array, make sure that you have some alarm definitions set up and that they are triggered.
Follow this quickstart guide to retrieve alarms with the PowerShell.
Verify the requirements
Check the initial Requirements.
Get an auth token
Replace the hostname test-01.example.com
, username myUser
, and password myPassword
before running the following sample.
$headers = @{ "Content-Type" = "application/x-www-form-urlencoded" }
$body = @{grant_type='password'
username='myUsername'
password='myPassword'
client_id='GrantValidatorClient'}
$response = Invoke-RestMethod 'https://test-01.example.com/idp/connect/token' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
Retrieve alarms
Replace the hostname test-01.example.com
and the sample token eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L... ay0ferTwm-DZ4OxNXGTHk5t7R_YTWPjg
before running the following sample.
$headers = @{ "Authorization" = "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L...ay0ferTwm-DZ4OxNXGTHk5t7R_YTWPjg" }
$response = Invoke-RestMethod 'https://test-01.example.com/api/rest/v1/alarms' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
☑️ If you receive an empty array, make sure that you have some alarm definitions set up and that they are triggered.
You can add match filters to a resource URI to limit the amount of data returned.
GET /resource?property=operator:value
string
and DateTime
values are delimited with single quotation marks ('
), but int
values are not.
GET /resource?property=lt:'2023-04-14T07:42:49.223Z'
GET /resource?property=contains:'John'
GET /resource?property=gt:123
Array
values are required by some operators like oneOf
. Arrays are comma-separated list of values delimited by (
and )
:
GET /resource?property=oneOf:(1,4,8)
GET /resource?property=oneOf:('string value 1','string value 2')
When filtering by string values, escape any single quote '
as two single quotes ''
.
GET /resource?property=contains:'string with ''single'' quotes'
GET /resource?property=oneOf:('with ''quote''', 'more ''quotes''')
When no filter operator is included, the operator defaults to equals
.
GET /resource?property=value
GET /resource?property=equals:value
You can use any of the other available operators, like this:
GET /resource?property=notEquals:123
GET /resource?property=gt:123
GET /resource?property=lt:'2023-04-14T07:42:49.223Z'
GET /resource?property=startsWith:'Event'
GET /resource?property=contains:'a substring'
GET /resource?property=oneOf:(1,2,3)
You can combine multiple operators as a comma separated array, like this:
GET /resource?property=lt:'2023-04-14T07:42:49.223Z',gt:'2023-04-12T07:42:49.223Z'
Available filter operators:
lt
less thangt
greater thanequals
equalsnotEquals
not equalsstartsWith
string starts withcontains
string that containsoneOf
equals one of the values in the arrayYou can use the orderBy
query parameter to order the result of some resource collections.
GET /resource?orderBy=asc:'fieldName'
GET /resource?orderBy=desc:'fieldName'
You can fine tune the ordering combining multiple statements as a comma separated array, like this:
GET /resource?orderBy=asc:'field1',desc:'field2',asc:'field3'
Available ordering operators:
asc
ascendingdesc
descendingReturns the roles authorized to access an alarm given its id. Users might be part of multiple roles.
id required | string <guid> Alarm identifier as Guid. |
{- "data": {
- "canRead": [
- "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "c6bcf83b-aace-410b-8137-f00a2563f460"
]
}
}
page | integer <int32> |
size | integer <int32> |
{- "_links": {
- "prev": "string",
- "next": "string"
}, - "array": [
- {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 3,
- "name": "Building A - Security"
}
]
}
Creates a new alarm category.
level required | integer <int32> Integer level associated to the alarm category. |
name required | string Name of the alarm category. |
{- "level": 11,
- "name": "Closed"
}
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 3,
- "name": "Building A - Security"
}
}
Updates an alarm category given its id.
id required | string <guid> Alarm category identifier as Guid. |
The fields to update in the alarm category.
level required | integer Update the alarm category level. |
name required | string Update the alarm category name. |
{- "level": 1,
- "name": "updated name"
}
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 3,
- "name": "Building A - Security"
}
}
Retrieves the configuration of alarm close reasons, which can be used by operators as descriptions when closing alarms.
{- "data": {
- "enabled": true,
- "reasons": [
- "false alarm",
- "verified as secure"
]
}
}
Updates the configuration of alarm close reasons.
The new alarm close reasons configuration.
enabled required | boolean Reasons for closing feature is enabled. |
reasons required | Array of strings Array of reasons for closing available for selection. |
{- "enabled": true,
- "reasons": [
- "false alarm",
- "verified as secure"
]
}
{- "data": {
- "enabled": true,
- "reasons": [
- "false alarm",
- "verified as secure"
]
}
}
disabled | boolean or null |
page | integer <int32> |
size | integer <int32> |
{- "_links": {
- "prev": "string",
- "next": "string"
}, - "array": [
- {
- "displayName": "My alarm definition",
- "enabled": true,
- "id": "a748988c-5589-41d4-a3ee-fda98cf6733f",
- "name": "My alarm definition",
- "description": "This definition triggers an alarm every time when ...",
- "eventType": "0fcb1955-0e80-4fd4-a78a-db47ee89700c",
- "eventTypeGroup": "f67fc7a1-8d87-4204-90f7-1d5854f9f5cd",
- "sourceList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "enableRule": 0,
- "timeProfile": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "enableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "disableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "managementTimeoutTime": "00:10:00",
- "managementTimeoutEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "relatedCameraList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "mapType": 1,
- "relatedMap": "daa2165b-c545-406f-b4c3-1833d4e62923",
- "owner": "John Doe (Acme/JD)",
- "priority": "8188ff24-b5da-4c19-9ebf-c1d8fc2caa75",
- "category": "00000000-0000-0000-0000-000000000000",
- "triggerEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "autoClose": false,
- "assignableToAdmins": true,
- "relations": {
- "self": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "parent": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
}
}
]
}
Creates a new alarm definition.
displayName | string or null Alarm definition display name. |
enabled | boolean Is alarm definition enabled. |
id | string <guid> Id (unique) of the alarm definition. |
name required | string Alarm definition name. |
description required | string Alarm definition description. |
eventType | string or null <guid> Triggering event type (id). |
eventTypeGroup | string or null <guid> Triggering event type group (id). |
required | Array of objects (ItemDto) Array of source objects associated with the alarm. |
enableRule required | string Defines when the alarm can be triggered. Enum: "0" "1" "2". 0=Always, 1=TimeProfile, 2=EventTriggered. |
required | ItemDto (object) Defines what TimeProfile to be used when checking when the alarm is enabled. Valid only if EnableRule is set to "1". |
required | Array of objects (ItemDto) Defines list of event that could start the alarm. Valid only if EnableRule is set to "2". |
required | Array of objects (ItemDto) Defines list of event that could stop the alarm. Valid only if EnableRule is set to "2". |
managementTimeoutTime required | string <duration> Operator action time limit. If operator action is required within a specific time, the time is defined here. Format: HH:mm:ss. |
required | Array of objects (ItemDto) Defines list of events that could be triggered after managementTimeoutTime expiration. |
required | Array of objects (ItemDto) List of related camera items to the generated alarm. |
mapType required | string Alarm manager view map type. Enum: "0" "1" "2". 0=None, 1=Map, 2=Smart Map |
relatedMap required | string <guid> Id of related map item. Valid only if mapType is set to "1". |
owner required | string Defines the initial owner. Should be formatted as Identity.ToString() does. |
priority required | string <guid> Sets the initial priority of the generated alarm. |
category required | string <guid> Sets the initial category of the generated alarm. |
required | Array of objects (ItemDto) Defines list of events that could be triggered by the alarm. |
autoClose | boolean Defines if an alarm should be closed automatically upon reception of a specific message from save source. |
assignableToAdmins required | boolean Alarm assignable to Administrators. Select this to include users with an administrator role in the Assigned to list. |
(RelatedItemDto (object or null)) "Links" with relation objects. |
{- "displayName": "My alarm definition",
- "enabled": true,
- "id": "a748988c-5589-41d4-a3ee-fda98cf6733f",
- "name": "My alarm definition",
- "description": "This definition triggers an alarm every time when ...",
- "eventType": "0fcb1955-0e80-4fd4-a78a-db47ee89700c",
- "eventTypeGroup": "f67fc7a1-8d87-4204-90f7-1d5854f9f5cd",
- "sourceList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "enableRule": 0,
- "timeProfile": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "enableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "disableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "managementTimeoutTime": "00:10:00",
- "managementTimeoutEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "relatedCameraList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "mapType": 1,
- "relatedMap": "daa2165b-c545-406f-b4c3-1833d4e62923",
- "owner": "John Doe (Acme/JD)",
- "priority": "8188ff24-b5da-4c19-9ebf-c1d8fc2caa75",
- "category": "00000000-0000-0000-0000-000000000000",
- "triggerEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "autoClose": false,
- "assignableToAdmins": true,
- "relations": {
- "self": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "parent": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
}
}
{- "result": {
- "displayName": "My alarm definition",
- "enabled": true,
- "id": "a748988c-5589-41d4-a3ee-fda98cf6733f",
- "name": "My alarm definition",
- "description": "This definition triggers an alarm every time when ...",
- "eventType": "0fcb1955-0e80-4fd4-a78a-db47ee89700c",
- "eventTypeGroup": "f67fc7a1-8d87-4204-90f7-1d5854f9f5cd",
- "sourceList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "enableRule": 0,
- "timeProfile": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "enableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "disableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "managementTimeoutTime": "00:10:00",
- "managementTimeoutEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "relatedCameraList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "mapType": 1,
- "relatedMap": "daa2165b-c545-406f-b4c3-1833d4e62923",
- "owner": "John Doe (Acme/JD)",
- "priority": "8188ff24-b5da-4c19-9ebf-c1d8fc2caa75",
- "category": "00000000-0000-0000-0000-000000000000",
- "triggerEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "autoClose": false,
- "assignableToAdmins": true,
- "relations": {
- "self": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "parent": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
}
}
}
id required | string <guid> Alarm definition identifier as Guid. |
{- "data": {
- "displayName": "My alarm definition",
- "enabled": true,
- "id": "a748988c-5589-41d4-a3ee-fda98cf6733f",
- "name": "My alarm definition",
- "description": "This definition triggers an alarm every time when ...",
- "eventType": "0fcb1955-0e80-4fd4-a78a-db47ee89700c",
- "eventTypeGroup": "f67fc7a1-8d87-4204-90f7-1d5854f9f5cd",
- "sourceList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "enableRule": 0,
- "timeProfile": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "enableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "disableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "managementTimeoutTime": "00:10:00",
- "managementTimeoutEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "relatedCameraList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "mapType": 1,
- "relatedMap": "daa2165b-c545-406f-b4c3-1833d4e62923",
- "owner": "John Doe (Acme/JD)",
- "priority": "8188ff24-b5da-4c19-9ebf-c1d8fc2caa75",
- "category": "00000000-0000-0000-0000-000000000000",
- "triggerEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "autoClose": false,
- "assignableToAdmins": true,
- "relations": {
- "self": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "parent": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
}
}
}
Updates an alarm definition given its id.
id required | string <guid> Alarm definition identifier as Guid. |
The fields to update in the alarm definition.
displayName | string or null Alarm definition display name. |
enabled | boolean Is alarm definition enabled. |
id | string <guid> Id (unique) of the alarm definition. |
name required | string Alarm definition name. |
description required | string Alarm definition description. |
eventType | string or null <guid> Triggering event type (id). |
eventTypeGroup | string or null <guid> Triggering event type group (id). |
required | Array of objects (ItemDto) Array of source objects associated with the alarm. |
enableRule required | string Defines when the alarm can be triggered. Enum: "0" "1" "2". 0=Always, 1=TimeProfile, 2=EventTriggered. |
required | ItemDto (object) Defines what TimeProfile to be used when checking when the alarm is enabled. Valid only if EnableRule is set to "1". |
required | Array of objects (ItemDto) Defines list of event that could start the alarm. Valid only if EnableRule is set to "2". |
required | Array of objects (ItemDto) Defines list of event that could stop the alarm. Valid only if EnableRule is set to "2". |
managementTimeoutTime required | string <duration> Operator action time limit. If operator action is required within a specific time, the time is defined here. Format: HH:mm:ss. |
required | Array of objects (ItemDto) Defines list of events that could be triggered after managementTimeoutTime expiration. |
required | Array of objects (ItemDto) List of related camera items to the generated alarm. |
mapType required | string Alarm manager view map type. Enum: "0" "1" "2". 0=None, 1=Map, 2=Smart Map |
relatedMap required | string <guid> Id of related map item. Valid only if mapType is set to "1". |
owner required | string Defines the initial owner. Should be formatted as Identity.ToString() does. |
priority required | string <guid> Sets the initial priority of the generated alarm. |
category required | string <guid> Sets the initial category of the generated alarm. |
required | Array of objects (ItemDto) Defines list of events that could be triggered by the alarm. |
autoClose | boolean Defines if an alarm should be closed automatically upon reception of a specific message from save source. |
assignableToAdmins required | boolean Alarm assignable to Administrators. Select this to include users with an administrator role in the Assigned to list. |
(RelatedItemDto (object or null)) "Links" with relation objects. |
{- "displayName": "My alarm definition",
- "enabled": true,
- "id": "a748988c-5589-41d4-a3ee-fda98cf6733f",
- "name": "My alarm definition",
- "description": "This definition triggers an alarm every time when ...",
- "eventType": "0fcb1955-0e80-4fd4-a78a-db47ee89700c",
- "eventTypeGroup": "f67fc7a1-8d87-4204-90f7-1d5854f9f5cd",
- "sourceList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "enableRule": 0,
- "timeProfile": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "enableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "disableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "managementTimeoutTime": "00:10:00",
- "managementTimeoutEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "relatedCameraList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "mapType": 1,
- "relatedMap": "daa2165b-c545-406f-b4c3-1833d4e62923",
- "owner": "John Doe (Acme/JD)",
- "priority": "8188ff24-b5da-4c19-9ebf-c1d8fc2caa75",
- "category": "00000000-0000-0000-0000-000000000000",
- "triggerEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "autoClose": false,
- "assignableToAdmins": true,
- "relations": {
- "self": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "parent": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
}
}
{- "data": {
- "displayName": "My alarm definition",
- "enabled": true,
- "id": "a748988c-5589-41d4-a3ee-fda98cf6733f",
- "name": "My alarm definition",
- "description": "This definition triggers an alarm every time when ...",
- "eventType": "0fcb1955-0e80-4fd4-a78a-db47ee89700c",
- "eventTypeGroup": "f67fc7a1-8d87-4204-90f7-1d5854f9f5cd",
- "sourceList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "enableRule": 0,
- "timeProfile": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "enableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "disableEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "managementTimeoutTime": "00:10:00",
- "managementTimeoutEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "relatedCameraList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "mapType": 1,
- "relatedMap": "daa2165b-c545-406f-b4c3-1833d4e62923",
- "owner": "John Doe (Acme/JD)",
- "priority": "8188ff24-b5da-4c19-9ebf-c1d8fc2caa75",
- "category": "00000000-0000-0000-0000-000000000000",
- "triggerEventList": [
- {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
], - "autoClose": false,
- "assignableToAdmins": true,
- "relations": {
- "self": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}, - "parent": {
- "type": "userDefinedEvents",
- "id": "e07bc973-59fe-4b5b-9a87-47b1e53fdd78"
}
}
}
}
Alarm disables specify which event types not triggering alarms in a specific source during a given time.
page | integer <int32> |
size | integer <int32> |
{- "_links": {
- "prev": "string",
- "next": "string"
}, - "array": [
- {
- "source": "cameras/ba1d8392-9568-4ac9-ba38-03f92cafc506",
- "disabledEventTypes": [
- "b152c762-6997-466f-be7b-6134dc379455",
- "8a89262d-d226-4413-9c08-a031c5e04e42",
- "580e1924-9756-4fb1-b705-c0f664dd42f6"
], - "comment": "Feral cat keeps triggering motion detection in Camera - Door 3.",
- "expirationTime": "2023-02-28T18:10:12.4786334Z",
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "enabledEventTypes": [
- "7984f9d5-4706-476c-a449-ebd5da2b8fca",
- "2ddc826e-0783-495c-8fff-15ed19fd458a"
]
}
]
}
Creates a new alarm disable.
source required | string The resource path of the source for which alarms are disabled. |
disabledEventTypes required | Array of strings <guid> [ items <guid > ] Ids of the event types disabled for the source. Alarms that originate from any of these event types and this source are disabled. |
comment | string or null Description or justification for disabling the alarm. |
expirationTime required | string <date-time> Time at which the alarm disable is automatically removed by the server and alarms start being triggered again. |
{- "source": "cameras/ba1d8392-9568-4ac9-ba38-03f92cafc506",
- "disabledEventTypes": [
- "b152c762-6997-466f-be7b-6134dc379455",
- "8a89262d-d226-4413-9c08-a031c5e04e42",
- "580e1924-9756-4fb1-b705-c0f664dd42f6"
], - "comment": "Feral cat keeps triggering motion detection in Camera - Door 3.",
- "expirationTime": "2023-02-28T18:10:12.4786334Z"
}
{- "data": {
- "source": "cameras/ba1d8392-9568-4ac9-ba38-03f92cafc506",
- "disabledEventTypes": [
- "b152c762-6997-466f-be7b-6134dc379455",
- "8a89262d-d226-4413-9c08-a031c5e04e42",
- "580e1924-9756-4fb1-b705-c0f664dd42f6"
], - "comment": "Feral cat keeps triggering motion detection in Camera - Door 3.",
- "expirationTime": "2023-02-28T18:10:12.4786334Z",
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "enabledEventTypes": [
- "7984f9d5-4706-476c-a449-ebd5da2b8fca",
- "2ddc826e-0783-495c-8fff-15ed19fd458a"
]
}
}
Alarm disables specify which event types are not triggering alarms in a specific source during a given time.
id required | string <guid> |
{- "data": {
- "source": "cameras/ba1d8392-9568-4ac9-ba38-03f92cafc506",
- "disabledEventTypes": [
- "b152c762-6997-466f-be7b-6134dc379455",
- "8a89262d-d226-4413-9c08-a031c5e04e42",
- "580e1924-9756-4fb1-b705-c0f664dd42f6"
], - "comment": "Feral cat keeps triggering motion detection in Camera - Door 3.",
- "expirationTime": "2023-02-28T18:10:12.4786334Z",
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "enabledEventTypes": [
- "7984f9d5-4706-476c-a449-ebd5da2b8fca",
- "2ddc826e-0783-495c-8fff-15ed19fd458a"
]
}
}
Updates or creates an alarm disable given its id.
id required | string <guid> Alarm disable identifier as Guid. |
The fields to update in the alarm disable.
source required | string The resource path of the source for which alarms are disabled. |
disabledEventTypes required | Array of strings <guid> [ items <guid > ] Ids of the event types disabled for the source. Alarms that originate from any of these event types and this source are disabled. |
comment | string or null Description or justification for disabling the alarm. |
expirationTime required | string <date-time> Time at which the alarm disable is automatically removed by the server and alarms start being triggered again. |
{- "source": "cameras/ba1d8392-9568-4ac9-ba38-03f92cafc506",
- "disabledEventTypes": [
- "b152c762-6997-466f-be7b-6134dc379455",
- "8a89262d-d226-4413-9c08-a031c5e04e42",
- "580e1924-9756-4fb1-b705-c0f664dd42f6"
], - "comment": "Feral cat keeps triggering motion detection in Camera - Door 3.",
- "expirationTime": "2023-02-28T18:10:12.4786334Z"
}
{- "data": {
- "source": "cameras/ba1d8392-9568-4ac9-ba38-03f92cafc506",
- "disabledEventTypes": [
- "b152c762-6997-466f-be7b-6134dc379455",
- "8a89262d-d226-4413-9c08-a031c5e04e42",
- "580e1924-9756-4fb1-b705-c0f664dd42f6"
], - "comment": "Feral cat keeps triggering motion detection in Camera - Door 3.",
- "expirationTime": "2023-02-28T18:10:12.4786334Z",
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "enabledEventTypes": [
- "7984f9d5-4706-476c-a449-ebd5da2b8fca",
- "2ddc826e-0783-495c-8fff-15ed19fd458a"
]
}
}
Updates the configuration of manager columns.
The new alarm manager columns.
enabledColumns required | Array of strings (AlarmListColumn) Items Enum: "Priority" "PriorityName" "State" "StateName" "Category" "CategoryName" "Id" "Time" "Name" "Source" "Message" "Rule" "Vendor" "Location" "CustomTag" "Image" "Type" "ObjectValue" "AssignedTo" "ServerName" Array of columns available in alarm manager for selection. |
{- "enabledColumns": [
- "Priority",
- "Time"
]
}
{- "data": {
- "enabledColumns": [
- "Priority",
- "Time"
]
}
}
page | integer <int32> |
size | integer <int32> |
{- "_links": {
- "prev": "string",
- "next": "string"
}, - "array": [
- {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 5,
- "name": "Very High",
- "soundNotificationsOnLoop": true,
- "desktopNotificationsEnabled": 5,
- "soundId": "25ee70da-c3e8-452c-8c32-ff623e882581"
}
]
}
Creates a new alarm priority.
level required | integer <int32> Integer level associated to the alarm category. |
name required | string Name of the alarm category. |
soundNotificationsOnLoop required | boolean Loop sound notifications for alarms in Smart Client. |
desktopNotificationsEnabled required | boolean Display notifications for alarms in Smart Client. |
soundId required | string or null <guid> Sound notification for alarms in Smart Client. |
{- "level": 11,
- "name": "Closed",
- "soundNotificationsOnLoop": true,
- "desktopNotificationsEnabled": 5,
- "soundId": "25ee70da-c3e8-452c-8c32-ff623e882581"
}
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 5,
- "name": "Very High",
- "soundNotificationsOnLoop": true,
- "desktopNotificationsEnabled": 5,
- "soundId": "25ee70da-c3e8-452c-8c32-ff623e882581"
}
}
Updates an alarm priority given its id.
id required | string <guid> Alarm priority identifier as Guid. |
The fields to update in the alarm priority.
level required | integer <int32> Update the alarm priority level. |
name required | string Update the alarm priority name. |
soundNotificationsOnLoop required | boolean Update whether alarms sound notifications are looped in Smart Client. |
desktopNotificationsEnabled required | boolean Update whether alarms notifications are displayed in Smart Client. |
soundId required | string or null <guid> Sound notification for alarms in Smart Client. |
{- "level": 1,
- "name": "updated name",
- "soundNotificationsOnLoop": true,
- "desktopNotificationsEnabled": true,
- "soundId": "25ee70da-c3e8-452c-8c32-ff623e882581"
}
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 5,
- "name": "Very High",
- "soundNotificationsOnLoop": true,
- "desktopNotificationsEnabled": 5,
- "soundId": "25ee70da-c3e8-452c-8c32-ff623e882581"
}
}
Retrieves the alarm settings, including alarm and log retention.
{- "data": {
- "closedAlarmsRetentionPeriodDays": 30,
- "otherAlarmsRetentionPeriodDays": 15,
- "logsRetentionPeriodDays": 60,
- "traceEnabled": false
}
}
Updates the alarm settings, including alarm retention and logging.
The new alarm settings.
closedAlarmsRetentionPeriodDays required | integer <int32> Number of days up to which closed alarms are stored. |
otherAlarmsRetentionPeriodDays required | integer <int32> Number of days up to which non closed alarms are stored. |
traceEnabled required | boolean Trace logging is enabled, for troubleshooting purposes. |
{- "closedAlarmsRetentionPeriodDays": 30,
- "otherAlarmsRetentionPeriodDays": 15,
- "traceEnabled": false
}
{- "data": {
- "closedAlarmsRetentionPeriodDays": 30,
- "otherAlarmsRetentionPeriodDays": 15,
- "logsRetentionPeriodDays": 60,
- "traceEnabled": false
}
}
page | integer <int32> |
size | integer <int32> |
{- "_links": {
- "prev": "string",
- "next": "string"
}, - "array": [
- {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "name": "Ping sound",
- "sound": "string"
}
]
}
Creates a new alarm sound and upload its sound.
name required | string Name that describes the alarm sound. |
sound | string or null Base 64 encoded sound. |
{- "name": "Ping sound",
- "sound": "string"
}
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "name": "Ping sound",
- "sound": "string"
}
}
Retrieves an alarm sound given its id, including the actual source sound base 64 encoded.
id required | string <guid> Alarm sound identifier as Guid. |
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "name": "Ping sound",
- "sound": "string"
}
}
Creates a new alarm state.
level required | integer <int32> Integer level associated to the alarm state. |
name required | string Name of the alarm state. |
{- "level": 11,
- "name": "Closed"
}
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 11,
- "name": "Closed"
}
}
Updates an alarm state given its id.
id required | string <guid> Alarm state identifier as Guid. |
The fields to update in the alarm state.
level required | integer Update the alarm state level. |
name required | string Update the alarm state name. |
{- "level": 1,
- "name": "updated name"
}
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 11,
- "name": "Closed"
}
}
Alarm Statistics explain the number of alarms depending on their state.
include | string or null <include> Example: include=byState Use the include query parameter to receive optional fields. |
{- "data": {
- "byState": [
- {
- "level": 0,
- "count": 0
}
]
}
}
source required | string The resource path of the source device in the Configuration REST API. |
comment required | string or null A comment related with the suppression. |
expirationTime required | string <date-time> Time at which the alarm suppression expires. |
{- "source": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
- "expirationTime": "2023-02-28T18:10:12.4786334Z"
}
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "source": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "expirationTime": "2023-02-28T18:10:12.4786334Z",
- "comment": "Lorem ipsum dolor sit amet..."
}
}
Retrieve all alarm suppressions.
source.id | string or null <filter> Example: source.id=equals:'cameras/d0ba5376-35b6-4cb6-9d38-a976287f3569' Filter alarms suppressions according to the source id. Supports both formats: id and REST resource uri.
Allowed operators: |
page | integer <int32> |
size | integer <int32> |
{- "_links": {
- "prev": "string",
- "next": "string"
}, - "array": [
- {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "source": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "expirationTime": "2023-02-28T18:10:12.4786334Z",
- "comment": "Lorem ipsum dolor sit amet..."
}
]
}
Change the alarm suppression expiration time and comment.
id required | string <guid> |
comment required | string or null A comment related with the suppression. |
expirationTime required | string <date-time> Time at which the alarm suppression expires. |
{- "comment": "Lorem ipsum dolor sit amet...",
- "expirationTime": "2023-02-28T18:10:12.4786334Z"
}
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "source": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "expirationTime": "2023-02-28T18:10:12.4786334Z",
- "comment": "Lorem ipsum dolor sit amet..."
}
}
Retrieves the details of an alarm given its id.
id required | string <guid> Alarm identifier as Guid. |
include | string or null <include> Example: include=data Use the include query parameter to receive optional fields. |
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "localId": 4,
- "source": "string",
- "time": "2023-02-28T18:10:12.4786334Z",
- "lastUpdatedTime": "2023-02-28T21:09:05.1868451Z",
- "assignedTo": {
- "displayName": "basic ([basic]\\myUserName)"
}, - "name": "Blacklisted Car Detected",
- "message": "External Event",
- "category": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 3,
- "name": "Building A - Security"
}, - "priority": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 5,
- "name": "Very High"
}, - "state": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 11,
- "name": "Closed"
}, - "data": {
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "location": "string",
- "count": 0,
- "rules": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "polygons": [
- {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}
]
}
], - "objects": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "description": "string",
- "confidence": 0.1,
- "value": "string",
- "alarmTrigger": true,
- "removed": true,
- "color": "string",
- "size": 0.1,
- "sizeUnit": "string",
- "boundingBox": {
- "top": 0.1,
- "left": 0.1,
- "bottom": 0.1,
- "right": 0.1,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}
}, - "polygon": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}, - "motion": {
- "speed": 0.1,
- "speedUnit": "string",
- "path": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}
}, - "mask": "string",
- "data": "string"
}
], - "references": [
- "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c",
- "cameras/cd865c62-4962-4861-b109-5f4f1172f09e"
], - "vendor": {
- "name": "string",
- "customData": "string"
}
}, - "tag": "string"
}
}
Change the alarm state, priority, category and other fields.
id required | string <guid> |
comment required | string or null A comment for the alarm update, that will be returned as part of the alarm history. |
priority required | string <guid> Update the alarm priority. |
state required | string <guid> Update the alarm state. |
assignedTo.displayName required | string or null Reassign the alarm to another user (non-empty string), assign it to no user (empty string) or discard update of that field (null). Accepts any string. |
reasonForClosing required | string or null Update the reason for closing of the alarm. Configure reasons for closing in Management Client. |
{- "comment": "Security personnel verified the area and closed the door again.",
- "priority": "2050b7c1-7b89-44b2-92f0-9f6b00d9da84",
- "state": "6cfe4b7f-13f5-4cb8-8d1c-e1437ddfa93a",
- "assignedTo.displayName": "basic ([basic]\\myUserName)",
- "reasonForClosing": "Blacklisted car in door 3"
}
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "localId": 4,
- "source": "string",
- "time": "2023-02-28T18:10:12.4786334Z",
- "lastUpdatedTime": "2023-02-28T21:09:05.1868451Z",
- "assignedTo": {
- "displayName": "basic ([basic]\\myUserName)"
}, - "name": "Blacklisted Car Detected",
- "message": "External Event",
- "category": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 3,
- "name": "Building A - Security"
}, - "priority": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 5,
- "name": "Very High"
}, - "state": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 11,
- "name": "Closed"
}, - "data": {
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "location": "string",
- "count": 0,
- "rules": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "polygons": [
- {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}
]
}
], - "objects": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "description": "string",
- "confidence": 0.1,
- "value": "string",
- "alarmTrigger": true,
- "removed": true,
- "color": "string",
- "size": 0.1,
- "sizeUnit": "string",
- "boundingBox": {
- "top": 0.1,
- "left": 0.1,
- "bottom": 0.1,
- "right": 0.1,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}
}, - "polygon": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}, - "motion": {
- "speed": 0.1,
- "speedUnit": "string",
- "path": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}
}, - "mask": "string",
- "data": "string"
}
], - "references": [
- "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c",
- "cameras/cd865c62-4962-4861-b109-5f4f1172f09e"
], - "vendor": {
- "name": "string",
- "customData": "string"
}
}, - "tag": "string"
}
}
Creates a new alarm that is not associated to an event.
name required | string Name of the alarm. |
message required | string Description of the alarm cause. |
category | string or null <guid> The alarm category allows grouping of alarms. By default, the alarm belongs to no categories. |
priority | string or null <guid> The alarm priority explains the level of urgency and/or importance of an alarm. Configure alarm priorities in Management Client. By default, the alarm has priority |
state | string or null <guid> The alarm state describes what is being done with an alarm. Such as "New", "In Progress", "On Hold" or "Closed". Configure alarm states in Management Client. By defaults, the alarm has state |
assignedTo.displayName | string or null User to whom the alarm is assigned to. |
source required | string Source device of the alarm.
Some alarms (i.e. the ones coming from User Defined Events) can have the source set to null.
The source must be a valid REST resource string or a guid.
If the source device is camera the format can be |
time | string or null <date-time> Time at which the alarm was triggered in ISO 8601 format. |
tag | string or null Custom tag that coudl be used for sorting or filtering |
(AnalyticsData (object or null)) Associated analytics data, including objects in the scene and references. |
{- "name": "Blacklisted Car Detected",
- "message": "Blacklisted car in door 3",
- "category": "07ca8280-8bb8-40fe-8662-3db2324b8c8f",
- "priority": "3096f622-8884-453e-adcb-a614df7faf02",
- "state": "6f7056af-2be7-4273-bc8a-afbb823f6932",
- "assignedTo.displayName": "basic ([basic]\\myUserName)",
- "source": "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c",
- "time": "2023-02-28T18:10:12.4786334Z",
- "tag": "My custom tag",
- "data": {
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "location": "string",
- "count": 0,
- "rules": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "polygons": [
- {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}
]
}
], - "objects": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "description": "string",
- "confidence": 0.1,
- "value": "string",
- "alarmTrigger": true,
- "removed": true,
- "color": "string",
- "size": 0.1,
- "sizeUnit": "string",
- "boundingBox": {
- "top": 0.1,
- "left": 0.1,
- "bottom": 0.1,
- "right": 0.1,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}
}, - "polygon": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}, - "motion": {
- "speed": 0.1,
- "speedUnit": "string",
- "path": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}
}, - "mask": "string",
- "data": "string"
}
], - "references": [
- "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c",
- "cameras/cd865c62-4962-4861-b109-5f4f1172f09e"
], - "vendor": {
- "name": "string",
- "customData": "string"
}, - "snapshots": [
- {
- "timeOffset": 0,
- "width": 0,
- "height": 0,
- "hasOverlay": true,
- "sizeInBytes": 0,
- "image": "string",
- "path": "string",
- "source": "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c"
}
]
}
}
{- "data": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "localId": 4,
- "source": "string",
- "time": "2023-02-28T18:10:12.4786334Z",
- "lastUpdatedTime": "2023-02-28T21:09:05.1868451Z",
- "assignedTo": {
- "displayName": "basic ([basic]\\myUserName)"
}, - "name": "Blacklisted Car Detected",
- "message": "External Event",
- "category": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 3,
- "name": "Building A - Security"
}, - "priority": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 5,
- "name": "Very High"
}, - "state": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 11,
- "name": "Closed"
}, - "data": {
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "location": "string",
- "count": 0,
- "rules": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "polygons": [
- {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}
]
}
], - "objects": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "description": "string",
- "confidence": 0.1,
- "value": "string",
- "alarmTrigger": true,
- "removed": true,
- "color": "string",
- "size": 0.1,
- "sizeUnit": "string",
- "boundingBox": {
- "top": 0.1,
- "left": 0.1,
- "bottom": 0.1,
- "right": 0.1,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}
}, - "polygon": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}, - "motion": {
- "speed": 0.1,
- "speedUnit": "string",
- "path": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}
}, - "mask": "string",
- "data": "string"
}
], - "references": [
- "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c",
- "cameras/cd865c62-4962-4861-b109-5f4f1172f09e"
], - "vendor": {
- "name": "string",
- "customData": "string"
}
}, - "tag": "string"
}
}
Retrieve all alarms, including closed alarms.
orderBy | string or null <orderBy> Example: orderBy=asc:'localId',desc:'message' Order alarms according to one or more fields.
Allowed operators: |
localId | integer or null <filter> Example: localId=53 Filter alarms according to the localId.
Allowed operators: |
message | string or null <filter> Example: message=contains:'External Event' Filter alarms according to the alarm message.
Allowed operators: |
assignedTo.displayName | string or null <filter> Example: assignedTo.displayName=startsWith:'Basic',contains:'John' Filter alarms according to the assigned user.
Allowed operators: |
time | string or null <filter> Example: time=gt:'2023-02-28T21:09:05.1868451Z',lt:'2023-02-29T21:09:05.18Z' Filter alarms according to the time when the alarm was triggered. Supports an accuracy of 10ms.
Allowed operators: |
lastUpdatedTime | string or null <filter> Example: lastUpdatedTime=gt:'2023-02-28T21:09:05.1868451Z',lt:'2023-02-29T21:09:05.18Z' Filter alarms according to the time when they were last modified. I.e., when someone reassigns the alarm or changes its priority. Supports an accuracy of 10ms.
Allowed operators: |
state.level | integer or null <filter> Example: state.level=gt:4,lt:11 Filter alarms according to the state level.
Allowed operators: |
state.name | string or null <filter> Example: state.name=notEquals:'Closed' Filter alarms according to the state name.
Allowed operators: |
priority.level | integer or null <filter> Example: priority.level=gt:1 Filter alarms according to the state level.
Allowed operators: |
priority.name | string or null <filter> Example: priority.name=notEquals:'Low' Filter alarms according to the state name.
Allowed operators: |
category.level | integer or null <filter> Example: category.level=gt:3,lt:8 Filter alarms according to the state level.
Allowed operators: |
category.name | string or null <filter> Example: category.name=notEquals:'Alarm Category A' Filter alarms according to the state name.
Allowed operators: |
source.name | string or null <filter> Example: source.name=notEquals:'Camera main entry' Filter alarms according to the source name.
Allowed operators: |
source.id | string or null <filter> Example: source.id=equals:'cameras/d0ba5376-35b6-4cb6-9d38-a976287f3569' Filter alarms according to the source id. Supports both formats: id and REST resource uri.
Allowed operators: |
page | integer <int32> |
size | integer <int32> |
{- "_links": {
- "prev": "string",
- "next": "string"
}, - "array": [
- {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "localId": 4,
- "source": "string",
- "time": "2023-02-28T18:10:12.4786334Z",
- "lastUpdatedTime": "2023-02-28T21:09:05.1868451Z",
- "assignedTo": {
- "displayName": "basic ([basic]\\myUserName)"
}, - "name": "Blacklisted Car Detected",
- "message": "External Event",
- "category": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 3,
- "name": "Building A - Security"
}, - "priority": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 5,
- "name": "Very High"
}, - "state": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 11,
- "name": "Closed"
}, - "data": {
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "location": "string",
- "count": 0,
- "rules": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "polygons": [
- {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": null,
- "y": null
}
]
}
]
}
], - "objects": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "description": "string",
- "confidence": 0.1,
- "value": "string",
- "alarmTrigger": true,
- "removed": true,
- "color": "string",
- "size": 0.1,
- "sizeUnit": "string",
- "boundingBox": {
- "top": 0.1,
- "left": 0.1,
- "bottom": 0.1,
- "right": 0.1,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}
}, - "polygon": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": 0.1,
- "y": 0.1
}
]
}, - "motion": {
- "speed": 0.1,
- "speedUnit": "string",
- "path": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": null,
- "y": null
}
]
}
}, - "mask": "string",
- "data": "string"
}
], - "references": [
- "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c",
- "cameras/cd865c62-4962-4861-b109-5f4f1172f09e"
], - "vendor": {
- "name": "string",
- "customData": "string"
}
}, - "tag": "string"
}
]
}
List stored history of the alarm changes starting from the oldest.
id required | string <guid> |
page | integer <int32> |
size | integer <int32> |
{- "_links": {
- "prev": "string",
- "next": "string"
}, - "array": [
- {
- "time": "2023-02-28T18:10:12.4786334Z",
- "modifiedBy": "Domain/Domain user",
- "modifiedFields": [
- {
- "field": "priority.level",
- "value": 4
}
], - "comment": "The security guard verified that the car was authorized, not a threat, closing alarm."
}
]
}
List all stored snapshots of the alarm, if any, in their attachment order.
id required | string <guid> |
page | integer <int32> |
size | integer <int32> |
{- "_links": {
- "prev": "string",
- "next": "string"
}, - "array": [
- {
- "timeOffset": 0,
- "width": 0,
- "height": 0,
- "hasOverlay": true,
- "sizeInBytes": 0,
- "image": "string",
- "path": "string",
- "source": "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c"
}
]
}
Creates a new snapshot and attaches it to an alarm with given id.
id required | string <guid> |
timeOffset | integer <int32> The time offset in milliseconds relative to the event timestamp. |
width | integer The width of the image in pixels. |
height | integer The height of the image in pixels. |
hasOverlay | boolean A flag indicating whether the image has overlay rendered into the image. |
sizeInBytes | integer The size in bytes of the binary image. |
image | string or null <byte> A binary JPEG image, if the image is stored in the alarm database. |
path | string or null A path to the image on the server, if the image is stored in the event server. |
source | string or null A source of the snapshot, if the snapshot refers to the recorded image on the recording server.
The source must be set to a valid REST resource string.
If the source device is a camera the format will be |
{- "timeOffset": 0,
- "width": 0,
- "height": 0,
- "hasOverlay": true,
- "sizeInBytes": 0,
- "image": "string",
- "path": "string",
- "source": "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c"
}
{- "data": {
- "timeOffset": 0,
- "width": 0,
- "height": 0,
- "hasOverlay": true,
- "sizeInBytes": 0,
- "image": "string",
- "path": "string",
- "source": "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c"
}
}
Returns an array of new alarms, an array of updated alarms and an array of alarms identifiers deleted from current version.
id required | string <guid> |
maxSize | integer <maxSize> Example: maxSize=data Use the maxSize query parameter to define the number of requested alarms. |
{- "data": {
- "deletedFromSession": [
- "string"
], - "addedToSession": [
- {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "localId": 4,
- "source": "string",
- "time": "2023-02-28T18:10:12.4786334Z",
- "lastUpdatedTime": "2023-02-28T21:09:05.1868451Z",
- "assignedTo": {
- "displayName": "basic ([basic]\\myUserName)"
}, - "name": "Blacklisted Car Detected",
- "message": "External Event",
- "category": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 3,
- "name": "Building A - Security"
}, - "priority": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 5,
- "name": "Very High"
}, - "state": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 11,
- "name": "Closed"
}, - "data": {
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "location": "string",
- "count": 0,
- "rules": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "polygons": [
- {
- "closed": true,
- "color": {
- "a": null,
- "r": null,
- "g": null,
- "b": null
}, - "fillColor": {
- "a": null,
- "r": null,
- "g": null,
- "b": null
}, - "points": [
- null
]
}
]
}
], - "objects": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "description": "string",
- "confidence": 0.1,
- "value": "string",
- "alarmTrigger": true,
- "removed": true,
- "color": "string",
- "size": 0.1,
- "sizeUnit": "string",
- "boundingBox": {
- "top": 0.1,
- "left": 0.1,
- "bottom": 0.1,
- "right": 0.1,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}
}, - "polygon": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": null,
- "y": null
}
]
}, - "motion": {
- "speed": 0.1,
- "speedUnit": "string",
- "path": {
- "closed": true,
- "color": {
- "a": null,
- "r": null,
- "g": null,
- "b": null
}, - "fillColor": {
- "a": null,
- "r": null,
- "g": null,
- "b": null
}, - "points": [
- null
]
}
}, - "mask": "string",
- "data": "string"
}
], - "references": [
- "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c",
- "cameras/cd865c62-4962-4861-b109-5f4f1172f09e"
], - "vendor": {
- "name": "string",
- "customData": "string"
}
}, - "tag": "string"
}
], - "updatedInSession": [
- {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "localId": 4,
- "source": "string",
- "time": "2023-02-28T18:10:12.4786334Z",
- "lastUpdatedTime": "2023-02-28T21:09:05.1868451Z",
- "assignedTo": {
- "displayName": "basic ([basic]\\myUserName)"
}, - "name": "Blacklisted Car Detected",
- "message": "External Event",
- "category": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 3,
- "name": "Building A - Security"
}, - "priority": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 5,
- "name": "Very High"
}, - "state": {
- "id": "c4c6e1f5-9b2a-455e-905a-654fde888ae1",
- "level": 11,
- "name": "Closed"
}, - "data": {
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "location": "string",
- "count": 0,
- "rules": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "polygons": [
- {
- "closed": true,
- "color": {
- "a": null,
- "r": null,
- "g": null,
- "b": null
}, - "fillColor": {
- "a": null,
- "r": null,
- "g": null,
- "b": null
}, - "points": [
- null
]
}
]
}
], - "objects": [
- {
- "id": "string",
- "name": "string",
- "type": "string",
- "description": "string",
- "confidence": 0.1,
- "value": "string",
- "alarmTrigger": true,
- "removed": true,
- "color": "string",
- "size": 0.1,
- "sizeUnit": "string",
- "boundingBox": {
- "top": 0.1,
- "left": 0.1,
- "bottom": 0.1,
- "right": 0.1,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}
}, - "polygon": {
- "closed": true,
- "color": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "fillColor": {
- "a": 0,
- "r": 0,
- "g": 0,
- "b": 0
}, - "points": [
- {
- "x": null,
- "y": null
}
]
}, - "motion": {
- "speed": 0.1,
- "speedUnit": "string",
- "path": {
- "closed": true,
- "color": {
- "a": null,
- "r": null,
- "g": null,
- "b": null
}, - "fillColor": {
- "a": null,
- "r": null,
- "g": null,
- "b": null
}, - "points": [
- null
]
}
}, - "mask": "string",
- "data": "string"
}
], - "references": [
- "cameras/e028f597-c64b-4f27-bb8d-08f5cd768e1c",
- "cameras/cd865c62-4962-4861-b109-5f4f1172f09e"
], - "vendor": {
- "name": "string",
- "customData": "string"
}
}, - "tag": "string"
}
]
}
}
Create an alarm session with a set of filters and an ordering criteria.If the filters or the ordering changes, you must delete the current session and start a new one.Use the session id to retrieve the alarms in the session.
required | Array of objects (AlarmSessionFilter) Filter conditions for alarms in the current session. |
required | Array of objects (AlarmSessionOrderBy) Order by conditions for alarms in the current session. |
{- "filterBy": [
- {
- "operator": "equals",
- "target": "id",
- "value": null
}
], - "orderBy": [
- {
- "target": "id",
- "direction": "asc"
}
]
}
{- "filterBy": [
- {
- "operator": "equals",
- "target": "id",
- "value": null
}
], - "orderBy": [
- {
- "target": "id",
- "direction": "asc"
}
], - "id": "string"
}