diff --git a/content/docs/v1/endpoints.md b/content/docs/v1/endpoints.md index 47903b6..8a8d1d5 100644 --- a/content/docs/v1/endpoints.md +++ b/content/docs/v1/endpoints.md @@ -505,3 +505,106 @@ geoip( + +# DNS +--- + +GeoJS' second endpoint allows you to query PTR records for IPs. + +## DNS - PTR +--- + +This endpoint returns the requester IP's PTR record. It is not currently possible to lookup multiple PTRs at once. + +### URIs + +
+ + + + + + + + + + + + + + + + + + + + + +
TypeURI
Text{{% md %}}`https://get.geojs.io/v1/dns/ptr` + `https://get.geojs.io/v1/dns/ptr/{ip address}` + {{% /md %}} +
JSON{{% md %}}`https://get.geojs.io/v1/dns/ptr.json` + `https://get.geojs.io/v1/dns/ptr/{ip address}.json` + {{% /md %}} +
JSONP{{% md %}}`https://get.geojs.io/v1/dns/ptr.js(?callback=custom)` + `https://get.geojs.io/v1/dns/ptr/{ip address}.js(?callback=custom)` + {{% /md %}} +
+
+ +### Query Parameters + +
+ + + + + + + + + + + + + + + + + +
ParamaterDefaultDescriptionEndpoint
{{% md %}}`callback`{{% /md %}}{{% md %}}`ptr`{{% /md %}}JSONP callback{{% md %}}`/v1/dns/ptr.js`{{% /md %}}
+
+ +### Example Responses + +
+ + + +
+
{{% md %}} + + ```text +google-public-dns-a.google.com + ``` + {{% /md %}}
+
+{{< highlight json >}} +{ + "ptr": "google-public-dns-a.google.com" +} +{{< /highlight >}} +
+
{{% md %}} +{{< highlight javascript >}} +ptr({ + "ptr": "google-public-dns-a.google.com" +}) +{{< /highlight >}} +{{% /md %}}
+
+