diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2018-03-16 14:03:57 -0500 |
---|---|---|
committer | Gunnar Mills <gmills@us.ibm.com> | 2018-04-11 13:37:12 +0000 |
commit | 9e99e773efb22e946edd5c7127735ce11e3e4ce8 (patch) | |
tree | 74f8dc82ff82ef5ce67591426678a93429bdd5c9 | |
parent | f62262b3fc6ff552b649a7fcf3825d4830ecbedb (diff) | |
download | openbmc-docs-9e99e773efb22e946edd5c7127735ce11e3e4ce8.tar.gz openbmc-docs-9e99e773efb22e946edd5c7127735ce11e3e4ce8.zip |
rest-api.md: Add upload return codes
With change https://gerrit.openbmc-project.xyz/#/c/9594/
the upload method now returns the version id
of the uploaded file or error. Update the documentation with the
possible return information.
Change-Id: I76429bac378b58fd08e4fe5030b89e57f743fb1a
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
-rw-r--r-- | rest-api.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/rest-api.md b/rest-api.md index 6d22f13..01dd268 100644 --- a/rest-api.md +++ b/rest-api.md @@ -254,6 +254,25 @@ It is possible for the user to choose the uploaded file's remote name: In above example, the file foo will be saved with the name bar on the BMC. +The operation will either return the version id (hash) of the uploaded file +on success: + + { + "data": "ffdaab9b", + "message": "200 OK", + "status": "ok" + } + +or an error message: + + { + "data": { + "description": "Version already exists or failed to be extracted" + }, + "message": "400 Bad Request", + "status": "error" + } + ## Event subscription protocol It is possible to subscribe to events, of interest, occurring on the BMC. The implementation on the BMC uses WebSockets for this purpose, so that clients |