[TOC] ## 获取dnsapi列表 ~~~[api] get:/v1/dnsapis integer:page=1#当前页码 integer:limit=10#每页显示的数量 <<< 返回结果 { "code": 0, "count": 2, "data": [{ "auth": "{\"DP_Id\": \"xxx\", \"DP_Key\": \"xxx\"}", "des": "", "id": 2, "name": "dnspod", "type": "DNSPod.cn", "uid": 2 }, { "auth": "{\"Ali_Secret\": \"xxxx\", \"Ali_Key\": \"xxx\"}", "des": "", "id": 1, "name": "阿里云", "type": "Aliyun", "uid": 2 } ] } ~~~ ## 增加dnsapi ~~~[api] post:/v1/dnsapis *string:name#dnsapi名称 des#备注 *type#dnsapi类型,可选为CloudFlare, DNSPod.cn, GoDaddy.com, Aliyun, cloudns.net, Name.com, Namecheap, jdcloud.com, dnsdun *json:auth#dnsapi凭证,各种dnsapi需要提供的凭证格式不一样。CloudFlare提供CF_Key、CF_Email;DNSPod.cn提供DP_Id、DP_Key;GoDaddy.com提供GD_Key、GD_Secret;Aliyun提供Ali_Key、Ali_Secret;cloudns.net提供CLOUDNS_SUB_AUTH_ID、CLOUDNS_AUTH_PASSWORD;Name.com提供Namecom_Username、Namecom_Token;Namecheap提供NAMECHEAP_USERNAME、NAMECHEAP_API_KEY、NAMECHEAP_SOURCEIP;jdcloud.com提供JD_ACCESS_KEY_ID、JD_ACCESS_KEY_SECRET;dnsdun提供Dnsdun_uid、Dnsdun_api_key。 <<< 返回结果 { "code": 0, "data": 1, "msg": "dnsapi添加成功!" } 说明: data为刚新增dnsapi的ID <<< 提交内容 { "name": "dnspod", "type": "DNSPod.cn", "auth": { "DP_Id": "xxx", "DP_Key": "xxx" } } ~~~ ## 获取指定dnsapi信息 ~~~[api] get:/v1/dnsapis/<Dnsapi ID> <<< 返回结果 { "code": 0, "data": { "auth": "{\"Ali_Secret\": \"xxxx\", \"Ali_Key\": \"xxx\"}", "des": "", "id": 1, "name": "阿里云", "type": "Aliyun", "uid": 2 }, "msg": "" } ~~~ ## 修改单个dnsapi ~~~[api] put:/v1/dnsapis/<Dnsapi ID> string:name#dnsapi名称 des#备注 type#dnsapi类型,可选为CloudFlare, DNSPod.cn, GoDaddy.com, Aliyun, cloudns.net, Name.com, Namecheap, jdcloud.com, dnsdun json:auth#dnsapi凭证,各种dnsapi需要提供的凭证格式不一样。CloudFlare提供CF_Key、CF_Email;DNSPod.cn提供DP_Id、DP_Key;GoDaddy.com提供GD_Key、GD_Secret;Aliyun提供Ali_Key、Ali_Secret;cloudns.net提供CLOUDNS_SUB_AUTH_ID、CLOUDNS_AUTH_PASSWORD;Name.com提供Namecom_Username、Namecom_Token;Namecheap提供NAMECHEAP_USERNAME、NAMECHEAP_API_KEY、NAMECHEAP_SOURCEIP;jdcloud.com提供JD_ACCESS_KEY_ID、JD_ACCESS_KEY_SECRET;dnsdun提供Dnsdun_uid、Dnsdun_api_key。 <<< 返回结果 { "code": 0, "data": "", "msg": "更新dnsapi成功" } <<< 提交内容 { "name": "dnspod2" } ~~~ ## 删除一个或多个dnsapi ~~~[api] delete:/v1/dnsapis/<Dnsapi ID,多个以逗号分隔> *string:id=默认值#说明文字 name#说明文字 <<< 返回结果 { "code": 0, "data": "", "msg": "dnsapi删除成功" } ~~~