Restore a snapshot in an Analytics instance
/api/20210901/system/actions/restoreSnapshot
Request
There are no request parameters for this operation.
- application/json
object
-
snapshot: object
SnapshotRestore
Properties to restore a snapshot using a snapshot resource.
object
-
id(required): string
Id of the snapshot.
-
password(required): string
Password of the snapshot.
Response
202 Response
400 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
404 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
Examples
In this example, you restore a
snapshot with the ID ac6fdab7-9c16-4d22-a56f-cb7b5d15505a
in your Oracle
Analytics instance.
Use Get all snapshots to find the ID of the snapshot you want to restore. If the snapshot you want isn't yet registered with your Analytics instance, you need to do that first (see Create a snapshot).
cURL Example:
First, create a JSON file that contains the ID of the snapshot you want to restore and the
password required to access the snapshot. For example, create a JSON file called
restore_mysnapshot.json
that looks like this:
{ "snapshot": { "id" : "ac6fdab7-9c16-4d22-a56f-cb7b5d15505a", "password" : "snapshotPassword123" } }
Then run this cURL command to restore the snapshot in your Oracle Analytics instance:
curl -i \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --request POST 'https://<hostname>/api/20210901/system/actions/restoreSnapshot' \ -d @restore_mysnapshot.json
Example of Request Body
{ "snapshot": { "id": "ac6fdab7-9c16-4d22-a56f-cb7b5d15505a", "password": "snapshotPassword123" } }
Example of Response Header
Make a note of the oa-work-request-id
in the response header. You can use
this value to track the status of your operation.
oa-work-request-id: lfc-c2:152-cd:607
Example of Response Body
Alternatively, make a note of the workRequestId
in the response body. You
can use this value to track the status of your operation.
{ "workRequestId": "lfc-c2:152-cd:607" }