From: Ville Ojamo <14869000+bluikko@users.noreply.github.com> Date: Fri, 28 Jul 2023 04:49:19 +0000 (+0700) Subject: doc/mgr/ceph_api: Promptify example commands in index.rst X-Git-Tag: v17.2.7~237^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd9ac4400a52bb6536af1b8499bd15d2c157cf18;p=ceph.git doc/mgr/ceph_api: Promptify example commands in index.rst Use the more modern prompt block instead of using code blocks for example commands. Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com> (cherry picked from commit 4f9bd62f374d2f6bf74296d87e5205960464c349) --- diff --git a/doc/mgr/ceph_api/index.rst b/doc/mgr/ceph_api/index.rst index 5785bf130a30..1cdc9a97bfb5 100644 --- a/doc/mgr/ceph_api/index.rst +++ b/doc/mgr/ceph_api/index.rst @@ -41,14 +41,16 @@ So, prior to start consuming the Ceph API, a valid JSON Web Token (JWT) has to be obtained, and it may then be reused for subsequent requests. The ``/api/auth`` endpoint will provide the valid token: -.. code-block:: sh +.. prompt:: bash $ - $ curl -X POST "https://example.com:8443/api/auth" \ - -H "Accept: application/vnd.ceph.api.v1.0+json" \ - -H "Content-Type: application/json" \ - -d '{"username": , "password": }' + curl -X POST "https://example.com:8443/api/auth" \ + -H "Accept: application/vnd.ceph.api.v1.0+json" \ + -H "Content-Type: application/json" \ + -d '{"username": , "password": }' - { "token": "", ...} +:: + + { "token": "", ...} The token obtained must be passed together with every API request in the ``Authorization`` HTTP header:: @@ -74,11 +76,11 @@ purpose, Ceph API is built upon the following principles: An example: -.. code-block:: bash +.. prompt:: bash $ - $ curl -X GET "https://example.com:8443/api/osd" \ - -H "Accept: application/vnd.ceph.api.v1.0+json" \ - -H "Authorization: Bearer " + curl -X GET "https://example.com:8443/api/osd" \ + -H "Accept: application/vnd.ceph.api.v1.0+json" \ + -H "Authorization: Bearer " Specification