TransactionGetFailoverList

Get Svr Failover Transaction List of the Specified App

Request address

POST
http://OmsAddress/app/newoms.php/webservice/oamp/transaction/get-failover-list?cmd=10017&ip-type=webservicerest&access-token=AccessTokenVal

POST request parameter description

Parameter name Data type Description Whether the field is required Remarks
app_id integer Get svr failover transactions under a specified app Yes
zone_id integer Get svr failover transactions under a specified zone 0: indicates all zones. Non-0 integers: indicate the zone_id under a zone No, the default is 0
only_incomplete Integer (0, 1) Whether to get only the list of unfinished (status is not 9,10) tcapsvr failover transaction list. 0: return all svr failover transactions, 1: return svr failover transactions that are not completed at the current time. No, the default is 1

Data Parameters

Use json format to represent the record related information. The following is an example:

{
    "only_incomplete": 0,
    "app_id": 2
}

Return Syntax

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 '{
    "only_incomplete": 0,
    "app_id": 2
}' http://omsaddress/app/newoms.php/webservice/oamp/transaction/get-failover-list?cmd=10017&ip-type=webservicerest&access-token=\

Return Example

Successful Return Example

Status of http request = 200

[
    {
        "Id": 1360,
        "AppId": 2,
        "ZoneId": 0,
        "Type": 128,
        "Status": 10,
        "CanRedo": 0,
        "CanSuspend": 1,
        "CanRollback": 1,
        "Reason": 2,
        "Num": 0,
        "IdName": "m_1",
        "Data": "",
        "Memo": "Failover",
        "CreateUser": "SYSTEM",
        "CreateTime": "2019-02-03 22:46:01",
        "UpdateTime": "2019-02-13 16:58:33",
        "SetId": 126,
        "ExtendInfo": "",
        "MaxConcurrentCount": 10,
        "AffectedZoneList": [
        //Svr of uncompleted failover transactions and affected zones
            {
                "app_id": "2",
                "zone_id": "19"
            },
            {
                "app_id": "2",
                "zone_id": "20"
            }
        ]
    }
]

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"
}
{
    "source_ip": "ip:10.29.89.51 not in whitelist"
}

results matching ""

    No results matching ""