com.apama.cumulocity
Event GenericResponse


Response from Cumulocity to a GenericRequest. Zero or more GenericResponse events are sent by Cumulocity for each GenericRequest on the GenericResponse.SUBSCRIBE_CHANNEL channel, followed by a GenericResponseComplete.

GenericResponses are sent whenever the request is not an error and the response contains a JSON payload.

The query must return a JSON object.

response.body erroneously contains a single-element dictionary containing the response from the request. We now recommend that instead of using response.body you call the getBody action, which returns the response without the wrapping dictionary.

It is possible to get this behaviour directly in response.body by setting a correlator property on startup: analyticsBuilder.genericResponse.body=payload.body. This may be needed for compatibility with applications running as a Streaming Analytics application in Cumulocity IoT 10.9 or later if the matching tenant option has been set there. The system creates this event; an application author is not allowed to do this.
Since:
10.5.0.0

Constant summary
 stringCHANNEL := "cumulocity.generic.response"

The channel to which Generic responses are sent from the transport.
Deprecated:
[This channel constant has been deprecated. Use SUBSCRIBE_CHANNEL instead.]
 stringSUBSCRIBE_CHANNEL := "cumulocity.generic.response"

The channel to which Generic responses are sent from the transport.
 
Member summary
 integerreqId

Request identifier from the original GenericRequest.
 anybody

The response body, typically a dictionary or sequence.
Deprecated:
You should use the getBody() action instead of accessing the body member directly. This element will be marked private and its semantics will change in a future release.
 
Action summary
 anygetBody()

Return the response body as returned by the response. Typically a dictionary or sequence.
 
Constant detail

CHANNEL

string CHANNEL := "cumulocity.generic.response"
Deprecated:
[This channel constant has been deprecated. Use SUBSCRIBE_CHANNEL instead.]
The channel to which Generic responses are sent from the transport.

SUBSCRIBE_CHANNEL

string SUBSCRIBE_CHANNEL := "cumulocity.generic.response"
The channel to which Generic responses are sent from the transport.
Since:
10.5.2.0

Member detail

body

any body
Deprecated:
You should use the getBody() action instead of accessing the body member directly. This element will be marked private and its semantics will change in a future release.
The response body, typically a dictionary or sequence.

reqId

integer reqId
Request identifier from the original GenericRequest.
Action detail

getBody

any getBody()
Return the response body as returned by the response. Typically a dictionary or sequence.

Unlike the body member this will not be contained in a single-element dictionary wrapping the actual response.
Returns:
The response body.
Since:
10.7.1.3