com.apama.cumulocity
Event GenericRequest


Generic requests, allowing to request anything available in the Cumulocity REST API, distinguishable by the URL provided and extra parameters.

EPL sends to the GenericRequest.SEND_CHANNEL, and transport will respond with zero or more GenericResponse and then one GenericResponseComplete on GenericResponse.SUBSCRIBE_CHANNEL channel.
Since:
10.5.0.0

Constant summary
 stringCHANNEL := "CumulocityIoTGenericChain"

Channel to send these events to.
Deprecated:
[This channel constant has been deprecated. Use SEND_CHANNEL instead.]
 stringSEND_CHANNEL := "CumulocityIoTGenericChain"

Channel to send these events to.
 
Member summary
 integerreqId

Identifier for this request; must be generated using com.apama.cumulocity.Util.generateReqId().
 stringmethod

The HTTP verb, for example "POST" or "GET".
 stringpath

The HTTP path for the request.
 dictionary<stringstring>queryParams

Parameters to be passed in the HTTP query string. Depending on the type of request, some examples of what can be set: 'id', 'source', 'type', 'fromDate', 'toDate', 'pageSize', 'withParents', 'withTotalPages', 'currentPage', 'revert'.
 booleanisPaging

Whether this is a request whose results should be paged.
 anybody

The request body should be a dictionary or sequence which will be encoded as JSON. If no body is required for this request, an empty any can be provided.
 dictionary<stringstring>headers

Additional HTTP headers.
 
Constant detail

CHANNEL

string CHANNEL := "CumulocityIoTGenericChain"
Deprecated:
[This channel constant has been deprecated. Use SEND_CHANNEL instead.]
Channel to send these events to.

SEND_CHANNEL

string SEND_CHANNEL := "CumulocityIoTGenericChain"
Channel to send these events to.
Since:
10.5.2.0

Member detail

body

any body
The request body should be a dictionary or sequence which will be encoded as JSON. If no body is required for this request, an empty any can be provided.

headers

dictionary<stringstringheaders
Additional HTTP headers.

Example:
 e.g. for a create measurement GenericRequest the following headers are required dictionary requestHeaders := new dictionary; requestHeaders.add("accept","application/json"); requestHeaders.add("content-type", "application/vnd.com.nsn.cumulocity.measurementCollection+json"); 

isPaging

boolean isPaging
Whether this is a request whose results should be paged.

If true, then all pages of the result will automatically be retrieved. This can be changed by setting currentPage in the queryParams.

If pageSize is not specified in queryParams, a default pageSize will be added if paging is enabled.

method

string method
The HTTP verb, for example "POST" or "GET".

path

string path
The HTTP path for the request.

For example, "/measurement/measurements".

queryParams

dictionary<stringstringqueryParams
Parameters to be passed in the HTTP query string. Depending on the type of request, some examples of what can be set: 'id', 'source', 'type', 'fromDate', 'toDate', 'pageSize', 'withParents', 'withTotalPages', 'currentPage', 'revert'.


reqId

integer reqId
Identifier for this request; must be generated using com.apama.cumulocity.Util.generateReqId().