BackupSvrDataApplyBlockTimer
Apply for Blocking Data Backup (Based on Process)
Request address
POST
http://OmsAddress/app/newoms.php/webservice/business/backup-svr-data/apply-block-timer?cmd=10016&ip-type=webservicerest&access-token=AccessTokenVal
POST request parameter description
| Parameter name | Data type | Description | Whether the field is required | Remarks |
|---|---|---|---|---|
| set_id | integer | set id of the backup process | Yes | |
| app_id | integer | app id of the backup process | Yes | |
| svr_ids | Array | id list of the backup process, such as ['126.2.2.3', '126.2.2.5']. When svr = 0, it indicates that the backup of all svrs under the app_id will be blocked | Yes |
Data Parameters
Use json format to represent the record related information. The following is an example:
{
"set_id": 126,
"app_id": 2,
"svr_ids": [
"126.2.2.3"
]
}
Return Syntax
Return Parameter Description
When the returned status code is not 200, it indicates failure. The returned data is the message about the failure to construct table data
When the returned status code is 200, it indicates that the table data structure was created successfully. The returned data structure is as follows:
| Field name | Data type | Description | Remarks |
|---|---|---|---|
| ret | integer | 0, fixed value | |
| msg | string | return description of the interface | |
| id | integer | id of the application form for backup, which will be used in approving the timer backup blocking application |
Request Example
Send A Request through the Curl Method
For the parameters in the command, please refer to the "Description of POST Request Parameters" on this page. For the method to obtain access-token, see: Get access-token
curl -H "Content-type: application/json" -X "POST" -d '{
"set_id": 126,
"app_id": 2,
"svr_ids": [
"126.2.2.3"
]
}' http://omsaddress/app/newoms.php/webservice/business/backup-svr-data/apply-block-timer?cmd=10016&ip-type=webservicerest&access-token=\
Return Example
Successful Return Example
Status of http request = 200
{
"ret": 0,
"msg": "success to apply backup svr table",
"id": 7
}
Failed Return Example
Status of http request != 200
{
"name": "Unauthorized",
"message": "You are requesting with an invalid credential.",
"code": 0,
"status": 401,
"type": "yii\\web UnauthorizedHttpException"
}
{
"conflict_apply": [
"those svr_id conflict with other data-back-up apply. apply_id is [\"2\"]. please check them first."
]
}