rest-api: document '/upload/image' route usage

Change-Id: I4ed9e67bf19646da4b418a3e002a4c17a4e0bd3e
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
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 @@
    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.