Skip to content

Commit 8804b13

Browse files
committed
fix(docs): close unclosed shortcodes in token authentication tabs and reversed WIP
1 parent 6271c84 commit 8804b13

File tree

1 file changed

+1
-28
lines changed
  • content/shared/influxdb3-admin/tokens

1 file changed

+1
-28
lines changed

content/shared/influxdb3-admin/tokens/_index.md

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ The mechanism for providing your token depends on the client you use to interact
1010
{{% tabs %}}
1111
[influxdb3 CLI](#influxdb3-cli-auth)
1212
[cURL](#curl-auth)
13-
[Python (requests)](#python-auth-requests)
1413
{{% /tabs %}}
1514

1615
{{% tab-content %}}
@@ -49,42 +48,16 @@ Replace `YOUR_TOKEN` with your authorization token.
4948
{{% tab-content %}}
5049

5150
{{% code-placeholders "AUTH_TOKEN" %}}
52-
5351
```bash
5452
# Add your token to the HTTP Authorization header
5553
curl "http://{{< influxdb/host >}}/api/v3/query_sql" \
5654
--header "Authorization: Bearer AUTH_TOKEN" \
5755
--data-urlencode "db=example-db" \
5856
--data-urlencode "q=SELECT * FROM 'example-table' WHERE time > now() - INTERVAL '10 minutes'"
59-
60-
{{% /tab-content %}}
61-
62-
{{% tab-content %}}
63-
64-
Use Python with the `requests` library to send an authenticated query:
65-
66-
{{% code-placeholders "YOUR_TOKEN" %}}
67-
68-
```python
69-
import requests
70-
71-
url = "http://localhost:8181/api/v3/query_sql"
72-
headers = {
73-
"Authorization": "Bearer YOUR_TOKEN",
74-
"Content-Type": "application/json"
75-
}
76-
data = {
77-
"db": "example-db",
78-
"sql": "SELECT * FROM 'example-table' WHERE time > now() - INTERVAL '10 minutes'"
79-
}
80-
81-
response = requests.post(url, json=data, headers=headers)
82-
print(response.json())
8357
```
84-
8558
{{% /code-placeholders %}}
8659

87-
Replace `YOUR_TOKEN` with your InfluxDB 3 token.
60+
Replace `AUTH_TOKEN` with your actual InfluxDB 3 token.
8861

8962
{{% /tab-content %}}
9063

0 commit comments

Comments
 (0)