获取域名id

请求URL
  • https://api.cloudflare.com/client/v4/zones

请求方式
  • get

header

示例值

必选

类型

说明

X-Auth-Email

xxx@xx.com

string

X-Auth-Key

xxxxxxxxxxxxxxxxx

string

{ "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

header

示例值

必选

类型

说明

X-Auth-Email

xxx@xxx.com

string

X-Auth-Key

xxxxxxxxxxxxxxxx

string

请求Query参数

参数名

示例值

必选

类型

说明

page

1

string

per_page

100

string

order

type

string

direction

asc

string

{

"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

header

示例值

必选

类型

说明

X-Auth-Email

xxx@xxxx.com

string

X-Auth-Key

xxxxxxxxxxxx

string

请求参数示例
{
"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": [

]

}