Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Commit dcf2d3c

Browse files
flimzynickva
authored andcommitted
Update config examples and other references
1 parent 103da04 commit dcf2d3c

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

src/api/server/common.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ could be changed to ``random`` by sending this HTTP request:
10361036

10371037
.. code-block:: http
10381038
1039-
PUT http://couchdb:5984/_config/uuids/algorithm HTTP/1.1
1039+
PUT http://couchdb:5984/_node/nonode@nohost/_config/uuids/algorithm HTTP/1.1
10401040
Content-Type: application/json
10411041
Accept: */*
10421042

src/config/auth.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ Server Administrators
4242
CouchDB is restarted, the passwords will be salted and encrypted. You may
4343
also use the HTTP interface to create administrator accounts; this way,
4444
you don't need to restart CouchDB, and there's no need to temporarily store
45-
or transmit passwords in plaintext. The HTTP ``_config/admins`` endpoint
46-
supports querying, deleting or creating new admin accounts:
45+
or transmit passwords in plaintext. The HTTP
46+
``/_node/{node-name}/_config/admins`` endpoint supports querying, deleting
47+
or creating new admin accounts:
4748

4849
.. code-block:: http
4950
50-
GET /_config/admins HTTP/1.1
51+
GET /_node/nonode@nohost/_config/admins HTTP/1.1
5152
Accept: application/json
5253
Host: localhost:5984
5354
@@ -74,7 +75,7 @@ Server Administrators
7475

7576
.. code-block:: http
7677
77-
PUT /_config/admins/architect?raw=true HTTP/1.1
78+
PUT /_node/nonode@nohost/_config/admins/architect?raw=true HTTP/1.1
7879
Accept: application/json
7980
Content-Type: application/json
8081
Content-Length: 89

src/config/intro.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Alternatively, configuration parameters could be set via the
156156
:ref:`HTTP API <api/config>`. This API allows to change CouchDB configuration
157157
on-the-fly without requiring a server restart::
158158

159-
curl -X PUT http://localhost:5984/_config/uuids/algorithm -d '"random"'
159+
curl -X PUT http://localhost:5984/_node/nonode@nohost/_config/uuids/algorithm -d '"random"'
160160

161161
In the response the old parameter's value returns::
162162

@@ -166,7 +166,7 @@ You should be careful with changing configuration via the HTTP API since it's
166166
easy to make CouchDB unavailable. For instance, if you'd like to change the
167167
:option:`httpd/bind_address` for a new one::
168168

169-
curl -X PUT http://localhost:5984/_config/httpd/bind_address -d '"10.10.0.128"'
169+
curl -X PUT http://localhost:5984/_node/nonode@nohost/_config/httpd/bind_address -d '"10.10.0.128"'
170170

171171
However, if you make a typo, or the specified IP address is not available
172172
from your network, CouchDB will be unavailable for you in both cases and

src/intro/security.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ identification for certain requests:
7171
- Triggering compaction (:post:`POST /database/_compact </{db}/_compact>`)
7272
- Reading the task status list (:get:`GET /_active_tasks </_active_tasks>`)
7373
- Restarting the server (:post:`POST /_restart </_restart>`)
74-
- Reading the active configuration (:get:`GET /_config </_config>`)
75-
- Updating the active configuration (:put:`PUT /_config/section/key
76-
</_config/{section}/{key}>`)
74+
- Reading the active configuration
75+
(:get:`GET /_node/{node-name}/_config </_config>`)
76+
- Updating the active configuration
77+
(:put:`PUT /_node/{node-name}/_config/section/key </_config/{section}/{key}>`)
7778

7879
Creating New Admin User
7980
^^^^^^^^^^^^^^^^^^^^^^^
@@ -90,7 +91,7 @@ create an admin user. We'll call her ``anna``, and her password is ``secret``.
9091
Note the double quotes in the following code; they are needed to denote a string
9192
value for the :ref:`configuration API <api/config>`::
9293

93-
> curl -X PUT $HOST/_config/admins/anna -d '"secret"'
94+
> curl -X PUT $HOST/_node/$NODENAME/_config/admins/anna -d '"secret"'
9495
""
9596

9697
As per the :ref:`_config <api/config>` API's behavior, we're getting
@@ -470,7 +471,9 @@ Now let's share the field ``name``. First, set up the ``public_fields``
470471
configuration option. Remember, that this action requires administrator
471472
privileges. The next command will prompt you for user `admin`'s password:
472473

473-
curl -X PUT http://localhost:5984/_config/couch_httpd_auth/public_fields \
474+
.. code-block:: bash
475+
476+
curl -X PUT http://localhost:5984/_node/nonode@nohost/_config/couch_httpd_auth/public_fields \
474477
-H "Content-Type: application/json" \
475478
-d '"name"' \
476479
-u admin

0 commit comments

Comments
 (0)