Dayalan Punniyamoorthy Blog

Saturday, April 2, 2022

List Backups via REST API for PBCS/EPBCS applications

The new REST API features enabled on April 22 are so cool, you can now access all the backups created by Oracle on your own without the need to raise an SR with Oracle support. I am referring to the Artifact Snapshot taken by Oracle when there is a change to the instance.


From the Oracle Documentation,

List Backups - Only for OCI (Gen 2) Environments

In OCI (Gen 2) environments, you can list available backup snapshots archived by Oracle in the Oracle Object Storage Cloud.

You can then restore available backup snapshots (copy them to the environment), To restore backup snapshots in OCI (Gen 2) environments, see Restore Backup. After copying the backup, you can archive it or use it to restore the current environment by yourself. After copying the backup, you can archive it or use it to restore the current environment by yourself. With the List Backups and Restore Backup APIs, you no longer have to create a service request to request a backup from an OCI environment.

This API is version v2.

REST Resource

GET /interop/rest/v2/backups/list

If you notice its a new version/resorce view. Lets see that in action. The following screen shot from Postman using the GET Method.

Specified the User name and Password, remember since my pod is OCI (Gen 2) I am not specifying the domain before my user name. Also, this new feature will work only for OCI Gen 2 instances. 

And the responses is shown below, It does list all the avialale backups as on that time and date taken by Oracle. Its so cool ✌. And icing on the top is you can access it on a click of a button. Way to go Oracle. In the next one i will show how you can invoke these snapshots and backup your instance using REST API.


No comments:

Post a Comment