diff options
| author | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-04-11 10:01:57 -0500 |
|---|---|---|
| committer | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-04-21 13:36:20 -0500 |
| commit | 0772bd824bb7477ab65e7c6343d624c5f59d8109 (patch) | |
| tree | 8b730d5856779d01a102a5886420b9d05d9c346d | |
| parent | e07969f65775825b038f5089f233098bbea3a72b (diff) | |
| download | openbmc-docs-0772bd824bb7477ab65e7c6343d624c5f59d8109.tar.gz openbmc-docs-0772bd824bb7477ab65e7c6343d624c5f59d8109.zip | |
rest-api: document '/upload/image' route usage
Change-Id: I4ed9e67bf19646da4b418a3e002a4c17a4e0bd3e
Signed-off-by: Deepak Kodihalli <dkodihal@in.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 4fe2e02..90e5aaf 100644 --- a/rest-api.md +++ b/rest-api.md @@ -186,3 +186,22 @@ For example, to delete the event record with ID 0: curl -b cjar -k -X DELETE \ https://bmc/org/openbmc/events/record/0 + +## Uploading images +It is possible to upload software upgrade images (for example to upgrade the BMC +or host software) via REST. The content-type should be set to +"application/octet-stream". + +For example, to upload an image: + + curl -c cjar -b cjar -k -H "Content-Type: application/octet-stream" \ + -X POST -T <file_to_upload> https://bmc/upload/image + +In above example, the filename on the BMC will be chosen by the REST server. + +It is possible for the user to choose the uploaded file's remote name: + + curl -c cjar -b cjar -k -H "Content-Type: application/octet-stream" \ + -X PUT -T foo https://bmc/upload/image/bar + +In above example, the file foo will be saved with the name bar on the BMC. |

