March 7 - June 27, 2024 - Nstream is hitting the road with Confluent on the #DataInMotionTour! / Learn More

REST API Support

Although Nstream encourages using end-to-end streaming wherever possible, each Web Agent that is built with the Nstream Toolkit exposes the ability to receive a snapshot of its present state over a REST API.

Nstream Library Dependencies



implementation 'io.nstream:nstream-adapter-common:4.9.16'



The REST API support is implemented in the nstream.adapter.common.patches.SummaryPatch class in the nstream-adapter-common module. Hence this functionality is avaiable to all classes that extend the SummaryPatch class which include:


Simply issue GET-type REST requests in the following format:

endpoint: $HOST_URI/$NODE_URI?lane=api/unanswered
(optional headers)

For example, a sample cURL request to receive the data in JSON format for /agent/1 running on could look like:

curl -XGET -H 'Accept: application/json' ''

The response, which:

might look like:

  "shared": {
    "s1": 1
  "info": {
    "a": 1,
    "b": "2"
  "map": {
    "data": [
        "key": "k1",
        "value": "v1"
        "key": "k2",
        "value": "v2"

If /agent/1 consists of multiple traits, then all of the relevant lanes for all such traits within /agent/1 will be included in the summary paylod.


Nstream is licensed under the Redis Source Available License 2.0 (RSALv2).