MachineDataMake

Generate Machine Data Construction Transaction

Request address

POST
http://OmsAddress/app/newoms.php/webservice/oamp/machine-data/make?cmd=10012&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 transaction Yes
svrIdList Array svr list format of the constructed data: svr id, ip, username, password, separated by spaces. The account password cannot contain (; - space vertical bar). For example: 126.2.2.3 1.1.1.1 tcaplus tcaplus Yes
backType integer construction type of data, 1: cold backup time construction, 2: precise time construction Yes
engineBackupDate string Cold backup date of data construction, format: xxxx-xx-xx, such as 2018-03-07 Required when backType = 1
uLogBackupTime string Ulog construction data time point, format: xxxx-xx-xx xx:xx:xx, such as 2018-03-05 16:00:04 Required when backType = 2
maxConcurrentActionNum integer Transaction parallelism, range: [1, 50], default value: 10 No

Data Parameters

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

{
    "setId": 126,
    "svrIdList": [
        "126.2.2.3 1.1.1.1 tcaplus tcaplus"
    ],
    "engineBackupDate": "2018-03-07",
    "backType": 1,
    "maxConcurrentActionNum": 10
}

Return Syntax

Return Parameter Description

  1. When the returned status code is not 200, it indicates failure. The returned data is the message about the failure to construct table data

  2. 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
trans_id integer id of the corresponding transaction executed
set_id integer Set of the transaction

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 '{
    "setId": 126,
    "svrIdList": [
        "126.2.2.3 1.1.1.1 tcaplus tcaplus"
    ],
    "engineBackupDate": "2018-03-07",
    "backType": 1,
    "maxConcurrentActionNum": 10
}' http://omsaddress/app/newoms.php/webservice/oamp/machine-data/make?cmd=10012&ip-type=webservicerest&access-token=\

Return Example

Successful Return Example

Status of http request = 200

{
    "SetId": "126",
    "TransId": 108,
    "username": "username"
}

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"
}
{
    "Error": [
        "The Ulog retraction time point must be greater than the cold backup date"
    ]
}

results matching ""

    No results matching ""