public interface WriteService
| Modifier and Type | Method and Description |
|---|---|
retrofit2.Call<Void> |
postWrite(String org,
String bucket,
String body,
String zapTraceSpan,
String contentEncoding,
String contentType,
Integer contentLength,
String accept,
String orgID,
WritePrecision precision,
WriteConsistency consistency)
Write data
Writes data to a bucket.
|
io.reactivex.rxjava3.core.Single<retrofit2.Response<Void>> |
postWriteRx(String org,
String bucket,
String body,
String zapTraceSpan,
String contentEncoding,
String contentType,
Integer contentLength,
String accept,
String orgID,
WritePrecision precision,
WriteConsistency consistency)
Write data
Writes data to a bucket.
|
@Headers(value="Content-Type:text/plain") @POST(value="api/v2/write") retrofit2.Call<Void> postWrite(@Query(value="org") String org, @Query(value="bucket") String bucket, @Body String body, @Header(value="Zap-Trace-Span") String zapTraceSpan, @Header(value="Content-Encoding") String contentEncoding, @Header(value="Content-Type") String contentType, @Header(value="Content-Length") Integer contentLength, @Header(value="Accept") String accept, @Query(value="orgID") String orgID, @Query(value="precision") WritePrecision precision, @Query(value="consistency") WriteConsistency consistency)
org - Destination organization for writes. The database writes all points in the batch to this organization. If you provide both `orgID` and `org` parameters, `org` takes precedence. (required)bucket - Destination bucket for writes. (required)body - Data in line protocol format. (required)zapTraceSpan - OpenTracing span context (optional)contentEncoding - The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. (optional, default to identity)contentType - Format of the data in the request body. To make an API request with a line protocol payload, send `Content-Type: text/plain; charset=utf-8` as a request header. (optional, default to text/plain; charset=utf-8)contentLength - Size of the entity-body, in bytes, sent to the database. If the length is greater than the database's `max body` configuration option, the server responds with status code `413`. (optional)accept - Content type that the client can understand. Writes only return a response body if they fail, e.g. due to a formatting problem or quota limit. #### InfluxDB Cloud - returns only `application/json` for format and limit errors. - returns only `text/html` for some quota limit errors. #### InfluxDB OSS - returns only `application/json` for format and limit errors. For more information about write errors, see how to [troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.1/write-data/troubleshoot/). (optional, default to application/json)orgID - ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence. (optional)precision - Precision for unix timestamps in the line protocol of the request payload. (optional, default to null)consistency - Sets the write consistency for the point. InfluxDB assumes that the write consistency is 'one' if you do not specify. Available with InfluxDB Enterprise clusters only. (optional, default to null)@POST(value="api/v2/write") io.reactivex.rxjava3.core.Single<retrofit2.Response<Void>> postWriteRx(@Query(value="org") String org, @Query(value="bucket") String bucket, @Body String body, @Header(value="Zap-Trace-Span") String zapTraceSpan, @Header(value="Content-Encoding") String contentEncoding, @Header(value="Content-Type") String contentType, @Header(value="Content-Length") Integer contentLength, @Header(value="Accept") String accept, @Query(value="orgID") String orgID, @Query(value="precision") WritePrecision precision, @Query(value="consistency") WriteConsistency consistency)
org - Destination organization for writes. The database writes all points in the batch to this organization. If you provide both `orgID` and `org` parameters, `org` takes precedence. (required)bucket - Destination bucket for writes. (required)body - Data in line protocol format. (required)zapTraceSpan - OpenTracing span context (optional)contentEncoding - The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. (optional, default to identity)contentType - Format of the data in the request body. To make an API request with a line protocol payload, send `Content-Type: text/plain; charset=utf-8` as a request header. (optional, default to text/plain; charset=utf-8)contentLength - Size of the entity-body, in bytes, sent to the database. If the length is greater than the database's `max body` configuration option, the server responds with status code `413`. (optional)accept - Content type that the client can understand. Writes only return a response body if they fail, e.g. due to a formatting problem or quota limit. #### InfluxDB Cloud - returns only `application/json` for format and limit errors. - returns only `text/html` for some quota limit errors. #### InfluxDB OSS - returns only `application/json` for format and limit errors. For more information about write errors, see how to [troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.1/write-data/troubleshoot/). (optional, default to application/json)orgID - ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence. (optional)precision - Precision for unix timestamps in the line protocol of the request payload. (optional, default to null)consistency - Sets the write consistency for the point. InfluxDB assumes that the write consistency is 'one' if you do not specify. Available with InfluxDB Enterprise clusters only. (optional, default to null)Copyright © 2018–2023 InfluxData, Inc.. All rights reserved.