Skip to content

Commit 5dd5a10

Browse files
authored
DOC-9045-C14 -- PM Feedback T210922-6/7 (#584)
Fix duplicate delete path Fix examples show old 'databases' configuration https://issues.couchbase.com/browse/DOCS-9045
1 parent 3a8858f commit 5dd5a10

File tree

13 files changed

+108
-312
lines changed

13 files changed

+108
-312
lines changed

modules/ROOT/assets/attachments/configuration-properties-legacy.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -722,16 +722,10 @@ properties:
722722
"session_cookie_name": "CustomName1",
723723
"server": "http://localhost:8091",
724724
"bucket": "bucket-1",
725-
"users": {
726-
"user_1": {"password":"1234"}
727-
},
728725
"db2": {
729726
"session_cookie_name": "CustomName2",
730727
"server": "http://localhost:8091",
731-
"bucket": "bucket-2",
732-
"users": {
733-
"adam_2": {"password":"5678"}
734-
}
728+
"bucket": "bucket-2"
735729
}
736730
}
737731
}

modules/ROOT/assets/attachments/rest-api-admin-database.yaml

Lines changed: 40 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,20 +1144,34 @@ definitions:
11441144
11451145
sync:
11461146
$ref: '#/definitions/sync_function_model'
1147-
1148-
users:
1147+
#
1148+
# users:
1149+
# type: object
1150+
# title: user_configuration_model
1151+
# description: |+
1152+
# Defines the user(s) for this Sync Gateway database
1153+
# $ref: "#/definitions/user_configuration_model"
1154+
1155+
# roles:
1156+
# type: object
1157+
# title: role_configuration_model
1158+
# description: |+
1159+
# Defines the role(s) for this Sync Gateway database
1160+
# $ref: "#/definitions/role_configuration_model"
1161+
1162+
guest:
11491163
type: object
1150-
title: user_configuration_model
11511164
description: |+
1152-
Defines the user(s) for this Sync Gateway database
1153-
$ref: "#/definitions/user_configuration_model"
1165+
Defines whether a GUEST user is available and able to interacted, unauthenticated, with the Public REST API
1166+
properties:
1167+
disabled:
1168+
type: boolean
1169+
default: true
1170+
description: |+
1171+
Set `disabled` = `false` to allow GUEST
11541172
1155-
roles:
1156-
type: object
1157-
title: role_configuration_model
1158-
description: |+
1159-
Defines the role(s) for this Sync Gateway database
1160-
$ref: "#/definitions/role_configuration_model"
1173+
For example:
1174+
```curl -X PUT username:password@localhost:4985/db/_config -H "Content-Type: application/json" --data-binary '{"guest": {"disabled":false}}```
11611175
11621176
revs_limit:
11631177
type: integer
@@ -1240,11 +1254,8 @@ definitions:
12401254
{
12411255
"databases": {
12421256
"db": {
1243-
"server": "http://localhost:8091",
12441257
"bucket": "default",
1245-
"password": "password",
12461258
"import_docs": true,
1247-
"enable_shared_bucket_access": true,
12481259
"import_filter": `
12491260
function(doc) {
12501261
if (doc.type != "mobile") {
@@ -1782,23 +1793,23 @@ definitions:
17821793
The default is `7776000` seconds (90 days).
17831794
default: 7776000
17841795

1785-
enable_shared_bucket_access:
1786-
type: boolean
1787-
description: |+
1788-
**Deprecated at 3.0**
1796+
# enable_shared_bucket_access:
1797+
# type: boolean
1798+
# description: |+
1799+
# **Deprecated at 3.0**
17891800

1790-
use the `enable_shared_bucket_access` property to define whether to use extended attributes to store sync metadata; this is required to enable mobile-to-server data sync (_mobile convergence_).
1801+
# use the `enable_shared_bucket_access` property to define whether to use extended attributes to store sync metadata; this is required to enable mobile-to-server data sync (_mobile convergence_).
17911802

1792-
You can learn more about this functionality in [Syncing with Couchbase Server](sync-with-couchbase-server.html)
1803+
# You can learn more about this functionality in [Syncing with Couchbase Server](sync-with-couchbase-server.html)
17931804

1794-
This property works in conjunction with the ```import_docs``` property, which determines whether a node participates in import processing.
1805+
# This property works in conjunction with the ```import_docs``` property, which determines whether a node participates in import processing.
17951806

1796-
Set `enable_shared_bucket_access` to `true` on all nodes participating in such a configuration.
1807+
# Set `enable_shared_bucket_access` to `true` on all nodes participating in such a configuration.
17971808

1798-
On start-up, Sync Gateway will generate the mobile-specific metadata for all the pre-existing documents in the Couchbase Server bucket. From then on, documents can be inserted on the Server directly (with N1QL or SDKs) or through the Sync Gateway REST API.
1809+
# On start-up, Sync Gateway will generate the mobile-specific metadata for all the pre-existing documents in the Couchbase Server bucket. From then on, documents can be inserted on the Server directly (with N1QL or SDKs) or through the Sync Gateway REST API.
17991810

1800-
Change initiates a database restart
1801-
default: 'false'
1811+
# Change initiates a database restart
1812+
# default: 'false'
18021813

18031814
session_cookie_secure:
18041815
type: boolean
@@ -1823,23 +1834,13 @@ definitions:
18231834
18241835
```json
18251836
{
1826-
"interface":":4984",
1827-
"log":["*"],
18281837
"databases": {
18291838
"db1": {
18301839
"session_cookie_name": "CustomName1",
1831-
"server": "http://localhost:8091",
18321840
"bucket": "bucket-1",
1833-
"users": {
1834-
"user_1": {"password":"1234"}
1835-
},
1836-
"db2": {
1841+
"db2": {
18371842
"session_cookie_name": "CustomName2",
1838-
"server": "http://localhost:8091",
18391843
"bucket": "bucket-2",
1840-
"users": {
1841-
"adam_2": {"password":"5678"}
1842-
}
18431844
}
18441845
}
18451846
}
@@ -1943,18 +1944,10 @@ definitions:
19431944
19441945
```json
19451946
{
1946-
"logging": {
1947-
"console": {
1948-
"log_keys": ["*"]
1949-
}
1950-
},
19511947
"databases": {
19521948
"db": {
1953-
"server": "http://localhost:8091",
19541949
"bucket": "default",
1955-
"users": { "GUEST": { "disabled": false, "admin_channels": ["*"] } },
1956-
"allow_conflicts": false,
1957-
"revs_limit": 20,
1950+
# ... any other config required ...
19581951
"delta_sync": {
19591952
"enabled": true,
19601953
"rev_max_age_seconds": 86400
@@ -1968,9 +1961,9 @@ definitions:
19681961
19691962
-- Use of Delta Sync incurs additional bucket storage requirements which can be tuned with the [`rev_max_age_seconds`](#databases-this_db-delta_sync-rev_max_age_seconds) property.
19701963
1971-
-- Delta Sync is automatically enabled for peer-to-peer sync between Couchbase Lite clients.
1964+
-- Delta Sync is automatically enabled for peer-to-peer sync (where available) between Couchbase Lite clients.
19721965
1973-
-- Delta sync is disabled for Couchbase Lite database replicas.
1966+
-- Delta sync is disabled for Couchbase Lite database replicas (where available).
19741967
19751968
-- Push replications do not use Delta Sync when pushing to a pre-2.8 target.
19761969

modules/ROOT/assets/attachments/rest-api-admin.yaml

Lines changed: 28 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ consumes:
1515
- application/json
1616
produces:
1717
- application/json
18-
1918
paths:
2019
/:
2120
get:
@@ -297,9 +296,8 @@ paths:
297296
298297
```
299298
{
300-
"server":"http://localhost:8091",<br>
301-
"bucket": "todo_app",<br>
302-
"users": {"john": {"password": "pass", "admin_channels": ["*"]}}
299+
"name": "todo_db"
300+
"bucket": "todo_app"
303301
}
304302
```
305303
@@ -315,7 +313,6 @@ paths:
315313

316314
delete:
317315
tags:
318-
- 'Database Configuration'
319316
- 'Database Management'
320317
summary: Delete database
321318
description: Delete database
@@ -2673,6 +2670,20 @@ definitions:
26732670
# Defines the role(s) for this Sync Gateway database
26742671
# $ref: "#/definitions/role_configuration_model"
26752672

2673+
guest:
2674+
type: object
2675+
description: |+
2676+
Defines whether a GUEST user is available and able to interacted, unauthenticated, with the Public REST API
2677+
properties:
2678+
disabled:
2679+
type: boolean
2680+
default: true
2681+
description: |+
2682+
Set `disabled` = `false` to allow GUEST
2683+
2684+
For example:
2685+
```curl -X PUT username:password@localhost:4985/db/_config -H "Content-Type: application/json" --data-binary '{"guest": {"disabled":false}}```
2686+
26762687
revs_limit:
26772688
type: integer
26782689
description: |+
@@ -2746,7 +2757,7 @@ definitions:
27462757
import_filter:
27472758
type: string
27482759
description: |+
2749-
The `import_filter` property holds a Javascript function that cpntrols whether a document written to the Couchbase Server bucket should be made available to Couchbase Mobile clients (that is, it should be imported).
2760+
The `import_filter` property holds a Javascript function that controls whether a document written to the Couchbase Server bucket should be made available to Couchbase Mobile clients (that is, it should be imported).
27502761
27512762
This JavaScript filter function is provisioned using the Admin Rest API Endpoint ```put {db}/_config/import_filter```.
27522763
Add function as plain javascript in the request body, with the ```content-Type: application/javascript``` header.
@@ -2757,20 +2768,15 @@ definitions:
27572768
{
27582769
"databases": {
27592770
"db": {
2760-
"server": "http://localhost:8091",
2761-
"bucket": "default",
2762-
"password": "password",
2763-
"import_docs": true,
2764-
"enable_shared_bucket_access": true,
2765-
"import_filter": `
2766-
function(doc) {
2767-
if (doc.type != "mobile") {
2768-
return false
2769-
}
2770-
return true
2771-
}
2772-
`,
2773-
}
2771+
"import_filter": `
2772+
function(doc) {
2773+
if (doc.type != "mobile") {
2774+
return false
2775+
}
2776+
return true
2777+
}
2778+
`,
2779+
}
27742780
}
27752781
}
27762782
```
@@ -3340,23 +3346,14 @@ definitions:
33403346
33413347
```json
33423348
{
3343-
"interface":":4984",
3344-
"log":["*"],
33453349
"databases": {
33463350
"db1": {
33473351
"session_cookie_name": "CustomName1",
3348-
"server": "http://localhost:8091",
3349-
"bucket": "bucket-1",
3350-
"users": {
3351-
"user_1": {"password":"1234"}
3352+
"bucket": "bucket-1"
33523353
},
33533354
"db2": {
33543355
"session_cookie_name": "CustomName2",
3355-
"server": "http://localhost:8091",
3356-
"bucket": "bucket-2",
3357-
"users": {
3358-
"adam_2": {"password":"5678"}
3359-
}
3356+
"bucket": "bucket-2"
33603357
}
33613358
}
33623359
}
@@ -3460,18 +3457,8 @@ definitions:
34603457
34613458
```json
34623459
{
3463-
"logging": {
3464-
"console": {
3465-
"log_keys": ["*"]
3466-
}
3467-
},
34683460
"databases": {
34693461
"db": {
3470-
"server": "http://localhost:8091",
3471-
"bucket": "default",
3472-
"users": { "GUEST": { "disabled": false, "admin_channels": ["*"] } },
3473-
"allow_conflicts": false,
3474-
"revs_limit": 20,
34753462
"delta_sync": {
34763463
"enabled": true,
34773464
"rev_max_age_seconds": 86400
@@ -4092,13 +4079,6 @@ definitions:
40924079
description: Role name
40934080

40944081

4095-
4096-
4097-
4098-
4099-
4100-
4101-
41024082
ActiveTaskResponseBody:
41034083
type: object
41044084
properties:

0 commit comments

Comments
 (0)