> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.ipxo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Find master prefixes with subsets metadata

> Returns the master prefixes with subsets metadata based on the provided search criteria



## OpenAPI

````yaml openapi/nethub-data.yaml get /{tenantUUID}/prefixes/subsets/metadata
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
security:
  - bearerAuth: []
tags:
  - name: prefixes
  - name: prefixes-metadata
  - name: prefixes-metadata-notation
  - name: prefixes-metadata-array
  - name: prefixes-metadata-array-notation
paths:
  /{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: organisation
          in: query
          description: >-
            one or more organisations to filter all prefixes by. Filters out
            non-matching subsets as well. Can provide multiple values by using
            the same key.
          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'
              example:
                data:
                  - notation: string
                    ipNet:
                      ip: string
                      mask: string
                    internalMetadata:
                      internal: true
                      readOnly: true
                      master: true
                      prefixLengthLimits:
                        min: 0
                        max: 0
                        exact:
                          - 0
                      holders:
                        - tenantUUID: string
                          projectID: string
                          organisation: string
                          type: 0
                          top: true
                    externalMetadata:
                      key1: value1
                      keyN: valueN
                    holderMetadata:
                      key1: value1
                      keyN: valueN
                    geodata:
                      - provider: string
                        countryName: string
                        countryCode: string
                        cityName: string
                        date: string
                        state: string
                    whois:
                      inetnum: string
                      registrar: string
                      source: string
                      recordActive: true
                      nets:
                        - organisation: string
                          netname: string
                          net_type: string
                          net_handle: string
                          origin_as: string
                          country:
                            - string
                          comment: string
                          created: string
                          last_modified: string
                          record_created: string
                          record_modified: string
                          mnt_by:
                            - string
                          mnt_irt:
                            - string
                          pocs:
                            - handle: string
                              kind: string
                          notify: string
                      domains:
                        - domain: string
                          nservers:
                            - string
                    bgp:
                      peerCount:
                        fullTable: 0
                        active: 0
                      asOrigins:
                        - asn: 0
                          peersSeeing: 0
                      asSetOrigins:
                        - asSet: string
                          peersSeeing: 0
                    rpki:
                      roas:
                        - maxLength: 0
                          asn: string
                          ta: string
                      suggestions:
                        - maxLength: 0
                          asn: string
                          ta: string
                          status: as0
                    routes:
                      - route: string
                        origin: string
                        descr:
                          - string
                        mnt_by:
                          - string
                        changed:
                          - string
                        source: string
                    routingHealth:
                      criticalityStatus: critical
                      bgpStatus: match
                      bgpActions:
                        - action: add
                          asns:
                            - 0
                      rpkiStatus: match
                      rpkiActions:
                        - action: add
                          asns:
                            - 0
                      irrStatus: match
                      irrActions:
                        - action: add
                          asns:
                            - origin: 0
                              target: string
                      irmActions:
                        - action: add
                          asns:
                            - 0
                    cacheDerrived:
                      registrar: string
                    subsets:
                      - notation: string
                        ipNet:
                          ip: string
                          mask: string
                        internalMetadata:
                          internal: true
                          readOnly: true
                          master: true
                          prefixLengthLimits:
                            min: 0
                            max: 0
                            exact:
                              - 0
                          holders:
                            - tenantUUID: string
                              projectID: string
                              organisation: string
                              type: 0
                              top: true
                        externalMetadata:
                          key1: value1
                          keyN: valueN
                        holderMetadata:
                          key1: value1
                          keyN: valueN
                        geodata:
                          - provider: string
                            countryName: string
                            countryCode: string
                            cityName: string
                            date: string
                            state: string
                        whois:
                          inetnum: string
                          registrar: string
                          source: string
                          recordActive: true
                          nets:
                            - organisation: string
                              netname: string
                              net_type: string
                              net_handle: string
                              origin_as: string
                              country:
                                - string
                              comment: string
                              created: string
                              last_modified: string
                              record_created: string
                              record_modified: string
                              mnt_by:
                                - string
                              mnt_irt:
                                - string
                              pocs:
                                - handle: string
                                  kind: string
                              notify: string
                          domains:
                            - domain: string
                              nservers:
                                - string
                        bgp:
                          peerCount:
                            fullTable: 0
                            active: 0
                          asOrigins:
                            - asn: 0
                              peersSeeing: 0
                          asSetOrigins:
                            - asSet: string
                              peersSeeing: 0
                        rpki:
                          roas:
                            - maxLength: 0
                              asn: string
                              ta: string
                          suggestions:
                            - maxLength: 0
                              asn: string
                              ta: string
                              status: as0
                        routes:
                          - route: string
                            origin: string
                            descr:
                              - string
                            mnt_by:
                              - string
                            changed:
                              - string
                            source: string
                        routingHealth:
                          criticalityStatus: critical
                          bgpStatus: match
                          bgpActions:
                            - action: add
                              asns:
                                - 0
                          rpkiStatus: match
                          rpkiActions:
                            - action: add
                              asns:
                                - 0
                          irrStatus: match
                          irrActions:
                            - action: add
                              asns:
                                - origin: 0
                                  target: string
                          irmActions:
                            - action: add
                              asns:
                                - 0
                        cacheDerrived:
                          registrar: string
                metadata:
                  limit: 0
                  offset: 0
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                status: string
                code: 0
                error: string
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                status: string
                code: 0
                error: string
components:
  schemas:
    PrefixHolderSubsetsGetResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PrefixHolderSubsets'
        metadata:
          $ref: '#/components/schemas/Metadata'
    Error:
      type: object
      properties:
        status:
          type: string
        code:
          type: integer
          format: int64
        error:
          type: string
    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'
    Metadata:
      type: object
      properties:
        limit:
          type: integer
        offset:
          type: integer
    IPNet:
      type: object
      properties:
        ip:
          type: string
        mask:
          type: string
    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'
    PrefixComponentExternalMetadata:
      type: object
      additionalProperties:
        type: string
      example:
        key1: value1
        keyN: valueN
    PrefixComponentHolderMetadata:
      type: object
      additionalProperties:
        type: string
      example:
        key1: value1
        keyN: valueN
    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'
    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'
    RPKICache:
      type: object
      properties:
        roas:
          type: array
          items:
            $ref: '#/components/schemas/ROACache'
        suggestions:
          type: array
          items:
            $ref: '#/components/schemas/RPKISuggestion'
    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
    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'
    CacheDerrived:
      type: object
      properties:
        registrar:
          type: string
    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'
    PMPrefixLengthLimits:
      type: object
      properties:
        min:
          type: integer
        max:
          type: integer
        exact:
          type: array
          items:
            type: integer
    PMHolder:
      type: object
      properties:
        tenantUUID:
          type: string
        projectID:
          type: string
        organisation:
          type: string
        type:
          enum:
            - 0
            - 1
          type: integer
          description: >
            `0` indicates `discovery` type, which puts holder and its owned
            prefixes into full automation loop. 

            `1` indicates `analytics` type, which excludes holder and its owned
            prefixes (as long as holder owns them) from automation loop.
        top:
          type: boolean
    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
    WHOISCacheDomain:
      type: object
      properties:
        domain:
          type: string
        nservers:
          type: array
          items:
            type: string
    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
    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
    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'
    WHOISCachePoc:
      type: object
      properties:
        handle:
          type: string
        kind:
          type: string
    RoutingHealthASNIRR:
      type: object
      properties:
        origin:
          type: integer
        target:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````