Websocket API Documentation (Event)
Connecting To The Websocket
The following URL can be used to connect to the websocket event API:
Event Filtering
The Event API allows connections to specify which events they want to receive from the websocket, by specifying property filters.
The Filter Message
A message, with the following format, can be sent to the websocket, in order to set the current filters for the connection.
"type" : "filter",
"filters" : [
{"property" : "<property name>" : "value" : "<filter value>"},
{"property" : "<property name>" : "value" : "<filter value>"},
...
]
}
Where <property name> is the name of the property to filter, and <filter value> is the property value to filter on. Multiple property filters can be specified.
Filter Message Response
When a filter message is sent, the websocket will respond with one of the following messages:
Wildcard
If you specify a value of "*" for a filter property value, the property filter will match on any value of the property.
Examples
The following filter will only allow events of type dial:
"type" : "filter",
"filters" : [
{"property" : "type" : "value" : "dial"}
]
}
The following filter will only allow events of type login and logout:
"type" : "filter",
"filters" : [
{"property" : "type" : "value" : "login"},
{"property" : "type" : "value" : "logout"}
]
}
The following filter will only allow events of type login and logout, for user mikey.
"type" : "filter",
"filters" : [
{"property" : "type" : "value" : "login"},
{"property" : "type" : "value" : "logout"},
{"property" : "username" : "value" : "mikey"}
]
}
The following filter will only allow events that reference a user:
"type" : "filter",
"filters" : [
{"property" : "username" : "value" : "*"}
]
}
REST Resources
The Live API exposes several REST resources, that allow access to the current state of specific objects in the system. All current live resources are listed below. Details concerning each resource, and their actions, can be found within the individual resource documentation pages.
Resource List
Notes on Resource Documentation
Due to the interdependent nature of resources in the system, the resource path information in the documentation is split into several sections. Paths in a specific section may relate to, or require, paths specified in other sections.
- Root Resource Paths : Specifies paths that can be used to access sets (multiple instances) of a resource, in relation to a parent resource.
- Instance Resource Paths : Specifies paths that can be used to access a specific instance of a resource. These paths require a Root Resource Path, in most cases, but not all.
- Sub Resource Paths : Specifies paths that provide access to the child resources, of a specific resource instance. These paths require an Instance Resource Path.
- Action Paths: Specifies paths that are used to perform actions on a specific resource instance. These paths require an Instance Resource Path.