The BaaS functionality supports various APIs on VantageCloud Enterprise. The following are the supported operations for various types of jobs.
| HTTP | URL | Parameters | Description | Success Response Code |
|---|---|---|---|---|
| GET | https://<api-path>/data-protection/v2/sites/{site-id}/jobs/{job-id}/executions/{execution-id}/restores/{restore-id} | Required parameters
|
Get restore job by restore execution ID. | 200 |
| GET | https://<api-path>/data-protection/v2/sites/{site-id}/restores | Required parameters
|
Get all restore executions for a site. |
200 |
| POST | https://<api-path>/data-protection/v2/sites/{site-id}/restore-permissions | Required parameters
|
Check if user has permissions to restore. | 200 |
| GET | https://<api-path>/data- protection/v2/sites/{site-id}/databases | Required parameters
|
Lists all databases for a site. | 200 |
| GET | https://<api-path>/data-protection/v2/sites/{site-id}/jobs/{job-id}/executions | Required parameters
|
Gets all restores corresponding to a backup execution ID. | 200 |
| POST | https://<api-path>/data-protection/v2/sites/{site-id}/jobs/{job-id}/executions/{execution-id}/restores | Required parameters
|
Create and run restore job for a site. | 202 |
The sample codes for various APIs are as follows:
Sample API Request Payload to Create a Normal Restore Job
{
"name": "<restore-job-name>",
// target_site will be same as source site in case of same site restore
"target_site": "<site-id>",
"job_settings": {
// objects is a list of job-objects selected using Get job execution objects API
"objects": [
{
"object_name": "ADW",
"object_type": "DATABASE",
"parent_name": "DBC",
"parent_type": "DATABASE",
"exclude_objects": [
],
"include_all": true
}
],
"continue_job_on_access_right_violation": false,
"run_as_a_copy_job": false,
"skip_statstics": false,
"skip_join_or_hash_indexes": false
}
}
Sample API Request Payload to Restore the Job with Renaming the Objects
{
"name": "test_restore_job_rename_to",
"target_site": "<site-id>",
"job_settings": {
"objects": [
{
"object_name": "glm_bank_marketing_model",
"object_type": "TABLE",
"parent_name": "BANK_MARKETING",
"parent_type": "DATABASE",
"exclude_objects": [],
"include_all": true,
"rename_to": "glm_bank_marketing_model_renamed"
}
],
"continue_job_on_access_right_violation": false,
"run_as_a_copy_job": true,
"skip_statstics": false,
"skip_join_or_hash_indexes": false
}
}
Sample API Request Payload to Restore Jobs to a Different Database
{
"name": "test_restore_from_api_map_to",
"target_site": "TDICGC73149PP88",
"job_settings": {
"objects": [
{
"object_name": "glm_bank_marketing_model",
"object_type": "TABLE",
"parent_name": "BANK_MARKETING",
"parent_type": "DATABASE",
"exclude_objects": [],
"include_all": true
}
],
"continue_job_on_access_right_violation": false,
"run_as_a_copy_job": true,
"skip_statstics": false,
"skip_join_or_hash_indexes": false,
"restore_to_a_different_database_on_target_site": "BANKING"
}
}
Sample API Response Payload to get Restore Job
{
"restore_job_name": "string",
"restore_job_id": 0,
"restore_execution_id": 0,
"status": "COMPLETED_SUCCESSFULLY",
"status_details": "string",
"start_time": "2019-08-24T14:15:22Z",
"end_time": "2019-08-24T14:15:22Z",
"errors": [
"string"
],
"warnings": [
"string"
],
"restored_objects_status": [
"string"
],
"restore_execution_sub_tasks": [
{
"sub_task_name": "string",
"status": "string",
"status_details": "string",
"start_time": "2019-08-24T14:15:22Z",
"end_time": "2019-08-24T14:15:22Z",
"restore_size": 0
}
],
"dr_site_id": "string",
"snapshot_name": "string",
"snapshot_size": "string",
"source_site_id": "string",
"target_site": "string",
"is_failover": false
}
Sample API Response Payload to List all Restore Jobs
[
{
"restore_job_name": "string",
"restore_job_id": 0,
"restore_execution_id": 0,
"status": "COMPLETED_SUCCESSFULLY",
"status_details": "string",
"start_time": "2019-08-24T14:15:22Z",
"end_time": "2019-08-24T14:15:22Z",
"errors": [
"string"
],
"warnings": [
"string"
],
"restored_objects_status": [
"string"
],
"restore_execution_sub_tasks": [
{
"sub_task_name": "string",
"status": "string",
"status_details": "string",
"start_time": "2019-08-24T14:15:22Z",
"end_time": "2019-08-24T14:15:22Z",
"restore_size": 0
}
],
"dr_site_id": "string",
"snapshot_name": "string",
"snapshot_size": "string",
"source_site_id": "string",
"target_site": "string",
"is_failover": false
}
]
Sample API Response Payload to List Databases in a Site
[
{
"name": "string",
"dbKind": "D"
}
]
Sample API Response Payload to list Restores for Backup Execution ID
[
{
"restore_job_name": "string",
"restore_job_id": 0,
"restore_execution_id": 0,
"status": "COMPLETED_SUCCESSFULLY",
"status_details": "string",
"start_time": "2019-08-24T14:15:22Z",
"end_time": "2019-08-24T14:15:22Z",
"errors": [
"string"
],
"warnings": [
"string"
],
"restored_objects_status": [
"string"
],
"restore_execution_sub_tasks": [
{
"sub_task_name": "string",
"status": "string",
"status_details": "string",
"start_time": "2019-08-24T14:15:22Z",
"end_time": "2019-08-24T14:15:22Z",
"restore_size": 0
}
],
"dr_site_id": "string",
"snapshot_name": "string",
"snapshot_size": "string",
"source_site_id": "string",
"target_site": "string",
"is_failover": false
}
]
Sample API Response Header for Status 202 (Accepted) to Create and Run a Restore Job
x-resource-id: Restore ID of the job.