-
Notifications
You must be signed in to change notification settings - Fork 26
Query Api
forumbyr edited this page Mar 22, 2015
·
6 revisions
- Only support HTTP 'GET' method
- Media type must be 'application/rdap+json', in 'Accept' header.
- URI and parameters must be encoded in UTF-8.
- Unknown parameters will be ignored.
- Support HTTP BASIC authentication.When useing BASIC authentication, HTTPS must be used.
- Response is in JSON format. See 'Response Code' section for Response code.
Examples:
-
Request without authentication:
Request URL: http://rdap.restfulwhois.org/entity/et-1 Request Method:GET Accept:application/rdap+json
-
Request with HTTP BASIC authentication:
Request URL: https://rdap.restfulwhois.org/entity/et-1 Request Method:GET Accept:application/rdap+json Authorization: BASIC $BASE64_ENCODED_USERNAME_PASSWORD
($BASE64_ENCODED_USERNAME_PASSWORD must be replaced by base64 encoded "username:password" string. Certificate for rdap.restfulwhois.org is here)
Response Code | When |
---|---|
200 | Ok |
404 | Not found for query |
400 | Request uri is invalid, or parameter is invalid |
422 | Unsupported search string : more than one '*' in q, or q starts with '*', or q is '*' |
415 | Request with invalid media type: 'Accept' header is not 'application/rdap+json' |
401 | Unauthorized: authentication failed |
403 | Forbidden: the query object is forbidden for this client |
405 | Method Not Allowed. Only 'GET' method is allowed |
500 | Internal Server Error |
301 | Moved Permanently, client should request for the url by 'Location' in Response header |
429 | Too Many Requests, client should wait for a moment before query |
509 | Bandwidth Limit Exceeded: server is busy, client should try later |
URI: /entity/<handle>
Example: http://rdap.restfulwhois.org/entity/et-1
Click here for the response body.
URI: /nameserver/<name server name>
Example: http://rdap.restfulwhois.org/nameserver/xn--1-dr6av31f.xn--0zwm56d.xn--fiqs8s
Click here for the response body.
URI: /domain/<domain name>
Example: http://rdap.restfulwhois.org/domain/cnnic.cn
Click here for the response body.
URI: /ip/<IP address> or ip/<CIDR prefix>/<CIDR length>
Example:
http://rdap.restfulwhois.org/ip/218.0.0.3
http://rdap.restfulwhois.org/ip/218.241.0.0/30
Click here for the response body.
URI: /autnum/<autonomous system number>
Example: http://rdap.restfulwhois.org/autnum/1
Click here for the response body.
URI: /help
Example: http://rdap.restfulwhois.org/help
Click here for the response body.
URI:
/domains?name=<domain search pattern>
/domains?nsLdhName=<ns ldhName search pattern>
/domains?nsIp=<ns IP>
Example:
http://rdap.restfulwhois.org/domains?name=c*
http://rdap.restfulwhois.org/domains?nsLdhName=ns1.host*.cn
http://rdap.restfulwhois.org/domains?nsIp=218.241.111.96
Click here for the response body.
URI:
/nameservers?name=<nameserver search pattern>
/nameservers?ip=<IP Network search pattern>
Example:
http://rdap.restfulwhois.org/nameservers?name=n*cn
http://rdap.restfulwhois.org/nameservers?ip=218.241.111.96
Click here for the response body.
URI:
/entities?fn=<entity name search pattern>
/entities?handle=<entity handle search pattern>
Example:
http://rdap.restfulwhois.org/entities?fn=Jo*n
http://rdap.restfulwhois.org/entities?handle=et*
Click here for the response body.