Skip to content

Commit b54e5ae

Browse files
chore: 3.7 update (#6557)
* chore: 3.7 update * fix(influxdb3): influxdb3 3.7 release: - Avoid use of "retention policy" except for the storage engine - User guide: specific heading, active voice - Use SOURCE --------- Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>
1 parent fb4dcde commit b54e5ae

File tree

5 files changed

+319
-74
lines changed

5 files changed

+319
-74
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: influxdb3 show retention
3+
description: >
4+
The `influxdb3 show retention` command displays retention policies and effective
5+
retention periods for tables in your InfluxDB 3 Core server.
6+
menu:
7+
influxdb3_core:
8+
parent: influxdb3 show
9+
name: influxdb3 show retention
10+
weight: 410
11+
source: /shared/influxdb3-cli/show/retention.md
12+
---
13+
14+
<!--
15+
//SOURCE content/shared/influxdb3-cli/show/retention.md
16+
-->
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: influxdb3 show retention
3+
description: >
4+
The `influxdb3 show retention` command displays effective
5+
retention periods for tables in your InfluxDB 3 Enterprise server.
6+
menu:
7+
influxdb3_enterprise:
8+
parent: influxdb3 show
9+
name: influxdb3 show retention
10+
weight: 410
11+
source: /shared/influxdb3-cli/show/retention.md
12+
---
13+
14+
<!--
15+
//SOURCE content/shared/influxdb3-cli/show/retention.md
16+
-->
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
The `influxdb3 show retention` command displays effective retention periods for tables in your {{< product-name >}} server.
2+
3+
## Usage
4+
5+
<!--pytest.mark.skip-->
6+
7+
```bash
8+
influxdb3 show retention [OPTIONS]
9+
```
10+
11+
## Options
12+
13+
| Option | | Description |
14+
| :----- | :----------- | :--------------------------------------------------------------------------------------- |
15+
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
16+
| | `--token` | *({{< req >}})* Authentication token |
17+
| | `--database` | Filter retention information by database name |
18+
| | `--format` | Output format (`pretty` *(default)*, `json`, `jsonl`, `csv`, or `parquet`) |
19+
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
20+
| `-h` | `--help` | Print help information |
21+
| | `--help-all` | Print detailed help information |
22+
23+
### Option environment variables
24+
25+
You can use the following environment variables to set command options:
26+
27+
| Environment Variable | Option |
28+
| :------------------------ | :----------- |
29+
| `INFLUXDB3_HOST_URL` | `--host` |
30+
| `INFLUXDB3_DATABASE_NAME` | `--database` |
31+
| `INFLUXDB3_AUTH_TOKEN` | `--token` |
32+
33+
## Examples
34+
35+
- [Show retention for all tables](#show-retention-for-all-tables)
36+
- [Show retention for a specific database](#show-retention-for-a-specific-database)
37+
- [Show retention in JSON format](#show-retention-in-json-format)
38+
39+
### Show retention for all tables
40+
41+
<!--pytest.mark.skip-->
42+
43+
```bash
44+
influxdb3 show retention \
45+
--host http://localhost:8181 \
46+
--token YOUR_AUTH_TOKEN
47+
```
48+
49+
### Show retention for a specific database
50+
51+
<!--pytest.mark.skip-->
52+
53+
```bash
54+
influxdb3 show retention \
55+
--host http://localhost:8181 \
56+
--token YOUR_AUTH_TOKEN \
57+
--database mydb
58+
```
59+
60+
### Show retention in JSON format
61+
62+
<!--pytest.mark.skip-->
63+
64+
```bash
65+
influxdb3 show retention \
66+
--host http://localhost:8181 \
67+
--token YOUR_AUTH_TOKEN \
68+
--format json
69+
```
70+
71+
## Output
72+
73+
The command displays the following information for each table:
74+
75+
- **Database**: The database name
76+
- **Table**: The table name
77+
- **Retention**: The *effective* retention period in human-readable format (for example, "7d" for 7 days, "24h" for 24 hours, "infinite" for no retention)
78+
- **Source**: Where the retention is defined (`table`, `database`, or `infinite`)
79+
80+
### Example output
81+
82+
```
83+
Database | Table | Retention | Source
84+
---------|-------------|-----------|----------
85+
mydb | cpu | 7d | database
86+
mydb | mem | 24h | table
87+
mydb | disk | infinite | infinite
88+
```
89+
90+
Tables with table-level retention policies override the database-level retention. Tables without explicit retention policies inherit the database retention or have infinite retention if none is set.

content/shared/influxdb3-write-guides/http-api/v3-write-lp.md

Lines changed: 89 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ syntax as previous versions of InfluxDB, and supports the following:
2121
- `millisecond` (milliseconds)
2222
- `second` (seconds)
2323

24-
> [!Note]
24+
> \[!Note]
2525
> A bug currently prevents abbreviated precision values (`ns`, `n`, `us`, `u`, `ms`, `s`) from working with the `/api/v3/write_lp` endpoint. Use the full names (`nanosecond`, `microsecond`, `millisecond`, `second`) instead. Abbreviated values will be supported in a future release.
2626
2727
### Auto precision detection
@@ -45,6 +45,7 @@ The following examples show how to write data with different timestamp precision
4545
[Seconds](#)
4646
{{% /code-tabs %}}
4747
{{% code-tab-content %}}
48+
4849
```bash
4950
# Auto precision (default) - timestamp magnitude determines precision
5051
curl "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors" \
@@ -55,41 +56,76 @@ curl "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors" \
5556
The timestamp `1708976567` is automatically detected as seconds.
5657
{{% /code-tab-content %}}
5758
{{% code-tab-content %}}
59+
5860
```bash
5961
# Explicit nanosecond precision
6062
curl "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=nanosecond" \
6163
--header "Authorization: Bearer DATABASE_TOKEN" \
6264
--data-raw "cpu,host=server1 usage=50.0 1708976567000000000"
6365
```
66+
6467
{{% /code-tab-content %}}
6568
{{% code-tab-content %}}
69+
6670
```bash
6771
# Millisecond precision
6872
curl "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=millisecond" \
6973
--header "Authorization: Bearer DATABASE_TOKEN" \
7074
--data-raw "cpu,host=server1 usage=50.0 1708976567000"
7175
```
76+
7277
{{% /code-tab-content %}}
7378
{{% code-tab-content %}}
79+
7480
```bash
7581
# Second precision
7682
curl "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=second" \
7783
--header "Authorization: Bearer DATABASE_TOKEN" \
7884
--data-raw "cpu,host=server1 usage=50.0 1708976567"
7985
```
86+
8087
{{% /code-tab-content %}}
8188
{{< /code-tabs-wrapper >}}
8289

90+
## Configure gzip compression
91+
92+
The `/api/v3/write_lp` endpoint supports gzip-encoded request bodies for efficient data transfer.
93+
94+
When sending gzip-compressed data to InfluxDB, include the `Content-Encoding: gzip` header in your InfluxDB API request.
95+
96+
### Multi-member gzip support
97+
98+
{{% product-name %}} supports multi-member gzip payloads (concatenated gzip files per [RFC 1952](https://www.rfc-editor.org/rfc/rfc1952)). This allows you to:
99+
100+
- Concatenate multiple gzip files and send them in a single request
101+
- Maintain compatibility with InfluxDB v1 and v2 write endpoints
102+
- Simplify batch operations using standard compression tools
103+
104+
#### Example: Write concatenated gzip files
105+
106+
```bash
107+
# Create multiple gzip files
108+
echo "cpu,host=server1 usage=50.0 1708976567" | gzip > batch1.gz
109+
echo "cpu,host=server2 usage=60.0 1708976568" | gzip > batch2.gz
110+
111+
# Concatenate and send in a single request
112+
cat batch1.gz batch2.gz | curl "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors" \
113+
--header "Authorization: Bearer DATABASE_TOKEN" \
114+
--header "Content-Encoding: gzip" \
115+
--data-binary @-
116+
```
117+
83118
## Request body
84119

85120
- Line protocol
86121

87122
{{<api-endpoint endpoint="/api/v3/write_lp?db=mydb&precision=nanosecond&accept_partial=true&no_sync=false" method="post" >}}
88123

89-
_The following example uses [cURL](https://curl.se/) to send a write request using
90-
the {{< influxdb3/home-sample-link >}}, but you can use any HTTP client._
124+
*The following example uses [cURL](https://curl.se/) to send a write request using
125+
the {{< influxdb3/home-sample-link >}}, but you can use any HTTP client.*
91126

92127
{{% influxdb/custom-timestamps %}}
128+
93129
```bash
94130
curl -v "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=second" \
95131
--data-raw "home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1735545600
@@ -119,15 +155,17 @@ home,room=Kitchen temp=23.1,hum=36.6,co=22i 1735585200
119155
home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1735588800
120156
home,room=Kitchen temp=22.7,hum=36.5,co=26i 1735588800"
121157
```
158+
122159
{{% /influxdb/custom-timestamps %}}
123160

124161
- [Partial writes](#partial-writes)
125162
- [Accept partial writes](#accept-partial-writes)
126163
- [Do not accept partial writes](#do-not-accept-partial-writes)
127164
- [Write responses](#write-responses)
128-
- [Use no_sync for immediate write responses](#use-no_sync-for-immediate-write-responses)
165+
- [Use no\_sync for immediate write responses](#use-no_sync-for-immediate-write-responses)
129166

130-
> [!Note]
167+
> \[!Note]
168+
>
131169
> #### InfluxDB client libraries
132170
>
133171
> InfluxData provides supported InfluxDB 3 client libraries that you can
@@ -176,7 +214,7 @@ With `accept_partial=true` (default), InfluxDB:
176214

177215
With `accept_partial=false`, InfluxDB:
178216

179-
- Rejects _all_ points in the batch
217+
- Rejects *all* points in the batch
180218
- Returns a `400 Bad Request` status code and the following response body:
181219

182220
```
@@ -192,32 +230,32 @@ With `accept_partial=false`, InfluxDB:
192230
}
193231
```
194232

195-
_For more information about the ingest path and data flow, see
196-
[Data durability](/influxdb3/version/reference/internals/durability/)._
233+
*For more information about the ingest path and data flow, see
234+
[Data durability](/influxdb3/version/reference/internals/durability/).*
197235

198236
## Write responses
199237

200238
By default, {{% product-name %}} acknowledges writes after flushing the WAL file
201239
to the Object store (occurring every second).
202240
For high write throughput, you can send multiple concurrent write requests.
203241

204-
### Use no_sync for immediate write responses
242+
### Use no\_sync for immediate write responses
205243

206244
To reduce the latency of writes, use the `no_sync` write option, which
207-
acknowledges writes _before_ WAL persistence completes.
245+
acknowledges writes *before* WAL persistence completes.
208246
When `no_sync=true`, InfluxDB validates the data, writes the data to the WAL,
209247
and then immediately responds to the client, without waiting for persistence to
210248
the Object store.
211249

212-
> [!Tip]
250+
> \[!Tip]
213251
> Using `no_sync=true` is best when prioritizing high-throughput writes over
214-
> absolute durability.
252+
> absolute durability.
215253
216254
- Default behavior (`no_sync=false`): Waits for data to be written to the Object
217255
store before acknowledging the write. Reduces the risk of data loss, but
218256
increases the latency of the response.
219257
- With `no_sync=true`: Reduces write latency, but increases the risk of data
220-
loss in case of a crash before WAL persistence.
258+
loss in case of a crash before WAL persistence.
221259

222260
The following example immediately returns a response without waiting for WAL
223261
persistence:
@@ -226,3 +264,41 @@ persistence:
226264
curl "http://localhost:8181/api/v3/write_lp?db=sensors&no_sync=true" \
227265
--data-raw "home,room=Sunroom temp=96"
228266
```
267+
268+
## Response headers
269+
270+
All HTTP responses from {{% product-name %}} include the following standard headers:
271+
272+
### cluster-uuid
273+
274+
The `cluster-uuid` response header contains the catalog UUID of your {{% product-name %}} instance. This header is included in all HTTP API responses, including:
275+
276+
- Write requests (`/api/v3/write_lp`, `/api/v2/write`, `/write`)
277+
- Query requests
278+
- Administrative operations
279+
- Authentication failures
280+
- CORS preflight requests
281+
282+
#### Use cases
283+
284+
The `cluster-uuid` header enables you to:
285+
286+
- **Identify cluster instances**: Programmatically determine which InfluxDB instance handled a request
287+
- **Monitor deployments**: Track requests across multiple InfluxDB instances in load-balanced or multi-cluster environments
288+
- **Debug and troubleshooting**: Correlate client requests with specific server instances in distributed systems
289+
290+
#### Example response
291+
292+
```bash
293+
curl -v "http://localhost:8181/api/v3/write_lp?db=sensors" \
294+
--header "Authorization: Bearer DATABASE_TOKEN" \
295+
--data-raw "cpu,host=server1 usage=50.0"
296+
```
297+
298+
The response headers contain the `cluster-uuid`:
299+
300+
```
301+
< HTTP/1.1 204 No Content
302+
< cluster-uuid: 01234567-89ab-cdef-0123-456789abcdef
303+
< date: Tue, 19 Nov 2025 20:00:00 GMT
304+
```

0 commit comments

Comments
 (0)