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.
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.
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
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