Getting information about log backups for SQL Servers¶
You can get information about log backups for SQL Servers. This action is available only in the REST API.
Method and URI¶
To get information about log backups for SQL Servers, use a GET method and a URI:
GET https://{hostname|IPv4}/api/application/sql/logbackupstatus
Parameters¶
None.
Data¶
None.
Example: Get information about log backups for SQL Servers¶
Assume that you registered SQL Servers with IBM Spectrum Protect Plus and ran log backup jobs.
A Python snippet that is similar to the following example can be used to request information about the log backup status for each database:
requests.get('https://' + spp_ipv4 + '/api/application/sql/logbackupstatus',
headers={...}, verify=...)
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
{
"total": 4,
"results": [{
"links": {...},
"databaseName": "Sales_Americas",
"databasePk": "28b50719ebbcf817b927ac42df35e334",
"instanceName": "SQL-DALLAS1",
"instancePk": "3bb74f48d",
"status": "completed",
"appType": "sql",
"pk": "9141b6b3ccbee029b5817eff7190b1b1",
"name": "SQL-DALLAS1Sales_Americas",
"time": 1563289224690,
"appMetadata": {
"startTransactionId": "32000000021200001",
"endTransactionId": "32000000025900001"
},
{
...,
"databaseName": "Support_Americas",
...,
"instanceName": "SQL-DALLAS1",
...
},
{
...,
"databaseName": "Sales_Apac",
...,
"instanceName": "SQL-SINGAPORE1",
...
},
{...},
}
]
}