openapi: 3.0.1
info:
  title: NetHub Data
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: "1.0"
servers:
  - url: https://apigw.ipxo.com/nethub-data
paths:
  /{tenantUUID}/prefixes/search:
    post:
      tags:
        - prefixes
      summary: Search for Prefixes
      description: Returns a list of prefixes that match the given search parameters.
      operationId: post-tenantuuid-prefixes-search
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrefixSearch"
      responses:
        "200":
          description: A list of matching prefixes.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrefixHolderGetResponse"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: post-tenantuuid-prefixes-search
      x-ipxo-group: Prefixes
  /{tenantUUID}/prefixes/metadata:
    patch:
      tags:
        - prefixes-metadata
      summary: Set Holder Metadata
      description: Updates target prefix holder metadata and returns updated prefixes.
      operationId: patch-tenantuuid-prefixes-metadata
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrefixesHolderUpdateMetadataRequest"
      responses:
        "200":
          description: A list of updated prefixes.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrefixHolder"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: patch-tenantuuid-prefixes-metadata
      x-ipxo-group: Prefixes
    delete:
      tags:
        - prefixes-metadata
      summary: Delete Holder Metadata
      description: Deletes target prefix holder metadata by requested keys and returns updated prefixes.
      operationId: delete-tenantuuid-prefixes-metadata
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrefixesHolderDeleteMetadataRequest"
      responses:
        "200":
          description: A list of updated prefixes.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrefixHolder"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: delete-tenantuuid-prefixes-metadata
      x-ipxo-group: Prefixes
  /{tenantUUID}/prefixes/{notation}/metadata:
    patch:
      tags:
        - prefixes-metadata-notation
      summary: Set Holder Metadata for a single Prefix
      description: Updates target prefix holder metadata and returns updated prefix.
      operationId: patch-tenantuuid-prefixes-notation-metadata
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
        - name: notation
          in: path
          description: Prefix notation
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrefixHolderUpdateMetadataRequest"
      responses:
        "200":
          description: Updated prefix
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrefixHolder"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: patch-tenantuuid-prefixes-notation-metadata
      x-ipxo-group: Prefixes
    delete:
      tags:
        - prefixes-metadata-notation
      summary: Delete Holder Metadata for a single Prefix
      description: Deletes target prefix holder metadata and returns updated prefix.
      operationId: delete-tenantuuid-prefixes-notation-metadata
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
        - name: notation
          in: path
          description: Prefix notation
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrefixHolderDeleteMetadataRequest"
      responses:
        "200":
          description: Updated prefix.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrefixHolder"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: delete-tenantuuid-prefixes-notation-metadata
      x-ipxo-group: Prefixes
  /{tenantUUID}/prefixes/metadata/array:
    post:
      tags:
        - prefixes-metadata-array
      summary: Add metadata array elements to existing prefix holders metadata
      description: This endpoint allows for the addition of array elements to the metadata arrays of existing prefix holders. If matching values already exist no action is performed.
      operationId: post-tenantuuid-prefixes-metadata-array
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
      requestBody:
        description: Request payload for adding elements to metadata arrays.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrefixesHolderMetadataArrayModifyRequest"
      responses:
        "200":
          description: Successful addition of metadata array elements.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrefixHolderMetadata"
        "400":
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: post-tenantuuid-prefixes-metadata-array
      x-ipxo-group: Prefixes
    patch:
      tags:
        - prefixes-metadata-array
      summary: Add metadata array elements to existing prefix holders metadata
      description: This endpoint allows for the addition of array elements to the metadata arrays of existing prefix holders. Values are always added to the target array. Position can be provided to set where exactly in the array new values should be added. If element in the target position already exists the value is overwritten.
      operationId: patch-tenantuuid-prefixes-metadata-array
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
      requestBody:
        description: Request payload for adding elements to metadata arrays.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrefixesHolderMetadataArrayModifyRequest"
      responses:
        "200":
          description: Successful addition of metadata array elements.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrefixHolderMetadata"
        "400":
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: patch-tenantuuid-prefixes-metadata-array
      x-ipxo-group: Prefixes
    delete:
      tags:
        - prefixes-metadata-array
      summary: Remove metadata array elements from existing prefix holders metadata
      description: This endpoint allows for the deletion of array elements from the metadata arrays of existing prefix holders. This endpoint can be combined with `DELETE - /{tenantUUID}/prefixes/metadata` by removing specific array components with that endpoint first and since it sets values to `NULL` when performing delete operations on array positions, one can execute this API call by providing single value of `NULL` to `elements` and it will easily remove all those elements, freeing up array space and resetting positions.
      operationId: delete-tenantuuid-prefixes-metadata-array
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
      requestBody:
        description: Request payload for deleting elements from metadata arrays.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrefixesHolderMetadataArrayModifyRequest"
      responses:
        "200":
          description: Successful deletion of metadata array elements.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrefixHolderMetadata"
        "400":
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: delete-tenantuuid-prefixes-metadata-array
      x-ipxo-group: Prefixes
  /{tenantUUID}/prefixes/{notation}/metadata/array:
    post:
      tags:
        - prefixes-metadata-array-notation
      summary: Add metadata array elements to existing prefix holders metadata of a specified notation
      description: This endpoint allows for the addition of array elements to the metadata arrays of existing prefix holders notation. If matching values already exist no action is performed.
      operationId: post-tenantuuid-prefixes-notation-metadata-array
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
        - name: notation
          in: path
          description: Prefix notation
          required: true
          schema:
            type: string
      requestBody:
        description: Request payload for adding elements to metadata arrays.
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/PrefixHolderMetadataArrayModifyItem"
      responses:
        "200":
          description: Successful addition of metadata array elements.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrefixHolderMetadata"
        "400":
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: post-tenantuuid-prefixes-notation-metadata-array
      x-ipxo-group: Prefixes
    patch:
      tags:
        - prefixes-metadata-array-notation
      summary: Add metadata array elements to existing prefix holders metadata of a specified notation
      description: This endpoint allows for the addition of array elements to the metadata arrays of existing prefix holders notation. Values are always added to the target array. Position can be provided to set where exactly in the array new values should be added. If element in the target position already exists the value is overwritten.
      operationId: patch-tenantuuid-prefixes-notation-metadata-array
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
        - name: notation
          in: path
          description: Prefix notation
          required: true
          schema:
            type: string
      requestBody:
        description: Request payload for adding elements to metadata arrays.
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/PrefixHolderMetadataArrayModifyItem"
      responses:
        "200":
          description: Successful addition of metadata array elements.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrefixHolderMetadata"
        "400":
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: patch-tenantuuid-prefixes-notation-metadata-array
      x-ipxo-group: Prefixes
    delete:
      tags:
        - prefixes-metadata-array-notation
      summary: Remove metadata array elements from existing prefix holders metadata of a specified notation
      description: This endpoint allows for the deletion of array elements from the metadata arrays of existing prefix holders notation. This endpoint can be combined with `DELETE - /{tenantUUID}/prefixes/metadata` by removing specific array components with that endpoint first and since it sets values to `NULL` when performing delete operations on array positions, one can execute this API call by providing single value of `NULL` to `elements` and it will easily remove all those elements, freeing up array space and resetting positions.
      operationId: delete-tenantuuid-prefixes-notation-metadata-array
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
        - name: notation
          in: path
          description: Prefix notation
          required: true
          schema:
            type: string
      requestBody:
        description: Request payload for removing elements from metadata arrays.
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/PrefixHolderMetadataArrayModifyItem"
      responses:
        "200":
          description: Successful removal of metadata array elements.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrefixHolderMetadata"
        "400":
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: delete-tenantuuid-prefixes-notation-metadata-array
      x-ipxo-group: Prefixes
  /{tenantUUID}/prefixes/metadata/all:
    delete:
      tags:
        - prefixes-metadata
      summary: Delete All Holder Metadata
      description: Deletes target prefix holder metadata and returns updated prefixes.
      operationId: delete-tenantuuid-prefixes-metadata-all
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrefixesHolderDeleteMetadataAllRequest"
      responses:
        "200":
          description: A list of updated prefixes.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrefixHolder"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: delete-tenantuuid-prefixes-metadata-all
      x-ipxo-group: Prefixes
  /{tenantUUID}/prefixes/{notation}/metadata/all:
    delete:
      tags:
        - prefixes-metadata-notation
      summary: Delete All Holder Metadata for a single Prefix
      description: Deletes target prefix holder metadata and returns updated prefix.
      operationId: delete-tenantuuid-prefixes-notation-metadata-all
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
        - name: notation
          in: path
          description: Prefix notation
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Updated prefix.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrefixHolder"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: delete-tenantuuid-prefixes-notation-metadata-all
      x-ipxo-group: Prefixes
  /{tenantUUID}/prefixes/subsets/metadata:
    get:
      tags:
        - prefixes-metadata
      summary: Find master prefixes with subsets metadata
      description: Returns the master prefixes with subsets metadata based on the provided search criteria
      operationId: get-tenantuuid-prefixes-subsets-metadata
      parameters:
        - name: tenantUUID
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
        - name: notation
          in: query
          description: list of starting point notations. If provided will use these notations to find prefixes to use as top-levels to begin calculating subsets. If not provided will default to master level prefixes. Can provide multiple values by using the same key.
          schema:
            type: string
        - name: offset
          in: query
          description: The number of items to skip before starting to collect the result set
          schema:
            type: integer
        - name: limit
          in: query
          description: The numbers of items to return
          schema:
            type: integer
        - name: sort
          in: query
          description: "Sort order for the returned items. Keys must be provided in a single string, separated by `,`. Order determines sorting priority. Adding `-` in front of the key enables DESCENDING sort. Supported keys: [`notation`, `ipNet`]. To achieve correct \"IP sort\" use `ipNet`."
          schema:
            type: string
        - name: fields
          in: query
          description: "Comma (`,`) separated list of prefix object fields to return in response. Supports sub-object projection by using `.`, i.e.: `geodata.provider`. **NOTE**: `internalMetadata` does not fully support sub-object field projection and will always return entire structure, with non-requested fields initialized with default type values (i.e. booleans will be equal to `FALSE` and strings to `\"\"`), so it is advised to always request entire `internalMetadata` to avoid data analysis inconsistencies."
          schema:
            type: string
      responses:
        "200":
          description: Successfully retrieved master prefixes with subsets metadata
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrefixHolderSubsetsGetResponse"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-ipxo-slug: get-tenantuuid-prefixes-subsets-metadata
      x-ipxo-group: Prefixes
components:
  schemas:
    PrefixHolder:
      type: object
      properties:
        notation:
          type: string
        ipNet:
          $ref: "#/components/schemas/IPNet"
        internalMetadata:
          $ref: "#/components/schemas/PrefixMetadata"
        externalMetadata:
          $ref: "#/components/schemas/PrefixComponentExternalMetadata"
        holderMetadata:
          $ref: "#/components/schemas/PrefixComponentHolderMetadata"
        geodata:
          type: array
          items:
            $ref: "#/components/schemas/GeolocationData"
        whois:
          $ref: "#/components/schemas/WHOISCache"
        bgp:
          $ref: "#/components/schemas/BGPCache"
        rpki:
          $ref: "#/components/schemas/RPKICache"
        routes:
          type: array
          items:
            $ref: "#/components/schemas/RouteCache"
        routingHealth:
          $ref: "#/components/schemas/RoutingHealthItem"
        cacheDerrived:
          $ref: "#/components/schemas/CacheDerrived"
    PrefixMetadata:
      type: object
      properties:
        internal:
          type: boolean
        readOnly:
          type: boolean
        master:
          type: boolean
        prefixLengthLimits:
          $ref: "#/components/schemas/PMPrefixLengthLimits"
        holders:
          type: array
          items:
            $ref: "#/components/schemas/PMHolder"
    PrefixHolderSubsets:
      type: object
      properties:
        notation:
          type: string
        ipNet:
          $ref: "#/components/schemas/IPNet"
        internalMetadata:
          $ref: "#/components/schemas/PrefixMetadata"
        externalMetadata:
          $ref: "#/components/schemas/PrefixComponentExternalMetadata"
        holderMetadata:
          $ref: "#/components/schemas/PrefixComponentHolderMetadata"
        geodata:
          type: array
          items:
            $ref: "#/components/schemas/GeolocationData"
        whois:
          $ref: "#/components/schemas/WHOISCache"
        bgp:
          $ref: "#/components/schemas/BGPCache"
        rpki:
          $ref: "#/components/schemas/RPKICache"
        routes:
          type: array
          items:
            $ref: "#/components/schemas/RouteCache"
        routingHealth:
          $ref: "#/components/schemas/RoutingHealthItem"
        cacheDerrived:
          $ref: "#/components/schemas/CacheDerrived"
        subsets:
          type: array
          items:
            $ref: "#/components/schemas/PrefixHolder"
    PMPrefixLengthLimits:
      type: object
      properties:
        min:
          type: integer
        max:
          type: integer
        exact:
          type: array
          items:
            type: integer
    PMHolder:
      type: object
      properties:
        tenantUUID:
          type: string
        top:
          type: boolean
    PrefixHolderMetadata:
      type: object
      properties:
        notation:
          type: string
        ipNet:
          $ref: "#/components/schemas/IPNet"
        maskSize:
          type: integer
        type:
          enum:
            - 0
            - 1
          type: integer
          description: 0 - IPv4, 1 - IPv6
        holderMetadata:
          $ref: "#/components/schemas/PrefixComponentHolderMetadata"
    PrefixComponentExternalMetadata:
      type: object
      additionalProperties:
        type: string
    PrefixComponentHolderMetadata:
      type: object
      additionalProperties:
        type: string
    PrefixHolderGetResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/PrefixHolder"
        metadata:
          $ref: "#/components/schemas/Metadata"
    PrefixHolderSubsetsGetResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/PrefixHolderSubsets"
        metadata:
          $ref: "#/components/schemas/Metadata"
    GeolocationData:
      type: object
      properties:
        provider:
          type: string
        countryName:
          type: string
        countryCode:
          type: string
        cityName:
          type: string
        date:
          type: string
        state:
          type: string
    WHOISCache:
      required:
        - domains
        - inetnum
        - nets
        - registrar
        - source
      type: object
      properties:
        inetnum:
          type: string
        registrar:
          type: string
        source:
          type: string
        recordActive:
          type: boolean
        nets:
          type: array
          items:
            $ref: "#/components/schemas/WHOISCacheNet"
        domains:
          type: array
          items:
            $ref: "#/components/schemas/WHOISCacheDomain"
    WHOISCacheNet:
      required:
        - net_type
        - netname
      type: object
      properties:
        organisation:
          type: string
        netname:
          type: string
        net_type:
          type: string
        net_handle:
          type: string
        origin_as:
          type: string
        country:
          type: array
          items:
            type: string
        comment:
          type: string
        created:
          type: string
          format: date-time
        last_modified:
          type: string
          format: date-time
        record_created:
          type: string
          format: date-time
        record_modified:
          type: string
          format: date-time
        mnt_by:
          type: array
          items:
            type: string
        mnt_irt:
          type: array
          items:
            type: string
        pocs:
          type: array
          items:
            $ref: "#/components/schemas/WHOISCachePoc"
        notify:
          type: string
    WHOISCachePoc:
      type: object
      properties:
        handle:
          type: string
        kind:
          type: string
    WHOISCacheDomain:
      type: object
      properties:
        domain:
          type: string
        nservers:
          type: array
          items:
            type: string
    BGPCache:
      type: object
      properties:
        peerCount:
          $ref: "#/components/schemas/BGPCachePeerCountIP"
        asOrigins:
          type: array
          items:
            $ref: "#/components/schemas/BGPCacheASOrigin"
        asSetOrigins:
          type: array
          items:
            $ref: "#/components/schemas/BGPCacheASSetOrigin"
    BGPCachePeerCountIP:
      type: object
      properties:
        fullTable:
          type: integer
          format: int64
        active:
          type: integer
          format: int64
    BGPCacheASOrigin:
      type: object
      properties:
        asn:
          type: integer
          format: uint32
        peersSeeing:
          type: integer
    BGPCacheASSetOrigin:
      type: object
      properties:
        asSet:
          type: string
        peersSeeing:
          type: integer
    RPKICache:
      type: object
      properties:
        roas:
          type: array
          items:
            $ref: "#/components/schemas/ROACache"
        suggestions:
          type: array
          items:
            $ref: "#/components/schemas/RPKISuggestion"
    ROACache:
      type: object
      properties:
        maxLength:
          type: integer
          format: int64
        asn:
          type: string
          description: Autonomous System Number (ASN) for the ROA
        ta:
          type: string
          description: Trust Anchor (TA) for the ROA
    RPKISuggestion:
      type: object
      properties:
        maxLength:
          type: integer
          format: int64
        asn:
          type: string
          description: Autonomous System Number (ASN) for the ROA
        ta:
          type: string
          description: Trust Anchor (TA) for the ROA
        status:
          enum:
            - as0
            - as0_redundant
            - not_found
            - invalid_asn
            - invalid_length
            - too_permissive
            - redundant
            - not_seen
          type: string
    RouteCache:
      type: object
      properties:
        route:
          type: string
        origin:
          type: string
        descr:
          type: array
          items:
            type: string
        mnt_by:
          type: array
          items:
            type: string
        changed:
          type: array
          items:
            type: string
        source:
          type: string
    RoutingHealthCache:
      type: object
      properties:
        tenantUUID:
          type: string
        health:
          $ref: "#/components/schemas/RoutingHealthItem"
    RoutingHealthItem:
      type: object
      properties:
        criticalityStatus:
          enum:
            - critical
            - good
            - high
            - low
          type: string
        bgpStatus:
          $ref: "#/components/schemas/RoutingHealthStatus"
        bgpActions:
          type: array
          items:
            $ref: "#/components/schemas/RoutingHealthAction"
        rpkiStatus:
          $ref: "#/components/schemas/RoutingHealthStatus"
        rpkiActions:
          type: array
          items:
            $ref: "#/components/schemas/RoutingHealthAction"
        irrStatus:
          $ref: "#/components/schemas/RoutingHealthStatus"
        irrActions:
          type: array
          items:
            $ref: "#/components/schemas/RoutingHealthActionIRR"
        irmActions:
          type: array
          items:
            $ref: "#/components/schemas/RoutingHealthAction"
    RoutingHealthStatus:
      enum:
        - match
        - no_match
        - partial
        - "null"
      type: string
    RoutingHealthAction:
      type: object
      properties:
        action:
          enum:
            - add
            - delete
            - inform
          type: string
        asns:
          type: array
          items:
            type: integer
    RoutingHealthActionIRR:
      type: object
      properties:
        action:
          enum:
            - add
            - delete
            - inform
          type: string
        asns:
          type: array
          items:
            $ref: "#/components/schemas/RoutingHealthASNIRR"
    RoutingHealthASNIRR:
      type: object
      properties:
        origin:
          type: integer
        target:
          type: string
    CacheDerrived:
      type: object
      properties:
        registrar:
          type: string
    PrefixSearch:
      type: object
      properties:
        notation:
          $ref: "#/components/schemas/Filter"
        internalMetadata:
          $ref: "#/components/schemas/Filter"
        externalMetadata:
          $ref: "#/components/schemas/Filter"
        holderMetadata:
          $ref: "#/components/schemas/Filter"
        geodata:
          $ref: "#/components/schemas/Filter"
        whois:
          $ref: "#/components/schemas/Filter"
        bgp:
          $ref: "#/components/schemas/Filter"
        rpki:
          $ref: "#/components/schemas/Filter"
        routes:
          $ref: "#/components/schemas/Filter"
        routingHealth:
          $ref: "#/components/schemas/Filter"
        cacheDerrived:
          $ref: "#/components/schemas/Filter"
        offset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
        sort:
          type: string
          description: "Sort order for the returned items. Keys must be provided in a single string, separated by `,`. Order determines sorting priority. Adding `-` in front of the key enables DESCENDING sort. Supported keys: [`notation`, `ipNet`]. To achieve correct \"IP sort\" use `ipNet`."
        fields:
          type: array
          items:
            type: string
          description: "array of prefix object fields to return in response. Supports sub-object projection by using `.`, i.e.: `geodata.provider`. **NOTE**: `internalMetadata` does not fully support sub-object field projection and will always return entire structure, with non-requested fields initialized with default type values (i.e. booleans will be equal to `FALSE` and strings to `\"\"`), so it is advised to always request entire `internalMetadata` to avoid data analysis inconsistencies."
    PrefixHolderUpdateMetadataRequest:
      required:
        - metadata
      type: object
      properties:
        metadata:
          type: object
          description: "A map to hold the metadata. Map keys can only contain following symbols: [A-Z, a-z, 0-9, -, _]"
    PrefixesHolderUpdateMetadataRequest:
      type: array
      items:
        $ref: "#/components/schemas/PrefixesHolderUpdateMetadataRequest_inner"
    PrefixHolderDeleteMetadataRequest:
      required:
        - metadata
      type: object
      properties:
        metadata:
          type: array
          items:
            type: string
          description: "An array of strings representing metadata keys. Values can only contain following symbols: [A-Z, a-z, 0-9, -, _]"
    PrefixesHolderDeleteMetadataRequest:
      type: array
      items:
        $ref: "#/components/schemas/PrefixesHolderDeleteMetadataRequest_inner"
    PrefixesHolderDeleteMetadataAllRequest:
      type: array
      items:
        $ref: "#/components/schemas/PrefixesHolderDeleteMetadataAllRequest_inner"
    PrefixesHolderMetadataArrayModify:
      type: object
      properties:
        notation:
          type: string
          description: The notation identifier for the metadata array.
        items:
          type: array
          items:
            $ref: "#/components/schemas/PrefixHolderMetadataArrayModifyItem"
    PrefixHolderMetadataArrayModifyItem:
      type: object
      properties:
        pathToArray:
          type: string
          description: The path to the metadata array in the holder.
        elements:
          type: array
          items:
            type: object
          description: The elements to add to the array.
        position:
          type: integer
          description: The position at which to add elements in the array. Only works with push. Optional.
    PrefixesHolderMetadataArrayModifyRequest:
      type: array
      items:
        $ref: "#/components/schemas/PrefixesHolderMetadataArrayModify"
    Filter:
      required:
        - op
        - vals
      type: object
      properties:
        field:
          type: string
          description: The field to be searched.
        op:
          type: string
          description: The operation to be performed. Possible values include 'or', 'and', 'eq', 'ne', 'lt', 'lte', 'gt', 'gte'.
        vals:
          type: array
          items:
            type: string
          description: The values to be used for the operation.
        children:
          type: array
          items:
            $ref: "#/components/schemas/Filter"
          description: An array of child filters, if any.
    IPNet:
      type: object
      properties:
        ip:
          type: string
        mask:
          type: string
    Error:
      type: object
      properties:
        status:
          type: string
        code:
          type: integer
          format: int64
        error:
          type: string
    Metadata:
      type: object
      properties:
        limit:
          type: integer
        offset:
          type: integer
    PrefixSortEnum:
      enum:
        - 0
        - 1
        - 2
      type: integer
      description: "0: Sort by prefix length not applied (default) 1: Sort in ascending order of prefix length 2: Sort in descending order of prefix length"
    PrefixesHolderUpdateMetadataRequest_inner:
      required:
        - metadata
        - notation
      type: object
      properties:
        notation:
          type: string
          description: A string field representing the notation.
        metadata:
          type: object
          description: "A map to hold the metadata. Map keys can only contain following symbols: [A-Z, a-z, 0-9, -, _]"
    PrefixesHolderDeleteMetadataRequest_inner:
      required:
        - metadata
        - notation
      type: object
      properties:
        notation:
          type: string
          description: A string field representing the notation.
        metadata:
          type: array
          items:
            type: string
          description: "An array of strings representing metadata keys. Values can only contain following symbols: [A-Z, a-z, 0-9, -, _]"
    PrefixesHolderDeleteMetadataAllRequest_inner:
      required:
        - notation
      type: object
      properties:
        notation:
          type: string
          description: A string field representing the notation.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
tags:
  - name: prefixes
  - name: prefixes-metadata
  - name: prefixes-metadata-notation
  - name: prefixes-metadata-array
  - name: prefixes-metadata-array-notation
security:
  - bearerAuth: []
