API 请求成功时,HTTP 响应状态码是 200。
API 请求失败时,会出现以下任意一个情况:
如果响应出现异常,响应正文的内容如下。此时您可根据 Error
结构体中的 CodeN
,Code
和 Message
等提示信息排查问题原因。
类型 | Code | CodeN | Message | HTTP 响应状态码 | MessageCN |
---|---|---|---|---|---|
服务内部错误 | ErrInternalServer | 500100 | server internal error | 500 | 服务内部错误 |
公共类型校验错误 | ErrParsingParams | 400100 | parsing params error | 400 | 解析请求失败 |
ErrMissingAccountParameter | 400101 | `account` parameter missing | 401 | account参数缺失 | |
ErrParamInvalid | 400102 | validation fail: %s | 400 | 参数校验失败 | |
ErrDBDuplicated | 400103 | duplicated: %s | 409 | 数据库条目重复 | |
ErrDBNotFound | 400104 | record not found :%s | 400 | 数据库条目未找到 | |
ErrZoneNotFound | 400105 | zone not found | 400 | 未找到域名 | |
域名操作校验 | ErrVipZoneCanNotBeDeleted | 400110 | vip zone can not be deleted | 400 | 付费版域名不支持删除 |
ErrRequestSizeAboveMax | 400111 | zones numbers should be less than or equal to %s | 400 | 请求的域名数量超出限制 | |
ErrAccountZoneCountLimited | 400112 | account zone count limited when creating zone | 400 | 该账户域名数量超出限制 | |
域名找回操作校验 | ErrZoneInactive | 400120 | zone is inactive | 400 | 域名待找回 |
ErrZoneAlreadyRetrieve | 400121 | zone already retrieve | 400 | 域名已经被找回 | |
ErrZoneRetrieveNotFound | 400122 | search retrieve zone not found | 400 | 该域名未发起找回 | |
ErrZoneRetrieveRecordExpired | 400123 | zone retrieve record expired | 400 | 验证记录已过期 | |
ErrCreateRetrieveTxtReachingMaxTimes | 400124 | create retrieve txt record reaching max times | 400 | 验证记录生成次数超出限制 | |
ErrTXTRecordNotFound | 400125 | type txt record not found | 400 | 验证记录未找到 | |
记录操作校验 | ErrHostCanNotBeEmpty | 400130 | host can't be empty, use @ instead | 400 | 主机记录不能为空 |
ErrSearchParamMissingParams | 400131 | request param: rr or type or value or line cannot be empty | 400 | 记录查询条件缺失 | |
ErrPageSizeNotValid | 400132 | page size must be less than 500 when search | 400 | 分页查找的记录数量不能大于500 | |
ErrAccountRecordCountLimited | 400133 | account record count limited when creating record | 400 | 该账户记录数量超出限制 | |
ErrZoneRecordCountLimited | 400134 | zone record count limited when creating record | 400 | 该域名记录数量超出限制 | |
ErrSpecNotValid | 400135 | record %s not valid when creating record | 400 | 参数不符合功能版本规格限制 | |
ErrLoadBalancerLimit | 400136 | record load balancer count limited when creating record | 400 | 记录组中记录数量超出功能版本规格限制 | |
数据统计校验 | ErrNamesNotMatch | 400140 | domain name and zone name do not match | 400 | 域名与子域名不匹配 |
ErrDomainStatisticsNotValid | 400141 | this zone can't view domain statistics | 400 | 当前功能版本不支持查看子域名数据统计 |
{ "ResponseMetadata": { "RequestId": "20230411150314CE53198BCFE9484824BA", "Action": "QueryZone", "Version": "2018-08-01", "Service": "dns", "Region": "cn-north-1" }, "Result": { "InstanceNo": "DNS71279xxxxx9644332", "ZoneName": "xxxxx.com", "Remark": "", "ExpiredTime": 1691164799000, "ConfigurationCode": "monthly_plan_publiczone", "Status": 1, "AllocateDNSServerList": [ "ns1.volcdns.com", "ns2.volcdns.com", "ns3.volcdns.com", "ns4.volcdns.com", "ns5.volcdns.com" ], "RealDNSServerList": [ "ns1.volcdns.com", "ns2.volcdns.com", "ns3.volcdns.com", "ns4.volcdns.com", "ns5.volcdns.com" ], "IsNSCorrect": false, "Stage": 2, "TradeCode": "ultimate_inner", "UpdatedAt": "2023-04-03T19:17:32+08:00", "RecordCount": 0 } }
{ "ResponseMetadata": { "RequestId": "2023041116283931DC4B51E4C8C7660227", "Action": "QueryZone", "Version": "2018-08-01", "Service": "dns", "Region": "cn-north-1", "Error": { "CodeN": 400100, "Code": "ErrParsingParams", "Message": "parsing params error", "MessageCN": "解析请求失败" } } }