DNS 监控器
GET https://uptimeset.com/api/dns-monitors/
curl --request GET \
--url 'https://uptimeset.com/api/dns-monitors/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptimeset.com/api/dns-monitors/' \
--header 'Authorization: Bearer {api_key}' \
| 参数 | 详细信息 | 描述 |
|---|---|---|
| search | 可选 字符串 | 搜索字符串。 |
| search_by | 可选 字符串 | 您正在按哪个字段搜索。允许的值为:name , target。 |
| is_enabled | 可选 布尔值 | |
| order_by | 可选 字符串 | 按哪个字段排序结果。允许的值为:dns_monitor_id , datetime , last_datetime , last_check_datetime , last_change_datetime , total_checks , total_changes , name。 |
| order_type | 可选 字符串 | 结果的排序。允许的值为:ASC 表示升序排序,DESC 表示降序排序。 |
| page | 可选 整数 | 您想要结果的页码。默认为 1。 |
| results_per_page | 可选 整数 | 每页您想要多少个结果。允许的值为:10 , 25 , 50 , 100 , 250 , 500 , 1000。默认为25。 |
{
"data": [
{
"id": 1,
"project_id": 0,
"name": "Sample",
"target": "example.com",
"dns": {
"A": [
{
"host": "example.com",
"ip": "12.12.12.12"
}
],
"CNAME": [],
"HINFO": [],
"CAA": [],
"MX": [],
...
},
"notifications": [1],
"settings": {
"dns_check_interval_seconds": 300
},
"total_checks": 1,
"total_changes": 0,
"last_check_datetime": "2024-01-03 01:48:42",
"next_check_datetime": "2024-01-03 01:49:13",
"last_change_datetime": null,
"is_enabled": true,
"datetime": "2026-03-04 10:49:11",
"last_datetime": null
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://uptimeset.com/api/dns-monitors?page=1",
"last": "https://uptimeset.com/api/dns-monitors?page=1",
"next": null,
"prev": null,
"self": "https://uptimeset.com/api/dns-monitors?page=1"
}
}
GET https://uptimeset.com/api/dns-monitors/{dns_monitor_id}
curl --request GET \
--url 'https://uptimeset.com/api/dns-monitors/{dns_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptimeset.com/api/dns-monitors/{dns_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"project_id": 0,
"name": "Sample",
"target": "example.com",
"dns": {
"A": [
{
"host": "example.com",
"ip": "12.12.12.12"
}
],
"CNAME": [],
"HINFO": [],
"CAA": [],
"MX": [],
...
},
"notifications": [1],
"settings": {
"dns_check_interval_seconds": 300
},
"total_checks": 1,
"total_changes": 0,
"last_check_datetime": "2024-01-03 01:48:42",
"next_check_datetime": "2024-01-03 01:49:13",
"last_change_datetime": null,
"is_enabled": true,
"datetime": "2026-03-04 10:49:11",
"last_datetime": null
}
}
POST https://uptimeset.com/api/dns-monitors
| 参数 | 详细信息 | 描述 |
|---|---|---|
| name | 必需 字符串 | - |
| target | 必需 字符串 | - |
| project_id | 可选 整数 | - |
| notifications | 可选 数组 | 通知处理程序 ID |
| dns_check_interval_seconds | 可选 整数 | 允许的值:300, 600, 1800, 3600, 21600, 43200, 86400 (秒钟) |
| dns_types | 可选 数组 | 允许的值:A, CNAME, CAA, MX, NS, SOA, TXT, AAAA |
| is_enabled | 可选 布尔值 | - |
curl --request POST \
--url 'https://uptimeset.com/api/dns-monitors' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'target=example.com' \
--url 'https://uptimeset.com/api/dns-monitors' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'target=example.com' \
{
"data": {
"id": 1
}
}
POST https://uptimeset.com/api/dns-monitors/{dns_monitor_id}
| 参数 | 详细信息 | 描述 |
|---|---|---|
| name | 必需 字符串 | - |
| target | 必需 字符串 | - |
| project_id | 可选 整数 | - |
| notifications | 可选 数组 | 通知处理程序 ID |
| dns_check_interval_seconds | 可选 整数 | 允许的值:300, 600, 1800, 3600, 21600, 43200, 86400 (秒钟) |
| dns_types | 可选 数组 | 允许的值:A, CNAME, CAA, MX, NS, SOA, TXT, AAAA |
| is_enabled | 可选 布尔值 | - |
curl --request POST \
--url 'https://uptimeset.com/api/dns-monitors/{dns_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--url 'https://uptimeset.com/api/dns-monitors/{dns_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
{
"data": {
"id": 1
}
}
DELETE https://uptimeset.com/api/dns-monitors/{dns_monitor_id}
curl --request DELETE \
--url 'https://uptimeset.com/api/dns-monitors/{dns_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptimeset.com/api/dns-monitors/{dns_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \