Restore a database backup
Learn how to use the IS Deployments API to restore a database backup on a planet.
All the sample requests in this guide include the following path parameters:
Parameter name | Description |
---|---|
tenantId | Your tenant ID. |
projectId | ID of a star system (physical star system). |
planetId | ID of a planet on which you restore a database backup. |
branchId | ID of a branch from which you deploy an InsuranceSuite application. |
Get a database backup ID
Use Database API to retrieve a database backup ID.
Get a list of branches
To list all the branches for a star system (physical star system), send the following GET
request:
curl -X 'GET' \
'{baseURL}/api/v1/tenants/{tenantId}/starsystems/{projectId}/planets/{planetId}/is/builds/branches' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'
Get a list of builds
To get a list of builds available for a particular branch, send the following GET
request:
curl -X 'GET' \
'{baseURL}/api/v1/tenants/{tenantId}/starsystems/{projectId}/planets/{planetId}/is/builds?branch=${branchId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
A response contains a JSON object with a list of available builds for the specified branch.
[
{
"id": "cm/6",
"application": "cm",
...
},
{
"id": "cc/1",
"application": "cc",
...
},
{
"id": "pc/4",
"application": "pc",
...
}
]
Restore a database backup
Restoration of a backup includes deployment of all the InsuranceSuite applications on a planet. To restore a database backup and deploy all the InsuranceSuite applications on a planet, send the following POST
request:
curl -X 'POST' \
'{baseURL}POST /api/v1/tenants/{tenantId}/starsystems/{projectId}/planets/{planetId}/restoreDb' \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{body}'
Where {body}
contains the details of a database backup and an array of objects that represent InsuranceSuite applications to deploy. For example, to restore a database backup on a planet with ClaimCenter, ContactManager, and PolicyCenter, use:
{
"backupId": "123",
"forcedServerMode": "string",
"retainedTableGroups": ["scriptparameter", "runtimeproperty"],
"applications": [
{
"application": "cc",
"buildId": "cc/23/39",
"environmentVariables": [{ "name": "test", "value": "test_value" }]
},
{
"application": "cm",
"buildId": "cm/12/279",
"environmentVariables": []
},
{
"application": "pc",
"buildId": "pc/6/7",
"environmentVariables": []
}
]
}
You must deploy all the applications or the operation will fail. For example, if
a star system (physical star system) includes PolicyCenter, ContactManager, and
ClaimCenter, the applications
array must contain three objects, one per each
application.
Check the restoration and deployment status
To check if the restoration of a database and the deployment of InsuranceSuite applications are completed, send the following GET
request:
curl -X 'GET' \
'{baseURL}/api/v1/tenants/{tenantId}/starsystems/{projectId}/planets/{planetId}/status' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
The restoration and deployment are completed when the value of phase
is DEPLOYED
. If the deployment fails, you can try to restore the database backup and deploy the applications with different builds.
{
"phase": "DEPLOYED",
"environmentId": "test",
"deploymentId": "x000xx00-x000-0xxx-0x0x-000xxx0x0x0x",
"activityName": "DeployJob",
"operationInProgress": false,
"phaseDetails": "Deployed",
"applications": [
{
...
}
]
}