Uploading a File
Function
This interface is used to upload a file through the Redfish interface. After the file is successfully uploaded, it is stored in the /tmp/web directory.
Syntax
Operation type: POST
URL: https://device_ip/redfish/v1/UpdateService/FirmwareInventory
Request header:
X-Auth-Token: auth_value
Request message form format:
Content-Disposition: form-data; name="imgfile"; filename=imgfile
Content-Disposition: form-data; name="size" size
Parameters
Parameter |
Description |
Value |
---|---|---|
device_ip |
IP address for logging in to a device. |
An IPv4 or IPv6 address |
auth_value |
Authentication parameter contained in the request. |
You can obtain the value from the session created by using /redfish/v1/SessionService/Sessions. |
imgfile |
Name of the file to be uploaded. |
A file name. It contains a maximum of 255 characters. Supported file types:
|
size |
Size of the file to be uploaded. |
The maximum size is 512 MB. |
Usage Guidelines
None
Example
Request:
POST https://10.10.10.10/redfish/v1/UpdateService/FirmwareInventory
Request header:
X-Auth-Token: 6599174c38c36838737d9749179e1ee1
Request message body:
Content-Disposition: form-data; name="imgfile"; filename="Atlas500-firmware0710.hpm"
Content-Disposition: form-data; name=size
Response:
{"status": 202,
"message": "Upload [WebUIService.tar.gz] file successfully "}
Response code: 202
Output Description
Attribute |
Type |
Description |
---|---|---|
status |
Character string |
Response code. |
Message |
Character string |
Details. |