influxdb-client-js

InfluxDB 2.0 JavaScript client

View the Project on GitHub influxdata/influxdb-client-js

Home > @influxdata/influxdb-client-apis > PostWriteRequest

PostWriteRequest interface

Signature:

interface PostWriteRequest 

Properties

Property Modifiers Type Description
body   string <p>Data in line protocol format.</p><p>To send compressed data, do the following:</p><p>1. Use GZIP to compress the line protocol data. 2. In your request, send the compressed data and the Content-Encoding: gzip header.</p><p>#### Related guides</p><p>- Best practices for optimizing writes.</p>
bucket   string The destination bucket for writes. InfluxDB writes all points in the batch to this bucket.
org   string <p>The destination organization for writes. InfluxDB writes all points in the batch to this organization. If you pass both orgID and org, they must both be valid.</p><p>#### InfluxDB Cloud</p><p>- Doesn’t require org or orgID. - Writes to the bucket in the organization associated with the authorization (API token).</p><p>#### InfluxDB OSS</p><p>- Requires either org or orgID. - InfluxDB writes all points in the batch to this organization.</p>
orgID?   string <p>(Optional) The ID of the destination organization for writes. If you pass both orgID and org, they must both be valid.</p><p>#### InfluxDB Cloud</p><p>- Doesn’t require org or orgID. - Writes to the bucket in the organization associated with the authorization (API token).</p><p>#### InfluxDB OSS</p><p>- Requires either org or orgID. - InfluxDB writes all points in the batch to this organization.</p>
precision?   any (Optional) The precision for unix timestamps in the line protocol batch.