You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/03/17 01:30:28 UTC

[couchdb-documentation] 02/03: Update config examples and other references

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git

commit dcf2d3c2414a9592b6153c961050918d632482a6
Author: Jonathan Hall <fl...@flimzy.com>
AuthorDate: Wed Mar 15 10:11:10 2017 +0100

    Update config examples and other references
---
 src/api/server/common.rst |  2 +-
 src/config/auth.rst       |  9 +++++----
 src/config/intro.rst      |  4 ++--
 src/intro/security.rst    | 13 ++++++++-----
 4 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/src/api/server/common.rst b/src/api/server/common.rst
index f7d9be5..e0aee09 100644
--- a/src/api/server/common.rst
+++ b/src/api/server/common.rst
@@ -1036,7 +1036,7 @@ could be changed to ``random`` by sending this HTTP request:
 
 .. code-block:: http
 
-    PUT http://couchdb:5984/_config/uuids/algorithm HTTP/1.1
+    PUT http://couchdb:5984/_node/nonode@nohost/_config/uuids/algorithm HTTP/1.1
     Content-Type: application/json
     Accept: */*
 
diff --git a/src/config/auth.rst b/src/config/auth.rst
index f1f9924..50c8d74 100644
--- a/src/config/auth.rst
+++ b/src/config/auth.rst
@@ -42,12 +42,13 @@ Server Administrators
     CouchDB is restarted, the passwords will be salted and encrypted. You may
     also use the HTTP interface to create administrator accounts; this way,
     you don't need to restart CouchDB, and there's no need to temporarily store
-    or transmit passwords in plaintext. The HTTP ``_config/admins`` endpoint
-    supports querying, deleting or creating new admin accounts:
+    or transmit passwords in plaintext. The HTTP
+    ``/_node/{node-name}/_config/admins`` endpoint supports querying, deleting
+    or creating new admin accounts:
 
     .. code-block:: http
 
-        GET /_config/admins HTTP/1.1
+        GET /_node/nonode@nohost/_config/admins HTTP/1.1
         Accept: application/json
         Host: localhost:5984
 
@@ -74,7 +75,7 @@ Server Administrators
 
     .. code-block:: http
 
-        PUT /_config/admins/architect?raw=true HTTP/1.1
+        PUT /_node/nonode@nohost/_config/admins/architect?raw=true HTTP/1.1
         Accept: application/json
         Content-Type: application/json
         Content-Length: 89
diff --git a/src/config/intro.rst b/src/config/intro.rst
index cd31fe0..157a4b5 100644
--- a/src/config/intro.rst
+++ b/src/config/intro.rst
@@ -156,7 +156,7 @@ Alternatively, configuration parameters could be set via the
 :ref:`HTTP API <api/config>`. This API allows to change CouchDB configuration
 on-the-fly without requiring a server restart::
 
-    curl -X PUT http://localhost:5984/_config/uuids/algorithm -d '"random"'
+    curl -X PUT http://localhost:5984/_node/nonode@nohost/_config/uuids/algorithm -d '"random"'
 
 In the response the old parameter's value returns::
 
@@ -166,7 +166,7 @@ You should be careful with changing configuration via the HTTP API since it's
 easy to make CouchDB unavailable. For instance, if you'd like to change the
 :option:`httpd/bind_address` for a new one::
 
-    curl -X PUT http://localhost:5984/_config/httpd/bind_address -d '"10.10.0.128"'
+    curl -X PUT http://localhost:5984/_node/nonode@nohost/_config/httpd/bind_address -d '"10.10.0.128"'
 
 However, if you make a typo, or the specified IP address is not available
 from your network, CouchDB will be unavailable for you in both cases and
diff --git a/src/intro/security.rst b/src/intro/security.rst
index 0330547..09fde5b 100644
--- a/src/intro/security.rst
+++ b/src/intro/security.rst
@@ -71,9 +71,10 @@ identification for certain requests:
 - Triggering compaction (:post:`POST /database/_compact </{db}/_compact>`)
 - Reading the task status list (:get:`GET /_active_tasks </_active_tasks>`)
 - Restarting the server (:post:`POST /_restart </_restart>`)
-- Reading the active configuration (:get:`GET /_config </_config>`)
-- Updating the active configuration (:put:`PUT /_config/section/key
-  </_config/{section}/{key}>`)
+- Reading the active configuration
+  (:get:`GET /_node/{node-name}/_config </_config>`)
+- Updating the active configuration
+  (:put:`PUT /_node/{node-name}/_config/section/key </_config/{section}/{key}>`)
 
 Creating New Admin User
 ^^^^^^^^^^^^^^^^^^^^^^^
@@ -90,7 +91,7 @@ create an admin user. We'll call her ``anna``, and her password is ``secret``.
 Note the double quotes in the following code; they are needed to denote a string
 value for the :ref:`configuration API <api/config>`::
 
-    > curl -X PUT $HOST/_config/admins/anna -d '"secret"'
+    > curl -X PUT $HOST/_node/$NODENAME/_config/admins/anna -d '"secret"'
     ""
 
 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``
 configuration option. Remember, that this action requires administrator
 privileges. The next command will prompt you for user `admin`'s password:
 
-    curl -X PUT http://localhost:5984/_config/couch_httpd_auth/public_fields \
+.. code-block:: bash
+
+    curl -X PUT http://localhost:5984/_node/nonode@nohost/_config/couch_httpd_auth/public_fields \
        -H "Content-Type: application/json" \
        -d '"name"' \
        -u admin

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.