com.apama.cumulocity
Event GenericRequest


Generic requests can be sent to Cumulocity to allow any request in the Cumulocity REST API, using a REST URL and query string parameters.

Send this event to the GenericRequest.SEND_CHANNEL, and Cumulocity will respond on GenericResponse.SUBSCRIBE_CHANNEL channel with zero or more GenericResponse events and then one GenericResponseComplete .
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: RequestType.POST or RequestType.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: To create a measurement collection using GenericRequest, the following headers are required
        
dictionary<string, string> requestHeaders := new dictionary<string, string>;
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: RequestType.POST or RequestType.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().