diff options
author | John Estabrook <jestabro@vyos.io> | 2020-06-07 12:14:44 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2020-06-07 12:36:22 -0500 |
commit | c7f0e0b9e5fd5c44f8589380c7c4b6614ed000a1 (patch) | |
tree | 2235ca4ca969244d4982423c708f86159b35bcc1 /docs/appendix | |
parent | 39f18a3b6e413515f57387d3d286b3c9a8eee6e2 (diff) | |
download | vyos-documentation-c7f0e0b9e5fd5c44f8589380c7c4b6614ed000a1.tar.gz vyos-documentation-c7f0e0b9e5fd5c44f8589380c7c4b6614ed000a1.zip |
http api: add section on image management
Diffstat (limited to 'docs/appendix')
-rw-r--r-- | docs/appendix/http-api.rst | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/docs/appendix/http-api.rst b/docs/appendix/http-api.rst index 86d8b394..49f2dbd9 100644 --- a/docs/appendix/http-api.rst +++ b/docs/appendix/http-api.rst @@ -99,8 +99,30 @@ If you don't specify the file when saving, it saves to ``/config/config.boot``. # curl -k -X POST -F key=MY-HTTP-API-PLAINTEXT-KEY -Fdata='{"op": "save", "file": "/config/config.boot"}' https://192.168.122.127/config-file +Image management requests +------------------------- + +One may ``add`` or ``delete`` a system image using the endpoint ``/image``. Here are the respective examples: + +``add`` from ``url``. Here we use the URL of the latest rolling release: + +.. code-block:: none + + # curl -k -X POST -F data='{"op": "add", "url": "https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso"}' -F key=MY-HTTP-API-PLAINTEXT-KEY https://192.168.122.127/image + +``delete`` by image ``name``. For example: + +.. code-block:: none + + # curl -k -X POST -F data='{"op": "delete", "name": "1.3-rolling-202006070117"}' -F key=MY-HTTP-API-PLAINTEXT-KEY https://192.168.122.127/image + +To list the available system images by name, one may use the operational mode request ``show`` discussed in the next section; in this setting it would be: + +.. code-block:: none + + # curl -k -X POST -F data='{"op": "show", "path": ["system", "image"]}' -F key=MY-HTTP-API-PLAINTEXT-KEY https://192.168.122.127/show -Operational mode commands +Operational mode requests ------------------------- It is possible to run ``show`` and ``generate`` commands: |