Recipes
Step-by-step integrations built from published operations, each with curl examples.
ReferenceAPI: recipes — Recipe: list the open alarms of a site
In evalink talos, a "site" is represented by a device group: devices are linked to it through their deviceGroupId, and alarms carry the same deviceGroupId (plus the full group path in dgPath). There is no single endpoint that filters open alarms by one site directly, so the recipe combines two calls.
- Find the site's device group id. Call
device-service.getDeviceGroupsByCompanyIdto list the company's device groups and pick the one that represents the site:
curl -H 'Authorization: Bearer <token>' \
'https://talos.evalink.io/api/device-service/device-groups/search/findByCompanyId?companyId=<companyId>'
Note the id of the matching device group — this is <siteId> below.
- Fetch the company's open alarms. Call
alarm-service.getOpenedByCompanyV2, which always returns alarms in statusNEWonly (notIN_WORKorCLOSED) for the given company, paginated:
curl -H 'Authorization: Bearer <token>' \
'https://talos.evalink.io/api/alarm-service/alarms-thin/v2/open?companyId=<companyId>&page=0&size=200'
Each returned alarm includes deviceGroupId and dgPath (the ancestor chain of device groups). Keep only the alarms whose deviceGroupId equals <siteId>, or whose dgPath contains it, to scope the result to one site.
-
Page through the rest.
sizedefaults to 5000 and is capped at 20000;hasNextPagein the response tells you whether to request the nextpage. The optionalheaderNamesquery parameter can be repeated to also return specific alarm headers (for example a webhook'sweb-hook-idheader, see the webhook recipe) in each alarm'sheadersmap. -
Look up one alarm's full detail with
alarm-service.alarms.getonce you have itsid:
curl -H 'Authorization: Bearer <token>' \
'https://talos.evalink.io/api/alarm-service/alarms/<id>'
Or, to check whether one specific device currently has an open alarm, use alarm-service.alarms.search.findByDeviceIdAndAlarmStatus with alarmStatus=NEW instead of scanning the whole company.
ReferenceAPI: recipes — Recipe: onboard a device
Onboarding a device means creating a device group for its site (if it does not exist yet) and then creating the device itself, linked to that group.
- Create the site's device group, if it doesn't already exist, with
device-service.device-groups.create(POST /api/device-service/device-groups). Thetypefield acceptsDEVICE_GROUP,OUorSERVICE_COMPANY. The call returns201with the stored group:
curl -X POST -H 'Authorization: Bearer <token>' -H 'Content-Type: application/json' \
-d '{"companyId":"<companyId>","name":"Main Street 12","type":"DEVICE_GROUP"}' \
'https://talos.evalink.io/api/device-service/device-groups'
Keep the returned id as <deviceGroupId>.
- Create the device with
device-service.devices.create(POST /api/device-service/devices). The schema lists every field as optional, but the platform rejects a device withoutcompanyIdandevalinkDeviceId.sourcedefaults toTALOSif omitted, anddeviceGroupIdlinks the device to the site created above. The device group must exist and belong to the same company as the device, otherwise the request fails with a bad-request error:
curl -X POST -H 'Authorization: Bearer <token>' -H 'Content-Type: application/json' \
-d '{"companyId":"<companyId>","evalinkDeviceId":"<uniqueDeviceId>","name":"Front door panel","deviceGroupId":"<deviceGroupId>","communicationProtocol":"CONTACT_ID"}' \
'https://talos.evalink.io/api/device-service/devices'
The response (201) echoes the stored device, including a generated id. If you omit active, the new device is created active.
- Verify placement by reading the device back with
GET /api/device-service/devices/<id>; itsdeviceGroupId(anddeviceGroupName) shows the site it belongs to.
Notes: companyId is fixed at creation and cannot be changed afterwards. communicationProtocol is optional and accepts CONTACT_ID, SIA or EVALINK.
ReferenceAPI: recipes — Recipe: alarms raised through a webhook
evalink talos can raise an alarm whenever an external system calls a per-device webhook URL. This recipe shows how to verify the resulting alarms through the published alarm API; no webhook management operation is used here.
-
The external system calls the webhook URL it was given to raise an alarm.
-
Talos turns that call into a normal alarm on the device the webhook is bound to. The alarm carries the headers
x-source=web-hookandweb-hook-id= the id of the webhook. -
Confirm delivery over the API by listing the company's open alarms and requesting those headers with
headerNames:
curl -H 'Authorization: Bearer <token>' \
'https://talos.evalink.io/api/alarm-service/alarms-thin/v2/open?companyId=<companyId>&headerNames=x-source&headerNames=web-hook-id'
Each alarm's headers map then shows which webhook raised it.
- Or check one device directly with
alarm-service.alarms.search.findByDeviceIdAndAlarmStatus(both parameters are required;alarmStatusacceptsINITIAL,NEW,IN_WORK,CLOSED):
curl -H 'Authorization: Bearer <token>' \
'https://talos.evalink.io/api/alarm-service/alarms/search/findByDeviceIdAndAlarmStatus?deviceId=<deviceId>&alarmStatus=NEW'
A webhook configured for periodic supervision must be called at its interval; if it expires, talos raises a supervision alarm, provided the webhook integration is enabled for the company. Without that integration no alarm is created.