> ## 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.

# Set Holder Metadata for a single Prefix

> Updates target prefix holder metadata and returns updated prefix.



## OpenAPI

````yaml openapi/nethub-data.yaml patch /{tenantUUID}/prefixes/{notation}/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/{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'
            example:
              metadata: {}
      responses:
        '200':
          description: Updated prefix
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrefixHolder'
              example:
                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
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                status: string
                code: 0
                error: string
        '403':
          description: Forbidden
          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:
    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, -, _]
    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'
    Error:
      type: object
      properties:
        status:
          type: string
        code:
          type: integer
          format: int64
        error:
          type: string
    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
    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

````