As of Oracle ILOM firmware version 5.0, the Oracle ILOM REST API supports the ability to upload data to Oracle ILOM from a client-local location, as well as download data from Oracle ILOM to a client-local location. For more details, see:
Use a POST request to upload REST API data to Oracle ILOM from a local client.
HTTP Request Format
POST /rest/v<version>/<content_resource_path> HTTP/1.1 Content-Type: multipart/form-data
Where:
<content_resource_path> specifies the resource path of the content to be uploaded that ends in /content. For example, to upload a banner message that appears when connecting to Oracle ILOM, the content resource path would look like this: /rest/v1/SP/preferences/banner/connect/content
Request Header Fields Required
The required request header fields are as follows: Authorization, Content-Type, and Host.
For a description of these required header fields, see Common Request Header Fields.
cURL Request Example: Upload Content for Connect Banner
Using cURL, a POST request to upload content to the connect banner resource would look like this:
curl -v -k -u "root:changeme" --request POST -F "datafile=@/home/xyz/banner.txt" https://<IP address>:443/rest/v1/SP/preferences/banner/connect/content
Use a GET request to download REST API data from Oracle ILOM to a local client.
HTTP Request Format
GET /rest/v<version>/SP/<content_resource_path> HTTP/1.1 Accept: <media type>
Where:
<content_resource_path> specifies the resource path of the content to be downloaded. For example, to download the banner message that appears when connecting to Oracle ILOM, the content resource path would look like this: /rest/v1/SP/preferences/banner/connect/content
<media type> represents the media type that is associated with the resource content to be downloaded. For a list of download 'content' resources and their associated media types, see the following table.
|
Request Header Fields Required:
The required request header fields are as follows: Authorization, Accept, and Host.
For a description of these required header fields, see Common Request Header Fields.
Response: Status Codes
Success: HTTP Status = 200 OK, <media type> response body
Failure: HTTP Status = 4xx, 5xx, JSON formatted error response body
cURL Request Example
Using cURL, a request to download the connect banner to a binary file (sp_config.xml) would look like this:
curl -k -v -u "root:changeme" -H "Accept:text/xml" https://<IPaddress>:443/rest/v1/SP/config/content -o sp_config.xml