请求网址


发布
https://api.dotcom-monitor.com/config_api_v1/devices/PostponeTimed

在给定日期和时间的指定时间段内暂停监视具有所提供 ID 的多个设备(例如,在维护时段内)。

头参数

Content-Type: application/json
示例 将推迟对所列设备的监视的请求的 Post 正文
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{
"SetPostpone": [
{
"Device_ID": 7314,
"Postpone_Min": 20
},
{
"Device_ID": 7925,
"Postpone_Min": 10,
"Date_From": "19-May-2023 11:33"
},
{
"Device_ID": 10764,
"Postpone_Min": 30
},
{
"Device_ID": 12090,
"Postpone_Min": 900,
"Date_From": "19-May-2023 11:33"
}
]
}
{ "SetPostpone": [ { "Device_ID": 7314, "Postpone_Min": 20 }, { "Device_ID": 7925, "Postpone_Min": 10, "Date_From": "19-May-2023 11:33" }, { "Device_ID": 10764, "Postpone_Min": 30 }, { "Device_ID": 12090, "Postpone_Min": 900, "Date_From": "19-May-2023 11:33" } ] }
{
"SetPostpone": [
  {
   "Device_ID": 7314,
   "Postpone_Min": 20
  },
  {
   "Device_ID": 7925,
   "Postpone_Min": 10,
   "Date_From": "19-May-2023 11:33"
  },
  {
   "Device_ID": 10764,
   "Postpone_Min": 30
  },
  {
   "Device_ID": 12090,
   "Postpone_Min": 900,
   "Date_From": "19-May-2023 11:33"
  }
]
}

身体参数

领域 类型 必填 描述
设置推迟

对象数组

true

包含用于在监视中为指定测试组设置定时暂停的参数。
Device_ID

int32

true

监控设备的独特 ID。 要请求平台内的设备 ID 列表,请参阅 API:按平台获取设备列表
Postpone_min

Int

true

定义从发出请求时起将暂停监视的时间段(以分钟为单位)。

示例 1

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{
"Device_ID": 7394,
"Postpone_Min": 20
}
{ "Device_ID": 7394, "Postpone_Min": 20 }
{
   "Device_ID": 7394,
   "Postpone_Min": 20
}

将为 ID 为 7394 的设备推迟(设置维护)10 分钟。

示例 2。 取消延迟监控:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{
"Device_ID":7394
"Postpone_Min": 0
}
{ "Device_ID":7394 "Postpone_Min": 0 }
{ 
"Device_ID":7394
"Postpone_Min": 0 
}

将在请求时立即启用对 ID 为 7394 的设备进行监视。

Date_From

字符串

自选

反映设备将推迟的时刻的时间戳。

示例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{
"Device_ID":7394
"Postpone_Min": 10,
"Date_From": "14-May-2023 12:30"
}
{ "Device_ID":7394 "Postpone_Min": 10, "Date_From": "14-May-2023 12:30" }
{
"Device_ID":7394
"Postpone_Min": 10,
 "Date_From": "14-May-2023 12:30"
}

将从指定的日期和时间推迟 ID 为 7394 的设备(设置维护)10 分钟。 时间是根据用户的时区设置的(服务器端自动转换)。

成功响应

示例响应
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{
"Success": true,
"Result": "Bulk timed postpone has been set."
}
{ "Success": true, "Result": "Bulk timed postpone has been set." }
{

"Success": true,

"Result": "Bulk timed postpone has been set."

}