Cyber Expert – Sécurité & IA

Cyber Expert – Sécurité & IA · Ações GPT

DNS Chain Lookup API

API to get the recursive chain of DNS forward (A/AAAA/CNAME) and reverse (PTR) records starting form either a hostname or an IP address.

  • GET /data/dns-chain/data.jsonRecursive chain of DNS forward (A/AAAA/CNAME) and reverse (PTR) records
Esquema API original
{
  "openapi": "3.0.0",
  "info": {
    "title": "DNS Chain Lookup API",
    "version": "1.0.0",
    "description": "API to get the recursive chain of DNS forward (A/AAAA/CNAME) and reverse (PTR) records starting form either a hostname or an IP address."
  },
  "servers": [
    {
      "url": "https://stat.ripe.net"
    }
  ],
  "paths": {
    "/data/dns-chain/data.json": {
      "get": {
        "summary": "Recursive chain of DNS forward (A/AAAA/CNAME) and reverse (PTR) records",
        "operationId": "getDnsChain",
        "parameters": [
          {
            "name": "resource",
            "in": "query",
            "required": true,
            "description": "Hostname or IP address (IPv4 or IPv6).",
            "schema": {
              "type": "string",
              "example": "193.0.6.139"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with DNS Chain details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hostname": {
                      "type": "string"
                    },
                    "ip": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request due to invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Invalid hostname or IP address format."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "IP address or hostname not found in DNS records.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Resource not found."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}