{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-autonomous-systems-api-as-prefix-associations-schema.json",
  "title": "Autonomous_Systems_API_AsPrefixAssociations",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-autonomous-system-prefixes-api-openapi.yml#/components/schemas/Autonomous_Systems_API_AsPrefixAssociations",
  "type": "object",
  "properties": {
    "prefixes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Autonomous_Systems_API_PrefixAssociations"
      }
    },
    "_links": {
      "$ref": "#/$defs/Autonomous_Systems_API_PaginationLinks"
    }
  },
  "$defs": {
    "Autonomous_Systems_API_Link": {
      "type": "object",
      "description": "A hyperlink from the containing resource to a URI.",
      "required": [
        "href"
      ],
      "properties": {
        "href": {
          "type": "string",
          "description": "Its value is either a URI [RFC3986] or a URI template [RFC6570]."
        },
        "templated": {
          "type": "boolean",
          "description": "Should be true when the link object's \"href\" property is a URI template."
        },
        "type": {
          "type": "string",
          "description": "Used as a hint to indicate the media type expected when dereferencing the target resource."
        },
        "deprecation": {
          "type": "string",
          "description": "Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation."
        },
        "name": {
          "type": "string",
          "description": "Its value may be used as a secondary key for selecting link objects that share the same relation type."
        },
        "profile": {
          "type": "string",
          "description": "A URI that hints about the profile of the target resource."
        },
        "title": {
          "type": "string",
          "description": "Intended for labelling the link with a human-readable identifier"
        },
        "hreflang": {
          "type": "string",
          "description": "Indicates the language of the target resource"
        }
      }
    },
    "Autonomous_Systems_API_PaginationLinks": {
      "type": "object",
      "description": "A links object containing pagination related link(s).",
      "properties": {
        "previous": {
          "$ref": "#/$defs/Autonomous_Systems_API_Link"
        },
        "next": {
          "$ref": "#/$defs/Autonomous_Systems_API_Link"
        },
        "self": {
          "$ref": "#/$defs/Autonomous_Systems_API_Link"
        }
      }
    },
    "Autonomous_Systems_API_PrefixAssociation": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/$defs/Autonomous_Systems_API_PrefixAssociationType"
        },
        "lastSeen": {
          "type": "string",
          "format": "date-time",
          "description": "The UTC date when this association was last seen.",
          "readOnly": true
        },
        "source": {
          "type": "string",
          "description": "The data source (usually an Internet Routing Registry) where the association was found."
        }
      },
      "required": [
        "type",
        "lastSeen"
      ]
    },
    "Autonomous_Systems_API_PrefixAssociationType": {
      "type": "string",
      "description": "The method by which the prefix is associated with the Autonomous System.",
      "enum": [
        "announced",
        "rpki",
        "allocated",
        "unknown"
      ]
    },
    "Autonomous_Systems_API_PrefixAssociations": {
      "type": "object",
      "properties": {
        "prefix": {
          "description": "The IP prefix in CIDR notation.",
          "type": "string"
        },
        "associations": {
          "description": "If expanded, this array shows the method by which the prefix is associated with the Autonomous System.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Autonomous_Systems_API_PrefixAssociation"
          }
        },
        "otherAssociatedAsns": {
          "description": "Other Autonomous System numbers associated with this IP prefix.",
          "type": "array",
          "items": {
            "type": "integer"
          }
        }
      },
      "required": [
        "prefix",
        "otherAssociatedAsns"
      ]
    }
  }
}