@@ -106,7 +106,16 @@ scheme and a [database token](/influxdb3/cloud-dedicated/admin/tokens/#database-
106
106
107
107
{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}}
108
108
``` sh
109
- {{% get-shared-text " api/cloud-dedicated/basic-auth.sh" %}}
109
+ # ######################################
110
+ # Use Basic authentication with a database token
111
+ # to query the InfluxDB v1 API
112
+ # ######################################
113
+
114
+
115
+ curl --get " https://{{< influxdb/host >}}/query" \
116
+ --user " " :" DATABASE_TOKEN" \
117
+ --data-urlencode " db=DATABASE_NAME" \
118
+ --data-urlencode " q=SELECT * FROM MEASUREMENT"
110
119
```
111
120
{{% /code-placeholders %}}
112
121
@@ -136,7 +145,18 @@ The following example shows how to use cURL with query string authentication and
136
145
137
146
{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}}
138
147
``` sh
139
- {{% get-shared-text " api/cloud-dedicated/querystring-auth.sh" %}}
148
+ # ######################################
149
+ # Use an InfluxDB 1.x compatible username and password
150
+ # to query the InfluxDB v1 API
151
+ # ######################################
152
+ # Use authentication query parameters:
153
+ # ?p=DATABASE_TOKEN
154
+ # ######################################
155
+
156
+ curl --get " https://{{< influxdb/host >}}/query" \
157
+ --data-urlencode " p=DATABASE_TOKEN" \
158
+ --data-urlencode " db=DATABASE_NAME" \
159
+ --data-urlencode " q=SELECT * FROM MEASUREMENT"
140
160
```
141
161
{{% /code-placeholders %}}
142
162
0 commit comments