Downloading Snapshot Data
The Oracle REST API, as of firmware version 5.0, supports the ability to use a POST
request to download snapshot data from the /SP/diag/snapshot/content
resource.
Note:
A POST request is necessary rather than a GET request as certain request data is required to complete the download operation of the snapshot data.HTTP Request Format:
POST /rest/v<version>/SP/diag/snapshot/content HTTP/1.1 <Header Name>: <value> Request body: { "dataset": "<dataset_value>", "encryption_passphrase": "<passphrase>" }
Where:
-
"dataset":
is mandatory and"<dataset_value>" can be one of "normal","normal-logonly", "fruid", "fruid-logonly", "full", "full-logonly".
-
"encryption_passphrase":
"passphrase" is optional and is only required when the snapshot contents must be encrypted.
Request Headers Required:
The request header fields required to modify resources are as follows:
Content-Type
, Accept
,
Authorization
, and Host
.
Note:
The requestAccept
header must specify
application/octet-stream
as the target media type. The
Content-Type
request header must specify
application/json
as the target media type.
For a description of these required header fields, see Common Request Header Fields.
Response: Status Codes
-
Success: HTTP Status = 200 OK,
application/
POST -
Failure: HTTP Status = 4xx, 5xx, JSON formatted error response body
-
Note:
The response media types are specified in the Swagger model.
cURL Example
Using cURL, a request to extract the snapshot data to a data (non-text) file
(snapshot.dat
) would look like this:
curl --request POST -H "Content-Type:application/json" --data '{"encryption_passphrase":"foobar","dataset":"full"}' -u "root:changeme" -k -v https://<IP address>:443/rest/v1/SP/diag/snapshot/content -o snapshot.dat
Related Information