Events

List events: GET /events

This method lists the available events

URLhttps://api.sense-os.nl/events
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType
pageThis parameter specifies which page of the results must be retrieved. The page offset starts at 0. xsd:integer
per_pageThis parameter specifies the amount of items that must be received at once. The maximum amount is 1000 items and the default amount is 100 items. xsd:integer

List event notifications: GET /events/notifications

This method lists the notifications that are connected to an event

URLhttps://api.sense-os.nl/events/notifications
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType
pageThis parameter specifies which page of the results must be retrieved. The page offset starts at 0. xsd:integer
per_pageThis parameter specifies the amount of items that must be received at once. The maximum amount is 1000 items and the default amount is 100 items. xsd:integer
totalReturns a count of the total amount of notifications if it has the value 1 xsd:integer
enabledReturns enabled or disabled notifications if it has the value, 1 or 0 resp. xsd:integer
eventReturns only notifications for this event name. xsd:string

Delete event notification: DELETE /events/notifications/{id}

This method deletes an event notification

URLhttps://api.sense-os.nl/events/notifications/{id}
MethodDELETE
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Create event notification: POST /events/notifications

This creates a new event notification by connecting an event to an existing notification. The source_id is an optional identifier which is used when connecting events to groups, domains and specific sensor mutations. The source_id can respectively be a group_id, domain_id or sensor_id.
The priority of the event notification is used to specify the order of execution. The execution priority order is from high to low.
When an url notification is connected to an event the folowing parameters are send via a POST request as application/x-www-form-urlencoded body data:
event = the event name
subject_id = the identifier of the object in question
source_id = optional identifier of the event location (e.g. group_id, domain_id, sensor_id)
user_id = the notification owner identifier

URLhttps://api.sense-os.nl/events/notifications
MethodPOST
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Request Body

The event notification object

{
    "event_notification": {
        "name": "new group user event notification",
        "event": "add_group_user",
        "notification_id": 40,
        "priority": 1
    }
}

Update event notification: PUT /events/notifications/{id}

This method update an event notification. An event notification can be disabled by setting enabled to false.

URLhttps://api.sense-os.nl/events/notifications/{id}
MethodPUT
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Request Body

The environment object

{
    "event_notification": {
        "name": "new group user event notification",
        "event": "add_group_user",
        "notification_id": 40,
        "priority": 2,
        "enabled": false
    }
}