Write data (v1-compatible)
/write endpoint with line protocol./writeWrite data using a v1-compatible request
Writes data in line protocol syntax to the specified bucket using a v1-compatible request.
This endpoint provides backward compatibility for InfluxDB 1.x write workloads using tools such as InfluxDB 1.x client libraries, the Telegraf outputs.influxdb output plugin, or third-party tools.
Use query parameters to specify options for writing data.
InfluxDB Cloud
- Validates and queues the request.
- Handles the write asynchronously - the write might not have completed yet.
- Returns a
Retry-Afterheader that describes when to try the write again.
InfluxDB OSS v2
- Validates the request and handles the write synchronously.
- If all points were written successfully, responds with HTTP
2xxstatus code - If any points were rejected, responds with HTTP
4xxstatus code and details about the problem.
Related guides
Parameters
Query parameters
u
stringp
stringdb
required
stringrp
stringprecision
stringHeader parameters
Zap-Trace-Span
stringContent-Encoding
stringgzip
, identityidentityRequest body required
application/jsoncurl --request POST \
"http://localhost:8086/write?db=DB" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: text/plain" \
--data-raw 'measurement,tag=value field=1.0'Responses
code
required
stringinternal error
, not found
, conflict
, invalid
, empty value
, unavailableerr
stringline
integer <int32>message
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinvalidmessage
required
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringWas this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.