Delete a snapshot

delete

/api/20210901/snapshots/{snapshotId}

Remove a snapshot resource from an Analytics instance. This operation deregisters a snapshot that's currently registered with an Analytics instance. If the deleteStorage parameter is set to true, the delete operation also deletes the snapshot (BAR file) from storage (for example, Oracle Cloud Infrastructure (OCI) storage).

Request

Path Parameters
Query Parameters
  • When set to true, the snapshot is deregistered and the snapshot BAR file is deleted from storage (for example, Oracle Cloud Infrastructure (OCI) storage). When set to false, the BAR file is deregistered but the BAR file remains in storage.
    Default Value: false

There's no request body for this operation.

Back to Top

Response

200 Response

Successful operation.

400 Response

Bad Request (invalid query parameters, malformed headers, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

404 Response

Not Found. The requested resource was not found.
Body ()
Root Schema : Error
Type: object
Show Source
Back to Top

Examples

These examples show you how to delete snapshots associated with an Oracle Analytics instance.

  • Example 1 - Deregister a snapshot
  • Example 2 - Deregister a snapshot and delete from storage

Example 1 Deregister a snapshot

In this example, you deregister a snapshot that's associated with your Oracle Analytics instance. The ID of the snapshot is ac6fdab7-9c16-4d22-a56f-cb7b5d15505a. You can use Get all snapshots to find the snapshot ID.

Note:

By default, the BAR file associated with the snapshot remains available in cloud storage (deleteStorage=false).

cURL Example:

curl -i \
  --header 'Authorization: Bearer <token>' \
  --request DELETE 'https://<hostname>/api/20210901/snapshots/ac6fdab7-9c16-4d22-a56f-cb7b5d15505a'

Example of Request Body

Not applicable.

Example of Response Body

Not applicable.

Example 2 Deregister a snapshot and delete from storage

In this example, you deregister a snapshot that's associated with your Oracle Analytics instance and delete the snapshot from Oracle Cloud Infrastructure Object Storage. The ID of the snapshot is ac6fdab7-9c16-4d22-a56f-cb7b5d15505a. You can use Get all snapshots to find the snapshot ID.

cURL Example:

curl -i \
  --header 'Authorization: Bearer <token>' \
  --request DELETE 'https://<hostname>/api/20210901/snapshots/ac6fdab7-9c16-4d22-a56f-cb7b5d15505a?deleteStorage=true'

Example of Request Body

Not applicable.

Example of Response Body

Not applicable.
Back to Top