Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET on Device/Transducer should return one value by default #61

Open
linux4life798 opened this issue Nov 19, 2018 · 3 comments
Open

GET on Device/Transducer should return one value by default #61

linux4life798 opened this issue Nov 19, 2018 · 3 comments

Comments

@linux4life798
Copy link
Member

The GET on a transducer should return a very fast last value by default that is plain text.
When a limit is specified, then it can return influxdb data.

@linux4life798
Copy link
Member Author

The GET should be the opposite of the POST.

Currently, you can POST with plain/text and just place the value in the body. Doing a simple GET on the with plain/text on the transducer should yield that same simple last value.

This can then be augmented to allow the limit parameter to grab lots of values.

@hi-liang
Copy link
Member

hi-liang commented Jan 3, 2019

Is timestamp important on this last-value return?

Current behavior of data from Influx returns something like:

{
  "results": [
    {
      "statement_id": 0,
      "series": [
        {
          "name": "5979209b2d16735bdcadecdf_cloudiness_percentage",
          "columns": [
            "time",
            "value"
          ],
          "values": [
            [
              "2017-07-26T23:10:00Z",
              1
            ]
          ]
        }
      ]
    }
  ]
}

Most basic return then might be { value: 1, timestamp: "2017-07-26T23:10:00Z" }

@linux4life798
Copy link
Member Author

I was thinking that it is the mirror image of the POST, but that would not have a timestamp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants