You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Centralize API auth instructions into shared section
Move curl authentication examples from the critical nodes endpoint
section into a new "Authenticate to API endpoints" section that
applies to all HTTP endpoints on the page. The critical nodes
section now references the shared section via anchor link.
Addresses review feedback from stevendanna on #23368.
Copy file name to clipboardExpand all lines: src/current/v23.2/monitoring-and-alerting.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno
69
69
70
70
For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).
71
71
72
+
### Authenticate to API endpoints
73
+
74
+
To call the HTTP API endpoints on this page using `curl`:
75
+
76
+
For an insecure or local testing cluster, use HTTP:
77
+
78
+
{% include_cached copy-clipboard.html %}
79
+
~~~shell
80
+
curl http://<host>:<http-port>/<endpoint>
81
+
~~~
82
+
83
+
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
@@ -209,22 +228,7 @@ If you find under-replicated ranges or constraint violations, you will need to [
209
228
210
229
#### Request the endpoint
211
230
212
-
To return the JSON response, send a `POST` request to `/_status/critical_nodes`.
213
-
214
-
For an insecure or local testing cluster, use HTTP:
215
-
216
-
{% include_cached copy-clipboard.html %}
217
-
~~~shell
218
-
curl -X POST http://<host>:<http-port>/_status/critical_nodes
219
-
~~~
220
-
221
-
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/_status/critical_nodes
227
-
~~~
231
+
To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).
Copy file name to clipboardExpand all lines: src/current/v24.1/monitoring-and-alerting.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno
67
67
68
68
For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).
69
69
70
+
### Authenticate to API endpoints
71
+
72
+
To call the HTTP API endpoints on this page using `curl`:
73
+
74
+
For an insecure or local testing cluster, use HTTP:
75
+
76
+
{% include_cached copy-clipboard.html %}
77
+
~~~shell
78
+
curl http://<host>:<http-port>/<endpoint>
79
+
~~~
80
+
81
+
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
@@ -207,22 +226,7 @@ If you find under-replicated ranges or constraint violations, you will need to [
207
226
208
227
#### Request the endpoint
209
228
210
-
To return the JSON response, send a `POST` request to `/_status/critical_nodes`.
211
-
212
-
For an insecure or local testing cluster, use HTTP:
213
-
214
-
{% include_cached copy-clipboard.html %}
215
-
~~~shell
216
-
curl -X POST http://<host>:<http-port>/_status/critical_nodes
217
-
~~~
218
-
219
-
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/_status/critical_nodes
225
-
~~~
229
+
To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).
Copy file name to clipboardExpand all lines: src/current/v24.3/monitoring-and-alerting.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno
67
67
68
68
For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).
69
69
70
+
### Authenticate to API endpoints
71
+
72
+
To call the HTTP API endpoints on this page using `curl`:
73
+
74
+
For an insecure or local testing cluster, use HTTP:
75
+
76
+
{% include_cached copy-clipboard.html %}
77
+
~~~shell
78
+
curl http://<host>:<http-port>/<endpoint>
79
+
~~~
80
+
81
+
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
@@ -207,22 +226,7 @@ If you find under-replicated ranges or constraint violations, you will need to [
207
226
208
227
#### Request the endpoint
209
228
210
-
To return the JSON response, send a `POST` request to `/_status/critical_nodes`.
211
-
212
-
For an insecure or local testing cluster, use HTTP:
213
-
214
-
{% include_cached copy-clipboard.html %}
215
-
~~~shell
216
-
curl -X POST http://<host>:<http-port>/_status/critical_nodes
217
-
~~~
218
-
219
-
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/_status/critical_nodes
225
-
~~~
229
+
To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).
Copy file name to clipboardExpand all lines: src/current/v25.2/monitoring-and-alerting.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno
67
67
68
68
For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).
69
69
70
+
### Authenticate to API endpoints
71
+
72
+
To call the HTTP API endpoints on this page using `curl`:
73
+
74
+
For an insecure or local testing cluster, use HTTP:
75
+
76
+
{% include_cached copy-clipboard.html %}
77
+
~~~shell
78
+
curl http://<host>:<http-port>/<endpoint>
79
+
~~~
80
+
81
+
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
@@ -204,22 +223,7 @@ If you find under-replicated ranges or constraint violations, you will need to [
204
223
205
224
#### Request the endpoint
206
225
207
-
To return the JSON response, send a `POST` request to `/_status/critical_nodes`.
208
-
209
-
For an insecure or local testing cluster, use HTTP:
210
-
211
-
{% include_cached copy-clipboard.html %}
212
-
~~~shell
213
-
curl -X POST http://<host>:<http-port>/_status/critical_nodes
214
-
~~~
215
-
216
-
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/_status/critical_nodes
222
-
~~~
226
+
To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).
Copy file name to clipboardExpand all lines: src/current/v25.4/monitoring-and-alerting.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno
67
67
68
68
For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).
69
69
70
+
### Authenticate to API endpoints
71
+
72
+
To call the HTTP API endpoints on this page using `curl`:
73
+
74
+
For an insecure or local testing cluster, use HTTP:
75
+
76
+
{% include_cached copy-clipboard.html %}
77
+
~~~shell
78
+
curl http://<host>:<http-port>/<endpoint>
79
+
~~~
80
+
81
+
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
@@ -181,22 +200,7 @@ If you find under-replicated ranges or constraint violations, you will need to [
181
200
182
201
#### Request the endpoint
183
202
184
-
To return the JSON response, send a `POST` request to `/_status/critical_nodes`.
185
-
186
-
For an insecure or local testing cluster, use HTTP:
187
-
188
-
{% include_cached copy-clipboard.html %}
189
-
~~~shell
190
-
curl -X POST http://<host>:<http-port>/_status/critical_nodes
191
-
~~~
192
-
193
-
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/_status/critical_nodes
199
-
~~~
203
+
To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).
Copy file name to clipboardExpand all lines: src/current/v26.1/monitoring-and-alerting.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno
67
67
68
68
For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).
69
69
70
+
### Authenticate to API endpoints
71
+
72
+
To call the HTTP API endpoints on this page using `curl`:
73
+
74
+
For an insecure or local testing cluster, use HTTP:
75
+
76
+
{% include_cached copy-clipboard.html %}
77
+
~~~shell
78
+
curl http://<host>:<http-port>/<endpoint>
79
+
~~~
80
+
81
+
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
@@ -181,22 +200,7 @@ If you find under-replicated ranges or constraint violations, you will need to [
181
200
182
201
#### Request the endpoint
183
202
184
-
To return the JSON response, send a `POST` request to `/_status/critical_nodes`.
185
-
186
-
For an insecure or local testing cluster, use HTTP:
187
-
188
-
{% include_cached copy-clipboard.html %}
189
-
~~~shell
190
-
curl -X POST http://<host>:<http-port>/_status/critical_nodes
191
-
~~~
192
-
193
-
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/_status/critical_nodes
199
-
~~~
203
+
To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).
Copy file name to clipboardExpand all lines: src/current/v26.2/monitoring-and-alerting.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno
79
79
80
80
For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).
81
81
82
+
### Authenticate to API endpoints
83
+
84
+
To call the HTTP API endpoints on this page using `curl`:
85
+
86
+
For an insecure or local testing cluster, use HTTP:
87
+
88
+
{% include_cached copy-clipboard.html %}
89
+
~~~shell
90
+
curl http://<host>:<http-port>/<endpoint>
91
+
~~~
92
+
93
+
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
@@ -193,22 +212,7 @@ If you find under-replicated ranges or constraint violations, you will need to [
193
212
194
213
#### Request the endpoint
195
214
196
-
To return the JSON response, send a `POST` request to `/_status/critical_nodes`.
197
-
198
-
For an insecure or local testing cluster, use HTTP:
199
-
200
-
{% include_cached copy-clipboard.html %}
201
-
~~~shell
202
-
curl -X POST http://<host>:<http-port>/_status/critical_nodes
203
-
~~~
204
-
205
-
For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.
curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/_status/critical_nodes
211
-
~~~
215
+
To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).
0 commit comments