API Introduction
Call the DescribeBackupPolicy API to query the backup policy of MongoDB instance.
API Restrictions
None
URI
GET /v1/openApi/describeBackupPolicy
Path Parameter
None
Query Parameter
Parameter | Required or Not | Parameter Type | Description | Example |
prodInstId | *Required | String | External instance ID of the document database | a649077e15f349cb8b4cde6f7285a568 |
Request Parameters
Request Header Parameter
None
Response Parameter
Parameter | Required or Not | Parameter Type | Description | Lower-level Object | |
statusCode | Yes | Integer | Response Code Value range: 800 indicates success, 900 indicates failure | 800 | |
message | Yes | String | Response information | The XXX information is queried successfully | |
returnObj | Yes | Object | Return object. | returnObj |
Table returnObj
Parameter | Required or Not | Parameter Type | Description | Example | Lower-level Object |
sshPort | Yes | String | Machine login port | 8888 | |
storePassword | Yes | String | Machine login password | 123456 | |
backupOperation | Yes | Integer | Whether to enable automatic backup | 1 | |
nextbackuptime | Yes | String | Next backup time | 10/10/2022 12:00:00 AM | |
backupunittime | Yes | Integer | The time interval between every two backups, in seconds | 1 | |
userId | Yes | Integer | User id | 149 | |
backupinterval | Yes | Integer | Total number of backups in a single cycle, discarded field | 1 | |
storePath | Yes | String | The directory where the backup data is stored | /data/mongodb/test | |
autoremove | Yes | Integer | Delete policy for backup files, indicating how many recent files to keep | 1 | |
firstbackuptime | Yes | String | The time when the backup first started, discarded field | ||
storeUser | Yes | String | Machine login user | root | |
storeIp | Yes | String | The machine where the backup data is stored | 172.27.176.109 | |
prodInstId | Yes | String | Instance ID. | c46d8f547cc648a78a68270092e70f80 |
Sample Request
Request Header
None
Request parameter query
/v1/openApi/describeBackupPolicy?prodInstId=a649077e15f349cb8b4cde6f7285a568
Response Example
{
"statusCode": 800,
"message": "the backup policy of the MongoDB instance is queried successfully",
"returnObj": {
"sshPort": "22",
"storePassword": "",
"backupOperation": 0,
"nextbackuptime": 1659061641000,
"backupunittime": 43200,
"userId": 149,
"backupinterval": 0,
"storePath": "/data/apps",
"autoremove": 1,
"firstbackuptime": 1658975284000,
"storeUser": "root",
"storeIp": "172.27.176.109",
"prodInstId": "c46d8f547cc648a78a68270092e70f80"
}
}Status Code
Status Code | Description |
800 | Indicate that the request succeeded |
900 | Indicates that the request failed |
Error Codes
None