Skip to content

Commit

Permalink
Documenation fixes: Updated json formatting, links in readme, and add…
Browse files Browse the repository at this point in the history
…ed sphinx dependencies
  • Loading branch information
davidraker committed Oct 3, 2023
1 parent 252f863 commit 0cf49c3
Show file tree
Hide file tree
Showing 23 changed files with 100 additions and 639 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ and web_secret_key should not be included. If SSL is not desired,
provide a web_secret_key instead and remove the lines for the web_ssl_cert
and web_ssl_key. Any string can be used for the web_secret_key.

Full VOLTTRON documentation is available at [VOLTTRON Readthedocs](https://volttron.readthedocs.io)
Full VOLTTRON documentation is available at [VOLTTRON Readthedocs](https://eclipse-volttron.readthedocs.io/)


## Use
Expand All @@ -77,7 +77,7 @@ configuration shown above). This will create a file called web-users.json in the

Additionally, the web service provides a RESTful API which can be used by other applications. Full documentation for
the API is available on
[Readthedocs](https://volttron.readthedocs.io/en/modular/external-docs/volttron-lib-web/docs/source/index.html).
[Readthedocs](https://eclipse-volttron.readthedocs.io/en/latest/external-docs/volttron-lib-web/docs/source/index.html).

Note that it is necessary for most API endpoints to have previously created a username and password for authentication
by visiting the /admin page or by manually copying or creating a web-users.json file. Authentication can then be
Expand Down
8 changes: 4 additions & 4 deletions docs/source/authentication-endpoints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Request:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"username": "<username>",
Expand All @@ -61,7 +61,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"refresh_token": "<jwt_refresh_token>",
Expand Down Expand Up @@ -90,7 +90,7 @@ Request:
- Authorization: ``BEARER <jwt_refresh_token>``
- Body (optional):

.. code-block:: JSON
.. code-block:: javascript
{
"current_access_token": "<jwt_access_token>"
Expand All @@ -103,7 +103,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"access_token": "<new_jwt_access_token>"
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ creating a user and password:

.. image:: files/create_admin_user.png

.. code-block:: json
.. code-block:: javascript
{
"my_user":{
Expand Down Expand Up @@ -98,7 +98,7 @@ to be readable and discoverable:
Get requests to non-leaf nodes typically return a `route-options` JSON object which gives additional possible paths
within the API. For instance, a GET request send to the path `/vui` will return:

.. code-block:: json
.. code-block:: javascript
{
"route_options": {
Expand Down
10 changes: 6 additions & 4 deletions docs/source/platform-endpoints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ through the following links:
All endpoints in this tree require authorization using a JWT bearer
token provided by the ``POST /authenticate`` or ``PUT /authenticate``
endpoints.

--------------------------------------------------------------------------------

GET /platforms
Expand All @@ -51,7 +52,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"route_options": {
Expand All @@ -64,13 +65,14 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
}
* **With invalid BEARER token:** ``401 Unauthorized``

---------------------------------------------------------------------------------------------------------------------

GET /platforms/:platform
Expand Down Expand Up @@ -98,7 +100,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"route_options": {
Expand All @@ -111,7 +113,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down
8 changes: 4 additions & 4 deletions docs/source/platforms/agent-endpoints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"route_options": {
Expand All @@ -63,7 +63,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down Expand Up @@ -91,7 +91,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"route_options": {
Expand All @@ -104,7 +104,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down
18 changes: 9 additions & 9 deletions docs/source/platforms/agents/config-endpoints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Response
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"route_options": {
Expand All @@ -43,7 +43,7 @@ Response
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand All @@ -54,7 +54,7 @@ Response
--------------------------------------------------------------------------------------------------

POST /platforms/:platform/agents/:vip_identity/configs/
=======================================================
========================================================

Save a new configuration file to the config store.

Expand Down Expand Up @@ -86,7 +86,7 @@ Response
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand All @@ -97,7 +97,7 @@ Response
-----------------------------------------------------------------------------------------

DELETE /platforms/:platform/agents/:vip_identity/configs/
=====================================================================
==========================================================

Remove the configuration store for an agent. This endpoint will return ``409 Conflict`` if
the store for this agent is not empty. To remove all existing configurations for an agent from the config store
Expand All @@ -119,7 +119,7 @@ Response
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down Expand Up @@ -155,7 +155,7 @@ Response
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down Expand Up @@ -190,7 +190,7 @@ Response
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down Expand Up @@ -219,7 +219,7 @@ Response
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down
8 changes: 4 additions & 4 deletions docs/source/platforms/agents/enabled-endpoints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Response:
- Content Type: application/json
- Body:

.. code-block:: json
.. code-block:: javascript
{
"status": true|false,
Expand All @@ -41,7 +41,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down Expand Up @@ -75,7 +75,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down Expand Up @@ -105,7 +105,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down
4 changes: 2 additions & 2 deletions docs/source/platforms/agents/health-endpoints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Response:
- Content Type: application/json
- Body:

.. code-block:: json
.. code-block:: javascript
{
"status": "<status_message>",
Expand All @@ -41,7 +41,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down
12 changes: 6 additions & 6 deletions docs/source/platforms/agents/rpc-endpoints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"route_options": {
Expand All @@ -46,7 +46,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down Expand Up @@ -81,7 +81,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"params": {
Expand All @@ -106,7 +106,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand All @@ -132,7 +132,7 @@ Request:
* Authorization: ``BEARER <jwt_access_token>``
* Body:

.. code-block:: JSON
.. code-block:: javascript
{
"<param_name>": "<value>",
Expand All @@ -150,7 +150,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down
9 changes: 5 additions & 4 deletions docs/source/platforms/agents/running-endpoints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,17 @@ Response:
- Content Type: application/json
- Body:

.. code-block:: json
.. code-block:: javascript
{
"status": true|false
}
* **With valid BEARER token on failure:** ``400 Bad Request``
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down Expand Up @@ -73,7 +74,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down Expand Up @@ -103,7 +104,7 @@ Response:
- Content Type: ``application/json``
- Body:

.. code-block:: JSON
.. code-block:: javascript
{
"error": "<Error Message>"
Expand Down
Loading

0 comments on commit 0cf49c3

Please sign in to comment.