StatDNS

PAID
By fcambus
Updated 5 months ago
Tools
7.8/10
Popularity Score
278ms
Latency
94%
Success Rate
LegalAnalytics3 years ago
500 Internal Server ErrorI am trying to do reverse-DNS on an IP and received the following error for the only example I tried: HTTP/1.1 500 Internal Server Error Connection: keep-alive Content-Length: 82 Content-Type: application/json Date: Sun, 21 Aug 2016 03:57:29 GMT Server: Mashape/5.0.6 X-Ratelimit-Requests-Limit: 1000 X-Ratelimit-Requests-Remaining: 995 { "code": 503, "message": "Some name that ought to exist, does not exist (NXDOMAIN)" } I am using the Mashape web page to test with. Any guidance?
LegalAnalytics3 years ago
Ok, thanks. Returning a 500-internal error for an expected condition doesn't seem like a great design decision, but thanks for following it up.
fcambus3 years ago
Hello, That's the intended behavior, as there is no reverse DNS configured for this IP address. You can verify this using dig. Here is partial output from: `dig -x 5.157.2.114` ``` ; <<>> DiG 9.8.3-P1 <<>> -x 5.157.2.114 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 44756 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ```
LegalAnalytics3 years ago
I get the correct response when I query 8.8.8.8, but not when I query one of my sample IP's: 5.157.2.114 which returns the below: HTTP/1.1 500 Internal Server Error Connection: keep-alive Content-Length: 82 Content-Type: application/json Date: Sun, 21 Aug 2016 15:54:35 GMT Server: Mashape/5.0.6 X-Ratelimit-Requests-Limit: 1000 X-Ratelimit-Requests-Remaining: 992 { "code": 503, "message": "Some name that ought to exist, does not exist (NXDOMAIN)" }
fcambus3 years ago
Hello, To do reverse DNS queries from the Mashape dashboard, please use this [endpoint](https://market.mashape.com/fcambus/statdns#reverse-dns-query). Testing with IP address 8.8.8.8 will return: ``` HTTP/1.1 200 OK Connection: keep-alive Content-Length: 396 Content-Type: application/json Date: Sun, 21 Aug 2016 06:57:05 GMT Server: Mashape/5.0.6 Vary: Accept-Encoding { "question": [ { "name": "8.8.8.8.in-addr.arpa.", "type": "PTR", "class": "IN" } ], "answer": [ { "name": "8.8.8.8.in-addr.arpa.", "type": "PTR", "class": "IN", "ttl": 59517, "rdlength": 32, "rdata": "google-public-dns-a.google.com." } ] } ```
Hi Developer, feel free to post your answer:

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://statdns-v1.p.rapidapi.com/{domain}/{querytype}")
.header("X-RapidAPI-Host", "statdns-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication