Skip to content

Commit 029a362

Browse files
authored
Fix miscellaneous API docs bugs (#21210)
* Fix backup and restore API docs bugs * Apply consistent usage of double quotes for example API requests * Revert to single quotes around JSON blocks
1 parent 5b8ed6a commit 029a362

26 files changed

+144
-144
lines changed

src/current/_includes/cockroachcloud/backups/cloud-api-backup-settings.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
### Get information on backup settings
22

3-
To retrieve information about a specific cluster, make a `GET` request to the `/v1/clusters/{cluster_id}/backups/config` endpoint.
3+
To retrieve information about a specific cluster, make a `GET` request to the `/v1/clusters/{cluster_id}/backups-config` endpoint.
44

55
{% include_cached copy-clipboard.html %}
66
~~~ shell
77
curl --request GET \
8-
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/backups/config \
9-
--header 'Authorization: Bearer {secret_key}'
8+
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/backups-config \
9+
--header "Authorization: Bearer {secret_key}"
1010
~~~
1111

1212
Set the following:
1313

14-
- `{cluster_id}` is the unique ID of the cluster. Use this ID when making API requests. You can find the cluster ID in the cluster's Cloud Console page. Find your cluster ID in the URL of the single cluster overview page: `https://cockroachlabs.cloud/cluster/{your_cluster_id}/overview`. The ID should resemble `f78b7feb-b6cf-4396-9d7f-494982d7d81e`.
14+
- `{cluster_id}` is the unique ID of the cluster. This ID is written in a UUID format similar to `f78b7feb-b6cf-4396-9d7f-494982d7d81e` and is returned by a [GET request against the `/v1/clusters` endpoint]({% link cockroachcloud/cloud-api.md %}#list-all-clusters-in-an-organization). You can also find the cluster ID in the Cloud Console, in the URL of the single cluster overview page: `https://cockroachlabs.cloud/cluster/{your_cluster_id}/overview`.
1515
- `{secret_key}` is your API key. Refer to [API Access]({% link cockroachcloud/managing-access.md %}#api-access) for more details.
1616

1717
If the request is successful, the API will return details about the managed backup settings:
@@ -36,19 +36,19 @@ If the request is successful, the API will return details about the managed back
3636

3737
{% include cockroachcloud/backups/review-settings.md %}
3838

39-
To configure the frequency and retention of managed backups, send a `PUT` request to the `/v1/clusters/{cluster_id}/backups/config` endpoint.
39+
To configure the frequency and retention of managed backups, send a `PUT` request to the `/v1/clusters/{cluster_id}/backups-config` endpoint.
4040

4141
{% include_cached copy-clipboard.html %}
4242
~~~ shell
4343
curl --request PUT \
44-
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/backups/config \
45-
--header 'Authorization: Bearer {secret_key}' \
44+
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/backups-config \
45+
--header "Authorization: Bearer {secret_key}" \
4646
--data '{"enabled": true, "frequency_minutes": 30, "retention_days": 2}'
4747
~~~
4848

4949
Set the following:
5050

51-
- `{cluster_id}` is the unique ID of the cluster. Use this ID when making API requests. You can find the cluster ID in the cluster's Cloud Console page. Find your cluster ID in the URL of the single cluster overview page: `https://cockroachlabs.cloud/cluster/{your_cluster_id}/overview`. The ID should resemble `f78b7feb-b6cf-4396-9d7f-494982d7d81e`.
51+
- `{cluster_id}` is the unique ID of the cluster. This ID is written in a UUID format similar to `f78b7feb-b6cf-4396-9d7f-494982d7d81e` and is returned by a [GET request against the `/v1/clusters` endpoint]({% link cockroachcloud/cloud-api.md %}#list-all-clusters-in-an-organization). You can also find the cluster ID in the Cloud Console, in the URL of the single cluster overview page: `https://cockroachlabs.cloud/cluster/{your_cluster_id}/overview`.
5252
- `{enabled}` controls whether managed backups are enabled or disabled. If you are disabling managed backups, you cannot set backup frequency or retention. Possible values are: `true`, `false`.
5353
- `{frequency_minutes}` determines [how often](#frequency) the managed backup will run in minutes. Possible values are: `5`, `10`, `15`, `30`, `60`, `240` (4 hours), `1440` (24 hours).
5454
- `{retention_days}` sets the number of days Cockroach Labs will [retain](#retention) the managed backup in storage. You can change `retention_days` for the cluster **once** (whether in the Cloud API or [Cloud Console](#cloud-console)). Possible values are: `2`, `7`, `30`, `90`, `365`.

src/current/_includes/cockroachcloud/backups/cloud-api-backup-view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To view a list of managed backups on a cluster with timestamps and their respect
1010
~~~ shell
1111
curl --request GET \
1212
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/backups \
13-
--header 'Authorization: Bearer {secret_key}' \
13+
--header "Authorization: Bearer {secret_key}" \
1414
~~~
1515

1616
If the request is successful, the client recieves a JSON response listing backups with their unique `{id}`. The `{as_of_time}` timestamp describes the system time of the cluster when the backup was created:

src/current/_includes/cockroachcloud/backups/cloud-api-restore-endpoint.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ To restore a cluster to a recent managed backup, send a `POST` request to the `/
2323
{% include_cached copy-clipboard.html %}
2424
~~~ shell
2525
curl --request POST \
26-
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
26+
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
2727
--header "Authorization: Bearer {secret_key}" \
2828
--json '{
29-
"source_cluster_id": "{cluster_id}"
29+
"source_cluster_id": "{cluster_id}",
3030
"type": "CLUSTER"
3131
}'
3232
~~~
@@ -36,7 +36,7 @@ By default, the restore job uses the most recent backup stored within the last 7
3636
{% include_cached copy-clipboard.html %}
3737
~~~ shell
3838
curl --request POST \
39-
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
39+
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
4040
--header "Authorization: Bearer {secret_key}" \
4141
--json '{
4242
"backup_id": "example-2d25-4a64-8172-28af7a0d41cc",
@@ -50,7 +50,7 @@ To restore a cluster backup into a different cluster, ensure that the destinatio
5050
{% include_cached copy-clipboard.html %}
5151
~~~ shell
5252
curl --request POST \
53-
--url 'https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores' \
53+
--url https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores \
5454
--header "Authorization: Bearer {secret_key}" \
5555
--json '{
5656
"source_cluster_id": "{source_cluster_id}",
@@ -83,10 +83,10 @@ To restore one or more databases from a cluster's managed backup, send a `POST`
8383
{% include_cached copy-clipboard.html %}
8484
~~~ shell
8585
curl --request POST \
86-
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
86+
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
8787
--header "Authorization: Bearer {secret_key}" \
8888
--json '{
89-
"source_cluster_id": "{cluster_id}"
89+
"source_cluster_id": "{cluster_id}",
9090
"type": "DATABASE",
9191
"objects": [
9292
{
@@ -104,10 +104,10 @@ By default, the database is restored into the original database name from the ma
104104
{% include_cached copy-clipboard.html %}
105105
~~~ shell
106106
curl --request POST \
107-
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
107+
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
108108
--header "Authorization: Bearer {secret_key}" \
109109
--json '{
110-
"source_cluster_id": "{cluster_id}"
110+
"source_cluster_id": "{cluster_id}",
111111
"type": "DATABASE",
112112
"objects": [
113113
{
@@ -125,7 +125,7 @@ To restore from a specific backup rather than the most recently created managed
125125
{% include_cached copy-clipboard.html %}
126126
~~~ shell
127127
curl --request POST \
128-
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
128+
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
129129
--header "Authorization: Bearer {secret_key}" \
130130
--json '{
131131
"backup_id": "example-2d25-4a64-8172-28af7a0d41cc",
@@ -134,7 +134,7 @@ curl --request POST \
134134
{
135135
"database": "tpcc"
136136
}
137-
],
137+
]
138138
}'
139139
~~~
140140

@@ -143,7 +143,7 @@ To restore a database from a source cluster's managed backup into a different cl
143143
{% include_cached copy-clipboard.html %}
144144
~~~ shell
145145
curl --request POST \
146-
--url 'https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores' \
146+
--url https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores \
147147
--header "Authorization: Bearer {secret_key}" \
148148
--json '{
149149
"source_cluster_id": "{source_cluster_id}",
@@ -152,7 +152,7 @@ curl --request POST \
152152
{
153153
"database": "tpcc"
154154
}
155-
],
155+
]
156156
}'
157157
~~~
158158

@@ -178,10 +178,10 @@ To restore a one or more tables from a cluster's managed backup, send a `POST` r
178178
{% include_cached copy-clipboard.html %}
179179
~~~ shell
180180
curl --request POST \
181-
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
181+
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
182182
--header "Authorization: Bearer {secret_key}" \
183183
--json '{
184-
"source_cluster_id": "{cluster_id}"
184+
"source_cluster_id": "{cluster_id}",
185185
"type": "TABLE",
186186
"objects": [
187187
{
@@ -203,10 +203,10 @@ By default, the table is restored into the original database name from the manag
203203
{% include_cached copy-clipboard.html %}
204204
~~~ shell
205205
curl --request POST \
206-
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
206+
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
207207
--header "Authorization: Bearer {secret_key}" \
208208
--json '{
209-
"source_cluster_id": "{cluster_id}"
209+
"source_cluster_id": "{cluster_id}",
210210
"type": "TABLE",
211211
"objects": [
212212
{
@@ -231,7 +231,7 @@ To restore from a specific backup rather than the most recently created managed
231231
{% include_cached copy-clipboard.html %}
232232
~~~ shell
233233
curl --request POST \
234-
--url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores' \
234+
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores \
235235
--header "Authorization: Bearer {secret_key}" \
236236
--json '{
237237
"backup_id": "example-2d25-4a64-8172-28af7a0d41cc",
@@ -251,7 +251,7 @@ To restore a table from a source cluster's managed backup into a different clust
251251
{% include_cached copy-clipboard.html %}
252252
~~~ shell
253253
curl --request POST \
254-
--url 'https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores' \
254+
--url https://cockroachlabs.cloud/api/v1/clusters/{destination_cluster_id}/restores \
255255
--header "Authorization: Bearer {secret_key}" \
256256
--json '{
257257
"source_cluster_id": "{source_cluster_id}",
@@ -294,7 +294,7 @@ To view the status of a restore job using the cloud API, send a `GET` request to
294294
~~~ shell
295295
curl --request GET \
296296
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/restores/{restore_id} \
297-
--header 'Authorization: Bearer {secret_key}' \
297+
--header "Authorization: Bearer {secret_key}"
298298
~~~
299299

300300
If the request is successful, the client recieves a response containing JSON describing the status of the specified request operation:

src/current/cockroachcloud/aws-privatelink.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ To [add a private endpoint trusted owner](https://www.cockroachlabs.com/docs/api
7878
~~~ shell
7979
curl --request POST \
8080
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-owners \
81-
--header 'Authorization: Bearer {bearer_token' \
82-
--header 'content-type: application/json' \
81+
--header "Authorization: Bearer {bearer_token}" \
82+
--header "content-type: application/json" \
8383
--data '{"external_owner_id":"{aws_account_id}","type":"AWS_ACCOUNT_ID"}'
8484
~~~
8585

@@ -101,7 +101,7 @@ To [list private endpoint trusted owners](https://www.cockroachlabs.com/docs/api
101101
~~~ shell
102102
curl --request GET \
103103
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-owners \
104-
--header 'Authorization: Bearer {bearer_token}'
104+
--header "Authorization: Bearer {bearer_token}"
105105
~~~
106106

107107
Replace:
@@ -117,7 +117,7 @@ To [get details about a private endpoint trusted owner](https://www.cockroachlab
117117
~~~ shell
118118
curl --request GET \
119119
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-owners/{owner_id} \
120-
--header 'Authorization: Bearer {bearer_token}'
120+
--header "Authorization: Bearer {bearer_token}"
121121
~~~
122122

123123
Replace:
@@ -134,7 +134,7 @@ To [remove a private endpoint trusted owner](https://www.cockroachlabs.com/docs/
134134
~~~ shell
135135
curl --request DELETE \
136136
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/private-endpoint-trusted-owners/{owner_id} \
137-
--header 'Authorization: {bearer_token}'
137+
--header "Authorization: {bearer_token}"
138138
~~~
139139

140140
Replace:

src/current/cockroachcloud/client-certs-advanced.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ The [Cluster Admin]({% link cockroachcloud/authorization.md %}#cluster-admin) or
183183
curl --request POST \
184184
--url ${COCKROACH_SERVER}/api/v1/clusters/${CLUSTER_ID}/client-ca-cert \
185185
--header "Authorization: Bearer ${API_KEY}" \
186-
--header 'content-type: application/json' \
186+
--header "content-type: application/json" \
187187
--data "@cockroach_client_ca_cert.json"
188188
~~~
189189
@@ -263,7 +263,7 @@ The [Cluster Admin]({% link cockroachcloud/authorization.md %}#cluster-admin) or
263263
curl --request PATCH \
264264
--url ${COCKROACH_SERVER}/api/v1/clusters/${CLUSTER_ID}/client-ca-cert \
265265
--header "Authorization: Bearer ${API_KEY}" \
266-
--header 'content-type: application/json' \
266+
--header "content-type: application/json" \
267267
--data "@cockroach_client_ca_cert.json"
268268
~~~
269269

0 commit comments

Comments
 (0)