获取单个网站详情

请求URL

  • {{url}}/api/site/info

请求方式

  • get

Header

字段名
示例值
必选
类型
说明

x-api-key

{{x-api-key}}

string

x-api-secret

{{x-api-secret}}

string

请求Query参数

参数名
示例值
必选
类型
说明

id

25

string

网站ID

请求参数示例


成功返回示例

{
    "code": 0,
    "data": {
        "acl": null,
        "acme_proxy_to_orgin": 0,
        "backend": "[{\"state\": \"up\", \"addr\": \"127.0.0.1\", \"weight\": 1}]",
        "backend_host": "$host",
        "backend_http_port": "80",
        "backend_https_port": "443",
        "backend_port_mapping": 0,
        "backend_protocol": "http",
        "backup_node_group": null,
        "backup_node_group_name": null,
        "balance_way": "rr",
        "black_ip": "",
        "block_proxy": 0,
        "block_region": "",
        "cc_default_rule": 6,
        "cc_switch": "{}",
        "cname_domain": "bb7.site",
        "cname_hostname": "g7ndrmpu",
        "cname_hostname2": "111",
        "cname_mode": "package",
        "cname_state": null,
        "cname_task_id": null,
        "cors": "{\"allow_origin\": \"*\", \"allow_methods\": \"GET POST OPTIONS\", \"enable\": 0, \"allow_headers\": \"DNT Keep-Alive User-Agent X-Requested-With If-Modified-Since Cache-Control Content-Type\", \"max_age\": \"1728000\", \"expose_headers\": \"Content-Length Content-Range\", \"allow_credentials\": 1}",
        "create_at": null,
        "create_at2": "2024-11-03 13:17:21",
        "domain": "abcded.com",
        "enable": 1,
        "enable_backup_group": 0,
        "end_at": "2024-11-21 19:22:42",
        "extra_cc_rule": "[]",
        "groups": null,
        "gzip_enable": 1,
        "gzip_types": "text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/json",
        "health_check": "{\"enable\": false, \"protocol\": \"http\", \"status_code\": \"200 301 302\", \"interval\": 10, \"host\": \"abcded.com\", \"path\": \"/\"}",
        "hotlink": "{\"domain\": \"\", \"enable\": 0, \"allow_empty\": true}",
        "http_listen": "{\"port\": \"80\"}",
        "https_listen": "{}",
        "id": 25,
        "name": "cdnwaf",
        "node_group_id": 1,
        "node_group_name": "test",
        "package_name": "test1",
        "page_404": "",
        "page_50x": "",
        "post_size_limit": 40,
        "proxy_cache": "[{\"content\": \"gif|jpg|jpeg|png|bmp|swf|js|css\", \"range\": false, \"expire\": \"6\", \"proxy_ignore_headers\": \"\", \"no_cache\": [], \"type\": \"suffix\", \"ignore_arg\": true, \"unit\": \"h\"}]",
        "proxy_http_version": "1.1",
        "proxy_ssl_protocols": "TLSv1 TLSv1.1 TLSv1.2",
        "proxy_timeout": "900",
        "range": 0,
        "record_id": null,
        "region_id": 1,
        "req_header": "[]",
        "resp_header": "[]",
        "s.cname_domain": "bb7.site",
        "s.cname_hostname": "g7ndrmpu",
        "s.cname_hostname2": "111",
        "s.cname_mode": "package",
        "site_state": "200",
        "spider_allow": "baidu|sogou|sm|bing|google|toutiao|360spider",
        "state": "200",
        "sync_state": "done",
        "task_id": 367520,
        "uid": 2,
        "up_cname_domain": "bb7.site",
        "up_cname_hostname": "as5ydt9n-u",
        "up_cname_hostname2": "111",
        "update_at": null,
        "update_at2": "2024-11-03 13:17:21",
        "ups_keepalive": 0,
        "ups_keepalive_conn": 32,
        "ups_keepalive_timeout": 50,
        "url_rewrite": "[]",
        "user_package": 5,
        "version": 1,
        "websocket_enable": 1,
        "white_ip": ""
    },
    "msg": ""
}

成功返回示例的参数说明

参数名
类型
说明

id

Integer

网站ID

user_package

String

已购套餐ID

domain

String

绑定的域名,支持通配符域名,多个域名空格分隔

http_listen

Object

http_listen.port

String

监听端口

https_listen

Object

HTTPS设置

https_listen.port

String

https_listen.cert

String

https_listen.hsts

Integer

https_listen.ocsp_stapling

Integer

https_listen.ssl_protocols

String

https_listen.ssl_ciphers

String

https_listen.ssl_prefer_server_ciphers

String

https_listen.force_ssl_enable

Integer

https_listen.force_ssl_port

String

balance_way

String

源服务器负载均衡方式,可选值为ip_hash、rr、url_hash、least_conn、random。ip_hash为根据客户端IP定源,rr是轮循,url_hash是根据url定源,least_conn是取最少连接的源,random是随机分配

backend

Array

指定源IP,格式为数组

backend.addr

String

源IP

backend.weight

Integer

权重

backend.state

String

state为状态,默认为up,可选值为down,up,backup

backend_http_port

String

当回源协议为http时,回源使用的端口

backend_protocol

String

回源协议,可选值为follow、http、https。

backend_https_port

String

当回源协议为https时,回源使用的端口

proxy_timeout

String

回源超时时间

backend_port_mapping

Boolean

回源端口映射,表示回源的协议和端口与访问的协议的端口一致。

health_check

Object

源站健康检查

health_check.enable

Integer

health_check.protocol

String

health_check.host

String

health_check.path

String

health_check.status_code

String

health_check.interval

Integer

ups_keepalive

Boolean

回源keepalive

ups_keepalive_conn

Integer

keepalive的连接数

ups_keepalive_timeout

Integer

keepalive超时时间

proxy_http_version

Number

回源的http协议版本,可选1.1,1.0

proxy_ssl_protocols

String

回源SSL协议,可选TLSv1 TLSv1.1 TLSv1.2

backend_host

String

回源的Host值,可选$host、$host:$server_port和自定义

range

Boolean

分断取源,一次取1MB

proxy_cache

Array

缓存设置,数据格式为数组

proxy_cache.type

String

type可选为suffix、dir、full_path,分别是后缀,目录,全路径

proxy_cache.content

String

proxy_cache.expire

String

proxy_cache.unit

String

unit可选为d、h、m、s,分别为天,小时,分钟,秒。ignore_arg表示忽略参数

proxy_cache.ignore_arg

Boolean

表示忽略参数

proxy_cache.proxy_ignore_headers

String

当proxy_ignore_headers值为X-Accel-Expires Expires Cache-Control Set-Cookie时,表示强制缓存

proxy_cache.no_cache

Array

no_cache表示排除符合条件的缓存

proxy_cache.no_cache.variable

String

表示uri匹配/api/的url不缓存。variable为变量,可选为$args、$content_type、$content_length、$host、$https、$is_args、$query_string、$remote_addr、$request_method、$request_uri、$scheme、$status、$uri,以及$arg_x,$cookie_x,$http_x,其中$arg_x为获取参数值,x为参数名;$cookie_x为cookie值,x为cookie名称;$http_x为请求头值,x为请求头名称

proxy_cache.no_cache.string

String

cc_default_rule

Integer

默认的防御规则组

cc_switch

Object

cc_switch.rule

String

规则组ID

cc_switch.switch

String

网站QPS超过时切换

cc_switch.enable

Integer

是否启用

extra_cc_rule

Array

extra_cc_rule.filter

Object

extra_cc_rule.filter.within_second

Integer

extra_cc_rule.filter.extra

Object

extra_cc_rule.filter.type

String

extra_cc_rule.filter.max_per_uri

Integer

extra_cc_rule.filter.max_challenge

Integer

extra_cc_rule.matcher

Object

extra_cc_rule.matcher.ip

Object

extra_cc_rule.matcher.ip.operator

String

extra_cc_rule.matcher.ip.value

String

block_region

String

屏蔽区域,可选值两字母的国家代码

black_ip

String

黑名单IP,一行一个,支持子掩码/8 /16 /24,如192.168.0.0/8、192.168.0.0/16、192.168.0.0/24.

white_ip

String

白名单IP,一行一个,支持子掩码/8 /16 /24,如192.168.0.0/8、192.168.0.0/16、192.168.0.0/24.

acl

String

指定ACL ID

hotlink

Object

hotlink.enable

Integer

可选值为0或1

hotlink.domain

String

为空时,只允许当前添加的域名,可填写额外的域名

hotlink.allow_empty

Integer

可选值为0或1,表示是否允许空来源访问

cors

Object

设置跨站支持

cors.enable

Integer

cors.allow_origin

String

cors.allow_methods

String

cors.allow_headers

String

cors.expose_headers

String

cors.allow_credentials

Integer

cors.max_age

Integer

resp_header

Array

设置响应头

resp_header.name

String

resp_header.value

String

req_header

Array

设置请求头

req_header.name

String

req_header.value

String

page_404

String

自定义404错误页面

page_50x

String

自定义404错误页面

url_rewrite

Array

url重定向,表示taobao.com重定向到baidu.com

url_rewrite.host

String

url_rewrite.match

String

url_rewrite.redirect

String

url_rewrite.code

String

gzip_enable

Boolean

gzip开启

gzip_types

String

gzip的content type,如text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/json

websocket_enable

Boolean

websocket开启

acme_proxy_to_orgin

Boolean

当为1时,/.well-known/acme-challenge/的请求回源。

post_size_limit

Integer

上传文件最大大小,单位为MB

recv_real_time

Boolean

数据实时返回,0为关闭,1为开启

send_real_time

Boolean

数据实时发送,0为关闭,1为开启

spider_to_sip

String

指定搜索引擎回源的IP地址,当需要关闭此功能时,可设置此值为空

groups

String

指定所属的网站组,多个以逗号分隔

enable

Boolean

网站启用或禁用

Last updated