Fetch options for SQL restore
Select
SaaS
Customer Managed
This operation fetches information needed to perform a SQL database restore
- application/json
Request Body
- restoreType integer required
Default value:
2
Internal field
- restoreDbType integer required
Internal field
- sourceInstanceId integer required
ID of the instance where database is present
selectedDatabases object[]
Responses
- 200
- 400
- 401
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
sqlDbdeviceItem object[]
sqlDestinationInstances object[]
error object
{
"sqlDbdeviceItem": [
{
"fileName": "string",
"logicalFileName": "string",
"fileMaxSize": 0,
"id": 0,
"sqlDBInfo": {
"databaseName": "string",
"databaseId": 0
}
}
],
"sqlDestinationInstances": [
{
"serverType": "string",
"genericEntity": {
"clientId": 0,
"instanceName": "string",
"osType": "string",
"clientName": "string",
"instanceId": 0,
"_type_": 0
}
}
],
"error": {
"errorMessage": "string",
"errorCode": 0
}
}
{
"sqlDbdeviceItem": [
{
"fileName": "C:\\Program Files\\Microsoft SQL Server\\MSSQL13.INSTANCE1\\MSSQL\\DATA\\dummyDB1.mdf",
"logicalFileName": "dummyDB1",
"fileMaxSize": 8388608,
"id": 0,
"sqlDBInfo": {
"databaseName": "dummyDB1",
"databaseId": 18
}
},
{
"fileName": "C:\\Program Files\\Microsoft SQL Server\\MSSQL13.INSTANCE1\\MSSQL\\DATA\\dummyDB1_log.ldf",
"logicalFileName": "dummyDB1_log",
"fileMaxSize": 8388608,
"id": 0,
"sqlDBInfo": {
"databaseName": "dummyDB1",
"databaseId": 18
}
},
{
"fileName": "C:\\Program Files\\Microsoft SQL Server\\MSSQL13.INSTANCE1\\MSSQL\\DATA\\dummyDB2.mdf",
"logicalFileName": "dummyDB2",
"fileMaxSize": 8388608,
"id": 0,
"sqlDBInfo": {
"databaseName": "dummyDB2",
"databaseId": 21
}
},
{
"fileName": "C:\\Program Files\\Microsoft SQL Server\\MSSQL13.INSTANCE1\\MSSQL\\DATA\\dummyDB2_log.ldf",
"logicalFileName": "dummyDB2_log",
"fileMaxSize": 8388608,
"id": 0,
"sqlDBInfo": {
"databaseName": "dummyDB2",
"databaseId": 21
}
}
],
"sqlDestinationInstances": [
{
"serverType": "",
"genericEntity": {
"clientId": 6,
"instanceName": "",
"osType": "Windows",
"clientName": "mando-sql1",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 77,
"instanceName": "",
"osType": "Windows",
"clientName": "sebthomasvm4",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 78,
"instanceName": "",
"osType": "Windows",
"clientName": "sebthomasvm5",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 158,
"instanceName": "",
"osType": "Windows",
"clientName": "sanjay-appaw3",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 160,
"instanceName": "",
"osType": "Windows",
"clientName": "mando-cntrlr",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 226,
"instanceName": "",
"osType": "Unix",
"clientName": "rango2",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 230,
"instanceName": "",
"osType": "Windows",
"clientName": "mando-Atmn-AppAW",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 234,
"instanceName": "",
"osType": "Unix",
"clientName": "rango",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 235,
"instanceName": "",
"osType": "Windows",
"clientName": "mando-sql2",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 241,
"instanceName": "",
"osType": "Windows",
"clientName": "sql-ag2",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 242,
"instanceName": "",
"osType": "Windows",
"clientName": "sql-ag1",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 245,
"instanceName": "",
"osType": "Windows",
"clientName": "mandocs_002",
"instanceId": 0,
"_type_": 0
}
},
{
"serverType": "",
"genericEntity": {
"clientId": 247,
"instanceName": "",
"osType": "Unix",
"clientName": "minnal_2",
"instanceId": 0,
"_type_": 0
}
}
],
"error": {
"errorMessage": "success",
"errorCode": 0
}
}
Bad Request
- application/json
- Schema
- Example 1
Schema
- string
Request body is empty or format is invalid.
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
- errorMessage string
Default value:
Access denied
- errorCode integer
Default value:
5
{
"errorMessage": "Access denied",
"errorCode": 5
}
{
"errorMessage": "Access denied",
"errorCode": 5
}
POST /sql/restoreoptions
Authorization
type: apiKeyname: Authtokenin: header
Request
Request
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/SQL/RestoreOptions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"restoreType": 2,
"restoreDbType": 0,
"sourceInstanceId": 0,
"selectedDatabases": [
{
"databaseName": "string"
}
]
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/SQL/RestoreOptions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"restoreType": 2,
"restoreDbType": 0,
"sourceInstanceId": 0,
"selectedDatabases": [
{
"databaseName": "string"
}
]
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/SQL/RestoreOptions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"restoreType": 2,
"restoreDbType": 0,
"sourceInstanceId": 0,
"selectedDatabases": [
{
"databaseName": "string"
}
]
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/SQL/RestoreOptions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"restoreType": 2,
"restoreDbType": 0,
"sourceInstanceId": 0,
"selectedDatabases": [
{
"databaseName": "string"
}
]
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/SQL/RestoreOptions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"restoreType": 2,
"restoreDbType": 0,
"sourceInstanceId": 0,
"selectedDatabases": [
{
"databaseName": "string"
}
]
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/SQL/RestoreOptions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"restoreType": 2,
"restoreDbType": 0,
"sourceInstanceId": 0,
"selectedDatabases": [
{
"databaseName": "string"
}
]
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/SQL/RestoreOptions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"restoreType": 2,
"restoreDbType": 0,
"sourceInstanceId": 0,
"selectedDatabases": [
{
"databaseName": "string"
}
]
}'