The functionality described in this CEL analytics guide is deprecated. All new Cumulocity IoT installations will use the Apama CEP engine. Software AG will terminate support for using CEL (Esper) in Cumulocity IoT on 31 Dec 2020 following its deprecation in 2018.
For further information on using Apama's Event Processing Language in Cumulocity IoT refer to the Streaming Analytics guide.
The module status: DEPLOYED, NOT_DEPLOYED (default).
POST: No PUT: Optional
GET Module
Response body: Module
Required role: ROLE_CEP_MANAGEMENT_READ
Example response:
HTTP/1.1 200 OK
Content-Type: application/vnd.com.nsn.cumulocity.cepmodule+json;ver=...
Content-Length: ...
{
"id":"1",
"lastModified":"2013-04-08T14:35:29.879+02:00",
"name":"the_module",
"self":"<<URL of cepModule>>",
"status":"NOT_DEPLOYED"
}
GET Module file with statements
Response body: text/plain
Required role: ROLE_CEP_MANAGEMENT_READ
Example response:
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: ...
@Name('test1')select * from EventCreated.win:time(1 hour)@Name('test2')select id, count(*) from MyOffOnStream.win:time(1 hour) group by id;
Warning: if given statement has default name assigned by cumulocity platform, annotation @Name will not appear.
Update Module
Request body: Module
Response body: Module (only if “Accept” header is provided)
module testmodule;
@Name('test1')select * from EventCreated.win:time(1 hour)@Name('test2')select id, count(*) from MyOffOnStream.win:time(1 hour) group by id;
The real-time notifications allow for receiving almost immediately outputs from statements. They are available on URL "/cep/notifications", the usage is described in a separate document.
Required role: ROLE_NOTIFICATION_READ
The subscription channel name format
The subscription channel contains the name of the module in which the real-time statement is defined and the name of the real-time statement itself. It has the following structure:
/<<moduleName>>/<<statementName>>
For example, to subscribe on notifications from a statement “overHeatAlarms” in the module “alarms”, the subscription channel should be the following string: