NetBird · Capability

NetBird REST API — Peers

NetBird REST API — Peers. 6 operations. Lead operation: List all Peers. Self-contained Naftiko capability covering one Netbird business surface.

Run with Naftiko NetbirdPeers

What You Can Do

GET
Get — List all Peers
/v1/api/peers
GET
Get — Retrieve a Peer
/v1/api/peers/{peerid}
PUT
Put — Update a Peer
/v1/api/peers/{peerid}
DELETE
Delete — Delete a Peer
/v1/api/peers/{peerid}
GET
Get — List accessible Peers
/v1/api/peers/{peerid}/accessible-peers
POST
Post — Create a Temporary Access Peer
/v1/api/peers/{peerid}/temporary-access

MCP Tools

list-all-peers

List all Peers

read-only idempotent
retrieve-peer

Retrieve a Peer

read-only idempotent
update-peer

Update a Peer

idempotent
delete-peer

Delete a Peer

idempotent
list-accessible-peers

List accessible Peers

read-only idempotent
create-temporary-access-peer

Create a Temporary Access Peer

Capability Spec

netbird-peers.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: NetBird REST API — Peers
  description: 'NetBird REST API — Peers. 6 operations. Lead operation: List all Peers. Self-contained Naftiko capability
    covering one Netbird business surface.'
  tags:
  - Netbird
  - Peers
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    NETBIRD_API_KEY: NETBIRD_API_KEY
capability:
  consumes:
  - type: http
    namespace: netbird-peers
    baseUri: https://api.netbird.io
    description: NetBird REST API — Peers business capability. Self-contained, no shared references.
    resources:
    - name: api-peers
      path: /api/peers
      operations:
      - name: get
        method: GET
        description: List all Peers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: query
          type: string
          description: Filter peers by name
        - name: ip
          in: query
          type: string
          description: Filter peers by IP address
    - name: api-peers-peerId
      path: /api/peers/{peerId}
      operations:
      - name: get
        method: GET
        description: Retrieve a Peer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: peerId
          in: path
          type: string
          description: The unique identifier of a peer
          required: true
      - name: put
        method: PUT
        description: Update a Peer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: peerId
          in: path
          type: string
          description: The unique identifier of a peer
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: delete
        method: DELETE
        description: Delete a Peer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: peerId
          in: path
          type: string
          description: The unique identifier of a peer
          required: true
    - name: api-peers-peerId-accessible-peers
      path: /api/peers/{peerId}/accessible-peers
      operations:
      - name: get
        method: GET
        description: List accessible Peers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: peerId
          in: path
          type: string
          description: The unique identifier of a peer
          required: true
    - name: api-peers-peerId-temporary-access
      path: /api/peers/{peerId}/temporary-access
      operations:
      - name: post
        method: POST
        description: Create a Temporary Access Peer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: peerId
          in: path
          type: string
          description: The unique identifier of a peer
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: bearer
      token: '{{env.NETBIRD_API_KEY}}'
  exposes:
  - type: rest
    namespace: netbird-peers-rest
    port: 8080
    description: REST adapter for NetBird REST API — Peers. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/peers
      name: api-peers
      description: REST surface for api-peers.
      operations:
      - method: GET
        name: get
        description: List all Peers
        call: netbird-peers.get
        with:
          name: rest.name
          ip: rest.ip
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/peers/{peerid}
      name: api-peers-peerid
      description: REST surface for api-peers-peerId.
      operations:
      - method: GET
        name: get
        description: Retrieve a Peer
        call: netbird-peers.get
        with:
          peerId: rest.peerId
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Update a Peer
        call: netbird-peers.put
        with:
          peerId: rest.peerId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: Delete a Peer
        call: netbird-peers.delete
        with:
          peerId: rest.peerId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/peers/{peerid}/accessible-peers
      name: api-peers-peerid-accessible-peers
      description: REST surface for api-peers-peerId-accessible-peers.
      operations:
      - method: GET
        name: get
        description: List accessible Peers
        call: netbird-peers.get
        with:
          peerId: rest.peerId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/peers/{peerid}/temporary-access
      name: api-peers-peerid-temporary-access
      description: REST surface for api-peers-peerId-temporary-access.
      operations:
      - method: POST
        name: post
        description: Create a Temporary Access Peer
        call: netbird-peers.post
        with:
          peerId: rest.peerId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: netbird-peers-mcp
    port: 9090
    transport: http
    description: MCP adapter for NetBird REST API — Peers. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-all-peers
      description: List all Peers
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: netbird-peers.get
      with:
        name: tools.name
        ip: tools.ip
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-peer
      description: Retrieve a Peer
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: netbird-peers.get
      with:
        peerId: tools.peerId
      outputParameters:
      - type: object
        mapping: $.
    - name: update-peer
      description: Update a Peer
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: netbird-peers.put
      with:
        peerId: tools.peerId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-peer
      description: Delete a Peer
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: netbird-peers.delete
      with:
        peerId: tools.peerId
      outputParameters:
      - type: object
        mapping: $.
    - name: list-accessible-peers
      description: List accessible Peers
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: netbird-peers.get
      with:
        peerId: tools.peerId
      outputParameters:
      - type: object
        mapping: $.
    - name: create-temporary-access-peer
      description: Create a Temporary Access Peer
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: netbird-peers.post
      with:
        peerId: tools.peerId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.