获取域名id
请求URL
https://api.cloudflare.com/client/v4/zones
请求方式
get
Header
{ "result": [ { "id": "域名id", "name": "xxx.xxx", "status": "active", "paused": false, "type": "full",
查找域名的解析记录 ID
简要描述
无
请求URL
https://api.cloudflare.com/client/v4/zones/域名id/dns_records
请求方式
get
Header
请求Query参数
{
"result": [
{
"id": "解析id",
"zone_id": "xxxxx",
"zone_name": "xxxx.xxx",
"name": "xxx.xxx.xx",
"type": "A",
"content": "xxx.xxx.xxx.xxx",
"proxiable": true,
"proxied": false,
"ttl": 1,
更新域名解析记录
简要描述
无
请求URL
https://api.cloudflare.com/client/v4/zones/域名id/dns_records/解析id
请求方式
patch
Header
请求参数示例
{
"content":"优选的ip"
}
{
"result": {
"id": "xxxxx",
"zone_id": "xxxxxx",
"zone_name": "xxx.xx",
"name": "xxxx.xxxx.xxxx",
"type": "A",
"content": "优选id",
"proxiable": true,
"proxied": false,
"ttl": 1,
"locked": false,
"meta": {
"auto_added": false,
"managed_by_apps": false,
"managed_by_argo_tunnel": false
},
"comment": null,
"tags": [
],
"created_on": "2024-02-06T07:09:57.749464Z",
"modified_on": "2024-07-26T06:21:25.218568Z"
},
"success": true,
"errors": [
],
"messages": [
]
}