From 640e9010d9ca203fc008275d7b0b9c63501ac751 Mon Sep 17 00:00:00 2001 From: Ville Ojamo <14869000+bluikko@users.noreply.github.com> Date: Fri, 28 Jul 2023 11:49:19 +0700 Subject: [PATCH] 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) --- doc/mgr/ceph_api/index.rst | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/mgr/ceph_api/index.rst b/doc/mgr/ceph_api/index.rst index 5785bf130a3..1cdc9a97bfb 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 -- 2.39.5