influxdbinflux-line-protocol

How do I insert multiple points in Influx with the lineprotocol and API


According to the documentation the influx line protocol accepts \n to separate lines.

I have a request in Postman on Windows http://127.0.0.1:8086/api/v2/write?precision=ms&bucket=Test&org=Test with required headers that works just fine with this line in the Body:

So I would naturally expect something like this to work for multiple points:

Unnecessary to say I tried this as well:

I am recieving either a "bad timestamp" or "point is invalid" error in the response

Even tried forward slashes just for sport. Any clues on how to insert more than one point?

Thank you.


Solution

  • Seems like this boils down to the Windows vs Unix End Of Line implementation.

    Postman, NotePad++, Devtools, VS whatever editor running on windows, will write a lineshift as \r\n, (hex 0D 0A) that currently is not supported by the influx lineprotocol although it seems like a trivial implementation (skip 0D).

    As for my own problem coding in C# adding a (char)10 between points solved the problem instead of using Environment.NewLine.

    Cheers!