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:26 UTC

[couchdb-documentation] branch master updated (c7f8645 -> 244c7d4)

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

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

      from  c7f8645   Render new options with more emphasis
       new  103da04   Update _config endpoint documentation to reflect new location
       new  dcf2d3c   Update config examples and other references
       new  244c7d4   Mention /_config move in Whatsnew document

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/api/server/common.rst        |  2 +-
 src/api/server/configuration.rst | 35 +++++++++++++++++++----------------
 src/config/auth.rst              |  9 +++++----
 src/config/intro.rst             |  4 ++--
 src/intro/security.rst           | 13 ++++++++-----
 src/whatsnew/2.0.rst             |  2 ++
 6 files changed, 37 insertions(+), 28 deletions(-)

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

[couchdb-documentation] 01/03: Update _config endpoint documentation to reflect new location

Posted by va...@apache.org.
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 103da04f3cec9aab0309266cb3a984549c4ebcab
Author: Jonathan Hall <fl...@flimzy.com>
AuthorDate: Mon Mar 13 20:41:14 2017 +0100

    Update _config endpoint documentation to reflect new location
---
 src/api/server/configuration.rst | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/src/api/server/configuration.rst b/src/api/server/configuration.rst
index 13a54b3..d78ceed 100644
--- a/src/api/server/configuration.rst
+++ b/src/api/server/configuration.rst
@@ -19,10 +19,10 @@ Configuration
 The CouchDB Server Configuration API provide an interface to query and update
 the various configuration values within a running CouchDB instance.
 
-``/_config``
-============
+``/_node/{node-name}/_config``
+==============================
 
-.. http:get:: /_config
+.. http:get:: /_node/{node-name}/_config
     :synopsis: Obtains a list of the entire server configuration
 
     Returns the entire CouchDB server configuration as a JSON structure. The
@@ -40,7 +40,7 @@ the various configuration values within a running CouchDB instance.
 
     .. code-block:: http
 
-        GET /_config HTTP/1.1
+        GET /_node/nonode@nohost/_config HTTP/1.1
         Accept: application/json
         Host: localhost:5984
 
@@ -153,12 +153,15 @@ the various configuration values within a running CouchDB instance.
             }
         }
 
+.. versionchanged: 2.0.0 The config endpoint from ``/_config`` to
+   ``/_node/{node-name}/_config``.
+
 .. _api/config/section:
 
-``/_config/section``
-====================
+``_node/{node-name}/_config/section``
+=====================================
 
-.. http:get:: /_config/{section}
+.. http:get:: /_node/{node-name}/_config/{section}
     :synopsis: Returns all the configuration values for the specified section
 
     Gets the configuration structure for a single section.
@@ -175,7 +178,7 @@ the various configuration values within a running CouchDB instance.
 
     .. code-block:: http
 
-        GET /_config/httpd HTTP/1.1
+        GET /_node/nonode@nohost/_config/httpd HTTP/1.1
         Accept: application/json
         Host: localhost:5984
 
@@ -204,10 +207,10 @@ the various configuration values within a running CouchDB instance.
 
 .. _api/config/section/key:
 
-``/_config/section/key``
-========================
+``/_node/node/_config/section/key``
+===================================
 
-.. http:get:: /_config/{section}/{key}
+.. http:get:: /_node/{node-name}/_config/{section}/{key}
     :synopsis: Returns a specific section/configuration value
 
     Gets a single configuration value from within a specific configuration
@@ -226,7 +229,7 @@ the various configuration values within a running CouchDB instance.
 
     .. code-block:: http
 
-        GET /_config/log/level HTTP/1.1
+        GET /_node/nonode@nohost/_config/log/level HTTP/1.1
         Accept: application/json
         Host: localhost:5984
 
@@ -248,7 +251,7 @@ the various configuration values within a running CouchDB instance.
         or numeric value, or an array or object. Some client environments may
         not parse simple strings or numeric values as valid JSON.
 
-.. http:put:: /_config/{section}/{key}
+.. http:put:: /_node/{node-name}/_config/{section}/{key}
     :synopsis: Sets the specified configuration value
 
     Updates a configuration value. The new value should be supplied in the
@@ -272,7 +275,7 @@ the various configuration values within a running CouchDB instance.
 
     .. code-block:: http
 
-        PUT /_config/log/level HTTP/1.1
+        PUT /_node/nonode@nohost/_config/log/level HTTP/1.1
         Accept: application/json
         Content-Length: 7
         Content-Type: application/json
@@ -293,7 +296,7 @@ the various configuration values within a running CouchDB instance.
 
         "debug"
 
-.. http:delete:: /_config/{section}/{key}
+.. http:delete:: /_node/{node-name}/_config/{section}/{key}
     :synopsis: Removes the current setting
 
     Deletes a configuration value. The returned JSON will be the value of the
@@ -313,7 +316,7 @@ the various configuration values within a running CouchDB instance.
 
     .. code-block:: http
 
-        DELETE /_config/log/level HTTP/1.1
+        DELETE /_node/nonode@nohost/_config/log/level HTTP/1.1
         Accept: application/json
         Host: localhost:5984
 

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

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

Posted by va...@apache.org.
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>.

[couchdb-documentation] 03/03: Mention /_config move in Whatsnew document

Posted by va...@apache.org.
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 244c7d46fc280afbb606521b1131a51ccadd6b54
Author: Jonathan Hall <fl...@flimzy.com>
AuthorDate: Wed Mar 15 10:22:20 2017 +0100

    Mention /_config move in Whatsnew document
---
 src/whatsnew/2.0.rst | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/whatsnew/2.0.rst b/src/whatsnew/2.0.rst
index 6640c7c..e774804 100644
--- a/src/whatsnew/2.0.rst
+++ b/src/whatsnew/2.0.rst
@@ -66,6 +66,8 @@ Version 2.0.0
 * Support added for Erlang/OTP 17.x, 18.x and 19
 * New streamlined build system written for Unix-like systems and Microsoft
   Windows
+* :ref:`Configuration <api/config>` has moved from ``/_config`` to
+  ``/_node/{node-name}/_config``
 
 .. _release/2.0.x/upgrade:
 

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