The following resources are applicable:
Mount Point: /v2/streams/subscribe
Push REST API to subscribe to a given topic and receive messages published under that topic.
When the client connects to this URL, the response is suspended,
Comet Long Polling session is initiated.
By default a server-side timeout of 1 minute is applied to the suspended response.
The client code is expected to handle the closing of the connection from the server side and
perform a reconnect if necessary. A maximum time out of 5 minutes can be specified.
Upon receiving a message on the subscribed topic, the message will be formatted in
XML or JSON format as requested and sent as response body to the suspended request.
Following the Long Polling protocol, the request will then be closed; it is left up
to the client to reopen a new request. JSON will be the default format if no extension is provided.
Cross Origin Request Support (CORS) is included so Java Scripts clients executed in web browser can initiate subscribe REST calls from any domain.
Please refer to our code samples for client libraries that you can use to make Comet requests.
|topic||The topics list to subscribe to. The MQTT syntax for specifying topic wild card is accepted - e.g. edcguest/+/#.||query|
|timeout||the timeout of the request in milliseconds. Defaults to 60000ms (= 60s = 1min). Max allowed value is: 300000 (= 300s = 5min)||query||60000|
|fetch||Specifies the amount of information requested. Allowed values are: meta, metrics, all. "meta" returns only the topic and received on information; "metrics" returns "meta" plus all the metrics included in the message; "all" returns the whole message including its binary payload.||query||metrics|
Any message received from the subscriptions before timeout, or empty response.