From a9f27253888270580fc93939f437df217ed8cb26 Mon Sep 17 00:00:00 2001 From: Michele Tartara <mtartara@google.com> Date: Tue, 26 Mar 2013 16:21:43 +0000 Subject: [PATCH] More info on using the RAPI Add some additional information about how to use/test the RAPI, including how to specify authentication credentials. Cherry picked from 681f4f7bb95a2b467f917c84a68ccf9aa7665763 on master. Signed-off-by: Michele Tartara <mtartara@google.com> Reviewed-by: Helga Velroyen <helgav@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> --- doc/rapi.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/rapi.rst b/doc/rapi.rst index 11c64c15a..259c96085 100644 --- a/doc/rapi.rst +++ b/doc/rapi.rst @@ -71,6 +71,11 @@ Example:: # write access) superuser {HA1}ec018ffe72b8e75bb4d508ed5b6d079c read,write +When using the RAPI, username and password can be sent to the server +by using the standard HTTP basic access authentication. This means that +for accessing the protected URL ``https://cluster.example.com/resource``, +the address ``https://username:password@cluster.example.com/resource`` should +be used instead. .. [#pwhash] Using the MD5 hash of username, realm and password is described in :rfc:`2617` ("HTTP Authentication"), sections 3.2.2.2 @@ -265,14 +270,16 @@ Shell .. highlight:: shell-example -Using wget:: +Using ``wget``:: $ wget -q -O - https://%CLUSTERNAME%:5080/2/info -or curl:: +or ``curl``:: $ curl https://%CLUSTERNAME%:5080/2/info +Note: with ``curl``, the request method (GET, POST, PUT) can be specified +using the ``-X`` command line option. Python ++++++ -- GitLab