Skip to content

Commit 22d5a16

Browse files
committed
DOC-12386: Replace {tkn-db} (#854)
* Replace {tkn-db} * Remove double escaping
1 parent 843f53f commit 22d5a16

11 files changed

Lines changed: 44 additions & 45 deletions

modules/ROOT/pages/_partials/_define_page_index.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -640,18 +640,18 @@ endif::xref--pfx-sgw[]
640640
:rest-api-admin--xref--sync-function: {rest-api-admin--pfx--database-configuration}/update_sync_function[\{db\}/_config/sync]
641641
:rest-api-admin--xref--replication: {rest-api-admin--pfx}#/Replication[Replication]
642642

643-
:rest-api-admin-role-get--xref: {rest-api-admin--pfx}#/role/get__db___role__name_[/\{tkn-db}/_role/]
644-
:rest-api-admin-role-post--xref: {rest-api-admin--pfx}#/role/post__db___role[/\{tkn-db}/_role/]
645-
:rest-api-admin-role-put--xref: {rest-api-admin--pfx}#/role/put__db___role__name_[/\{tkn-db}/_role/\{name}]
643+
:rest-api-admin-role-get--xref: {rest-api-admin--pfx}#/role/get__db___role__name_[/\{db}/_role/]
644+
:rest-api-admin-role-post--xref: {rest-api-admin--pfx}#/role/post__db___role[/\{db}/_role/]
645+
:rest-api-admin-role-put--xref: {rest-api-admin--pfx}#/role/put__db___role__name_[/\{db}/_role/\{name}]
646646

647-
:rest-api-admin-user-get--xref: {rest-api-admin--pfx}#/user/post\__db___user_name_[/\{tkn-db}/_user/\{name}]
648-
:rest-api-admin-user-post--xref: {rest-api-admin--pfx}#/user/post\__db___user_[/\{tkn-db}/_user]
649-
:rest-api-admin-user-put--xref: {rest-api-admin--pfx}#/user/post\__db___user_name_[/\{tkn-db}/_user/\{name}]
647+
:rest-api-admin-user-get--xref: {rest-api-admin--pfx}#/user/post\__db___user_name_[/\{db}/_user/\{name}]
648+
:rest-api-admin-user-post--xref: {rest-api-admin--pfx}#/user/post\__db___user_[/\{db}/_user]
649+
:rest-api-admin-user-put--xref: {rest-api-admin--pfx}#/user/post\__db___user_name_[/\{db}/_user/\{name}]
650650

651651
:rest-api-admin--pfx--database-management: {rest-api-admin--pfx}#/Database_Management/
652652
:rest-api-admin--xref--database-management--compact: {rest-api-admin--pfx--database-management}post__db___compact[\{db\}/_compact]
653653

654-
:rest-api-admin-doc-channels-get--xref: {rest-api-admin--pfx}#/database/get__db___all_docs[/\{tkn-db}/_alldocs]
654+
:rest-api-admin-doc-channels-get--xref: {rest-api-admin--pfx}#/database/get__db___all_docs[/\{db}/_alldocs]
655655

656656

657657
// :configuration-schema-access-control--page: rest-api-admin-access-control.adoc
@@ -860,12 +860,12 @@ endif::xref--pfx-sgw[]
860860
:rest-api-admin--pfx-document: {xref-sgw--xref-admin-api-document}
861861
:xref-sgw--xref-admin-api-replication: {rest-api-admin--pfx}#/replication
862862
:xref-sgw--xref-admin-api-replication-post: {xref-sgw--xref-admin-api-replication}/post__db___replication__replicationID_
863-
:rest-api-admin--pfx-replication-delete: {xref-sgw--xref-admin-api-replication}/delete__db___replication__replicationID_[DELETE/\{tkn-url}/\{tkn-db}/_replication/example-rep-db1]
863+
:rest-api-admin--pfx-replication-delete: {xref-sgw--xref-admin-api-replication}/delete__db___replication__replicationID_[DELETE/\{url}/\{db}/_replication/example-rep-db1]
864864
:rest-api-admin--pfx-replication-post-remote: {xref-sgw--xref-admin-api-replication-post}[remote]
865-
:rest-api-admin--pfx-replication-post: {xref-sgw--xref-admin-api-replication-post}[POST/\{tkn-url}/\{tkn-db}/_replication/example-rep-db1]
866-
:rest-api-admin--pfx-replication-put: {xref-sgw--xref-admin-api-replication}/put__db___replication__replicationID_[PUT/\{tkn-url}/\{tkn-db}/_replication/example-rep-db1]
865+
:rest-api-admin--pfx-replication-post: {xref-sgw--xref-admin-api-replication-post}[POST/\{url}/\{db}/_replication/example-rep-db1]
866+
:rest-api-admin--pfx-replication-put: {xref-sgw--xref-admin-api-replication}/put__db___replication__replicationID_[PUT/\{url}/\{db}/_replication/example-rep-db1]
867867
:rest-api-admin--pfx-replication-repstatus-query: {xref-sgw--xref-admin-api-replication}/get__db___replicationStatus__queryString_[_replicationStatus]
868-
:rest-api-admin--pfx-replication-repstatus-set: {xref-sgw--xref-admin-api-replication}/put__db___replicationStatus__replicationID__action__action_[_replicationStatus(replicationID)?action={tkn-action}]
868+
:rest-api-admin--pfx-replication-repstatus-set: {xref-sgw--xref-admin-api-replication}/put__db___replicationStatus__replicationID__action__action_[_replicationStatus(replicationID)?action=\{action}]
869869
:rest-api-admin--pfx-replication-repstatus: {xref-sgw--xref-admin-api-replication}/get__db___replicationStatus__replicationID_[_replicationStatus(replicationID)]
870870
:rest-api-admin--pfx-replication: {xref-sgw--xref-admin-api-replication}
871871

modules/ROOT/pages/_partials/incpg-icr-initialization.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ Running highlights::
7878

7979
* REST ONLY
8080

81-
** POST databases/\{tkn-db}/_replication creates a replication using the {rep-id} specified in the body or if none specified, a unique UUID.
81+
** POST databases/\{db}/_replication creates a replication using the replication ID specified in the body or if none specified, a unique UUID.
8282

83-
** PUT databases/\{tkn-db}/_replication/\{rep-id} upserts replication {rep-id}.
83+
** PUT databases/\{db}/_replication/\{replicationID} upserts the replication with the specified ID.
8484

8585
* {enterprise} only:
8686

modules/ROOT/pages/_partials/sync-api/sync-function-api-expiry.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ This expiration time is not propagated when the document is replicated.
6969
The purge of the document does not cause it to be deleted on any other database.
7070

7171
=== Inspect a Document Expiry Value
72-
You can retrieve a document's expiration time, as it is returned in the response of GET xref:{rest-api--page}##/document/get__db___doc_[+/\{db/\{doc}] use `show_exp=true` as the querystring.
72+
You can retrieve a document's expiration time, as it is returned in the response of GET xref:{rest-api--page}#/document/get__db___doc_[+/{db}/{doc}+] using `show_exp=true` as the querystring.
7373

7474
[source, bash]
7575
----

modules/ROOT/pages/authentication-users.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ image::static-auth-provider.png[]
8888

8989
API reference:
9090

91-
- xref:rest-api.adoc#/auth/post\__db___facebook[/+\{db}+/_facebook]
92-
- xref:rest-api.adoc#/auth/post\__db___google[/+\{db}+/_google]
91+
- xref:rest-api.adoc#/auth/post\__db___facebook[/+{db}+/_facebook]
92+
- xref:rest-api.adoc#/auth/post\__db___google[/+{db}+/_google]
9393

9494
For other providers we recommend to use Custom Authentication or OpenID Connect.
9595

@@ -104,7 +104,7 @@ The last request creates a session.
104104

105105
image::custom-auth-flow.png[]
106106

107-
Given a user that has already been created, a new session for that user can be created on the Admin {rest-api-admin--pfx}#/session/post\__db___session[POST /+\{db}+/_session] endpoint.
107+
Given a user that has already been created, a new session for that user can be created on the Admin {rest-api-admin--pfx}#/session/post\__db___session[POST /+{db}+/_session] endpoint.
108108

109109
[source,bash]
110110
----
@@ -143,7 +143,7 @@ There are two implementation methods available with OpenID Connect:
143143

144144
<<implicit-flow>>::
145145
With this method, the retrieval of the ID token takes place on the device.
146-
You can then create a user session using the POST `+/\{tkn-db}/_session+` endpoint on the Public REST API with the ID token.
146+
You can then create a user session using the POST `+/{db}/_session+` endpoint on the Public REST API with the ID token.
147147
<<authorization-code-flow>>::
148148
This method relies on {sgw} to retrieve the ID token.
149149

@@ -205,7 +205,7 @@ By doing this, the application can then use the token to create a {sgw} session.
205205
image::client-auth.png[]
206206

207207
. The Google SignIn SDK prompts the user to login and if successful it returns an ID token to the application.
208-
. The ID token is used to create a {sgw} session by sending a POST `+/\{tkn-db}/_session+` request.
208+
. The ID token is used to create a {sgw} session by sending a POST `+/{db}/_session+` request.
209209
. {sgw} returns a cookie session in the response header.
210210
. The {sgw} cookie session is used on the replicator object.
211211

modules/ROOT/pages/changes-feed.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ For instance, if you have a channel called 'needs-email', you could have a bot t
4141
== Endpoint
4242

4343

44-
The changes feed API is a REST API endpoint (xref:rest-api.adoc#/database/get\__db___changes[`+/\{tkn-db}/_changes+`]) that returns a sorted list of changes made to documents in the database.
44+
The changes feed API is a REST API endpoint (xref:rest-api.adoc#/database/get\__db___changes[`+/{db}/_changes+`]) that returns a sorted list of changes made to documents in the database.
4545
It permits applications to implement business logic that reacts to changes in documents.
4646

4747

modules/ROOT/pages/database-management.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ Set the expiry time to be sufficient to allow for all other devices to sync and
9393
|Tombstones are automatically purged from the bucket based on the server's metadata purge interval.
9494

9595
|Manual
96-
|Tombstones can be manually removed via Sync Gateway's {rest-api-admin--pfx}#/document/post\__db___purge[+/\{tkn-db}/_purge+] endpoint, or deleting documents directly in the bucket.
97-
|Tombstones can be manually removed via Sync Gateway's {rest-api-admin--pfx}#/document/post\__db___purge[+/\{tkn-db}/_purge+] endpoint.
96+
|Tombstones can be manually removed via Sync Gateway's {rest-api-admin--pfx}#/document/post\__db___purge[+/{db}/_purge+] endpoint, or deleting documents directly in the bucket.
97+
|Tombstones can be manually removed via Sync Gateway's {rest-api-admin--pfx}#/document/post\__db___purge[+/{db}/_purge+] endpoint.
9898
|===
9999
100100
Purging of tombstones is also required on Couchbase Lite.
@@ -123,7 +123,7 @@ Purged On
123123
| Couchbase Server
124124
| Restarting Sync Gateway will flush the cache
125125
| * Restarting Sync Gateway will flush the cache
126-
* Running the {rest-api-admin--pfx}#/database/post\__db___compact[+/\{tkn-db}/_compact+] endpoint will remove purged tombstones from the channel cache {fn-211}
126+
* Running the {rest-api-admin--pfx}#/database/post\__db___compact[+/{db}/_compact+] endpoint will remove purged tombstones from the channel cache {fn-211}
127127
128128
| Sync Gateway
129129
a| * Restarting Sync Gateway will flush the cache.
@@ -166,7 +166,7 @@ To update the Sync Function and fully resync, you are recommended to follow the
166166
NOTE: This is an expensive operation because it requires every document in the database to be processed by the new function.
167167
168168
The database can accept no requests until this process is complete because no user's full access privileges are known until all documents have been scanned.
169-
Therefore, the Sync Function update will result in application downtime whilst the database is offline (that is, between the call to the `+/{tkn-db}/_offline+` and `+/{tkn-db}/_online+` endpoints in <<steps-to-resync>>.
169+
Therefore, the Sync Function update will result in application downtime whilst the database is offline (that is, between the call to the `+/{db}/_offline+` and `+/{db}/_online+` endpoints in <<steps-to-resync>>.
170170
171171
172172
[#steps-to-resync]
@@ -176,15 +176,15 @@ Therefore, the Sync Function update will result in application downtime whilst t
176176
. Restart Sync Gateway
177177
. Take the database offline +
178178
Use this Admin REST API endpoint: +
179-
{rest-api-admin--pfx}#/Database_Management/post\__db___offline[+/{tkn-db}/_offline+]
179+
{rest-api-admin--pfx}#/Database_Management/post\__db___offline[+/{db}/_offline+]
180180
. Resync the database +
181181
Use this Admin REST API endpoint: +
182-
{rest-api-admin--pfx}#/Database_Management/post\/post__db___resync[+/{tkn-db}/resync+]
182+
{rest-api-admin--pfx}#/Database_Management/post\/post__db___resync[+/{db}/resync+]
183183
+
184184
The message body of the response contains the number of changes that were made as a result of calling resync
185185
. Bring the database back online +
186186
Use this Admin REST API endpoint: +
187-
{rest-api-admin--pfx}#/Database_Management/post\__db___online[+/{tkn-db}/_online+]
187+
{rest-api-admin--pfx}#/Database_Management/post\__db___online[+/{db}/_online+]
188188
****
189189
190190
=== Uses
@@ -210,7 +210,7 @@ Running a resync operation does not revoke access to that document.
210210
If you need to ensure access to the database during the update, you can create a read-only backup of the Sync Gateway's bucket beforehand, then run a secondary Sync Gateway on the backup bucket, in read-only mode.
211211
After the update is complete, switch to the main Gateway and bucket.
212212
213-
In a clustered environment with multiple Sync Gateway instances sharing the load, all the instances need to share the same configuration, so they all need to be taken offline either by stopping the process or taking them offline using the {rest-api-admin--pfx}#/Database_Management/post\__db___offline[+/{tkn-db}/_offline+] endpoint.
213+
In a clustered environment with multiple Sync Gateway instances sharing the load, all the instances need to share the same configuration, so they all need to be taken offline either by stopping the process or taking them offline using the {rest-api-admin--pfx}#/Database_Management/post\__db___offline[+/{db}/_offline+] endpoint.
214214
After the configuration is updated, *one* instance should be brought up so it can update the database--if more than one is running at this time, they'll conflict with each other.
215215
After the first instance finishes opening the database, the others can be started.
216216

modules/ROOT/pages/database-offline.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ Specific uses for the database offline/online functionality include:
4040

4141
== Actions
4242

43-
* Taking a database offline: {rest-api-admin--pfx}#/database/post\__db___offline[POST /+\{db}+/_offline]
44-
* Taking a database online: {rest-api-admin--pfx}#/database/post\__db___online[POST /+\{db}+/_online]
43+
* Taking a database offline: {rest-api-admin--pfx}#/database/post\__db___offline[POST /+{db}+/_offline]
44+
* Taking a database online: {rest-api-admin--pfx}#/database/post\__db___online[POST /+{db}+/_online]
4545

4646
By default, when Sync Gateway starts, it brings all databases that are defined in the configuration file online.
4747
To keep a database offline when Sync Gateway starts, you can add the `offline` configuration property to the database configuration properties -- see {rest-api-admin--xref--database-configuration}.
4848

49-
Later, to bring the database online, you can use the `+POST /\{tkn-db}/_online+` Admin REST API request.
49+
Later, to bring the database online, you can use the `+POST /{db}/_online+` Admin REST API request.
5050

5151

5252
== Automatic Offlining

modules/ROOT/pages/get-started-verify-install.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,9 @@ Assuming the delete worked you should see the following response:
450450

451451
To verify that document changes have been replicated, you can:
452452

453-
* Monitor the {sgw} revision number returned by the database endpoint (xref:{rest-api--page}#/database/get\__db__[GET /\{tkn-db}/]).
453+
* Monitor the {sgw} revision number returned by the database endpoint (xref:{rest-api--page}#/database/get\__db__[GET /\{db}/]).
454454
The revision number increments for every change that happens on the {sgw} database.
455-
* Query a document by ID on the {sgw} REST API as shown in <<lbl-check-cbs>>. Use (xref:{rest-api--page}#/document/get\__db___doc_[GET /\{tkn-db}/\{id}]) -- see: {rest-api-access--xref} for more.
455+
* Query a document by ID on the {sgw} REST API as shown in <<lbl-check-cbs>>. Use (xref:{rest-api--page}#/document/get\__db___doc_[GET /\{db}/\{id}]) -- see: {rest-api-access--xref} for more.
456456
* Query a document from the Query Workbench on the {cbs} Console.
457457

458458

modules/ROOT/pages/managing-tombstones.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ Set the expiry time to be sufficient to allow for all other devices to sync and
163163
|Tombstones are automatically purged from the bucket based on the server's metadata purge interval.
164164

165165
|Manual
166-
|Tombstones can be manually removed via Sync Gateway's {rest-api-admin--pfx}#/document/post\__db___purge[+/\{tkn-db}/_purge+] endpoint, or deleting documents directly in the bucket.
167-
|Tombstones can be manually removed via Sync Gateway's {rest-api-admin--pfx}#/document/post\__db___purge[+/\{tkn-db}/_purge+] endpoint.
166+
|Tombstones can be manually removed via Sync Gateway's {rest-api-admin--pfx}#/document/post\__db___purge[+/{db}/_purge+] endpoint, or deleting documents directly in the bucket.
167+
|Tombstones can be manually removed via Sync Gateway's {rest-api-admin--pfx}#/document/post\__db___purge[+/{db}/_purge+] endpoint.
168168
|===
169169

170170
Purging of tombstones is also required on Couchbase Lite.
@@ -193,7 +193,7 @@ Purged On
193193
| Couchbase Server
194194
| Restarting Sync Gateway will flush the cache
195195
| * Restarting Sync Gateway will flush the cache
196-
* Running the {rest-api-admin--pfx}#/database/post\__db___compact[+/\{tkn-db}/_compact+] endpoint will remove purged tombstones from the channel cache {fn-211}
196+
* Running the {rest-api-admin--pfx}#/database/post\__db___compact[+/{db}/_compact+] endpoint will remove purged tombstones from the channel cache {fn-211}
197197

198198
| Sync Gateway
199199
a| * Restarting Sync Gateway will flush the cache.

modules/ROOT/pages/resync.adoc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ include::partial$_set_page_context.adoc[]
1313
:param-abstract: This content explains the resync feature
1414
include::partial$_show_page_header_block.adoc[]
1515

16-
:tkn-db: pass:q,a[\{db\}]
17-
:resync_api_post: {rest-api-admin--pfx}#/Database_Management/post__db___resync[/{tkn-db}/resync]
18-
:resync_api_get: {rest-api-admin--pfx}#/Database_Management/get__db___resync[/{tkn-db}/resync]
16+
:resync_api_post: {rest-api-admin--pfx}#/Database_Management/post__db___resync[+/{db}/_resync+]
17+
:resync_api_get: {rest-api-admin--pfx}#/Database_Management/get__db___resync[+/{db}/_resync+]
1918

2019

2120
== Introduction
@@ -50,7 +49,7 @@ To update the Sync Function and fully resync, you are recommended to follow the
5049
NOTE: This is an expensive operation because it requires every document in the database to be processed by the new function.
5150

5251
The database can accept no requests until resync is complete because no user's full access privileges are known until all documents have been scanned.
53-
Therefore, the Sync Function update will result in application downtime whilst the database is offline (that is, between the call to the `/{tkn-db}/_offline` and `/{tkn-db}/_online` endpoints in <<steps-to-resync>>.
52+
Therefore, the Sync Function update will result in application downtime whilst the database is offline (that is, between the call to the `+/{db}/_offline+` and `+/{db}/_online+` endpoints in <<steps-to-resync>>.
5453

5554
You won't need to run the resync operation, if either:
5655

@@ -66,15 +65,15 @@ You won't need to run the resync operation, if either:
6665
. Restart Sync Gateway
6766
. Take the database offline +
6867
Use this Admin REST API endpoint:
69-
{rest-api-admin--pfx}#/Database_Management/post\__db___offline[/{tkn-db}/_offline]
68+
{rest-api-admin--pfx}#/Database_Management/post\__db___offline[+/{db}/_offline+]
7069
. Resync the database +
7170
Use this Admin REST API endpoint: {resync_api_post}
7271
. Monitor the resync status using {resync_api_get} to see when it completes.
7372
+
7473
The message body of the response contains the number of changes that were made as a result of calling resync
7574
. Bring the database back online +
7675
Use this Admin REST API endpoint:
77-
{rest-api-admin--pfx}#/Database_Management/post\__db___online[/{tkn-db}/_online]
76+
{rest-api-admin--pfx}#/Database_Management/post\__db___online[+/{db}/_online+]
7877
****
7978

8079

@@ -84,7 +83,7 @@ Use this Admin REST API endpoint:
8483
Resync is run asynchronously.
8584
Its status can be monitored using {resync_api_get}.
8685

87-
Be sure to take the database offline using {rest-api-admin--pfx}#/Database_Management/post\__db___offline[/{tkn-db}/_offline]
86+
Be sure to take the database offline using {rest-api-admin--pfx}#/Database_Management/post\__db___offline[+/{db}/_offline+]
8887

8988
=== Resync Context
9089

@@ -107,7 +106,7 @@ Once you detect the resync is complete, switch back to the main Sync Gateway and
107106
=== Updating Clusters
108107

109108
In a clustered environment with multiple Sync Gateway instances sharing the load, all the instances need to share the same configuration.
110-
To ensure this happens, you must taken all instances offline using the {rest-api-admin--pfx}#/Database_Management/post\__db___offline[/{tkn-db}/_offline] endpoint.
109+
To ensure this happens, you must taken all instances offline using the {rest-api-admin--pfx}#/Database_Management/post\__db___offline[+/{db}/_offline+] endpoint.
111110

112111
After the configuration is updated, *one* instance should be brought up so it can update the database--if more than one is running at this time, they'll conflict with each other.
113112
After the first instance finishes opening the database, the others can be started.

0 commit comments

Comments
 (0)