ZeroTier peer API

peer status

OpenAPI Specification

zerotier-peer-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: 'ZeroTier Central Network Management Portal API.<p>All API requests must have an API token header specified in the <code>Authorization: token xxxxx</code> format.  You can generate your API key by logging into <a href="https://my.zerotier.com">ZeroTier Central</a> and creating a token on the Account page.</p><p>eg. <code>curl -X GET -H "Authorization: token xxxxx" https://api.zerotier.com/api/v1/network</code></p><p><h3>Rate Limiting</h3></p><p>The ZeroTier Central API implements rate limiting.  Paid users are limited to 100 requests per second.  Free users are limited to 20 requests per second.</p> <p> You can get the OpenAPI spec here as well: <code>https://docs.zerotier.com/api/central/ref-v1.json</code></p>'
  version: v1
  title: ZeroTier Central controller peer API
  contact:
    name: ZeroTier Support Discussion Forum
    url: https://discuss.zerotier.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.zerotier.com/api/v1
  description: Production Server
security:
- tokenAuth: []
tags:
- name: peer
  description: peer status
paths:
  /peer:
    get:
      tags:
      - peer
      summary: Get all peers.
      operationId: getPeers
      responses:
        '200':
          description: Array of Peer objects
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Peer'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
  /peer/{address}:
    get:
      tags:
      - peer
      summary: Get information about a specific peer by Node ID.
      operationId: getPeer
      parameters:
      - name: address
        description: ZeroTier address of the peer to get
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Peer object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Peer'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
components:
  schemas:
    Peer:
      type: object
      properties:
        address:
          type: string
          example: 992fcf1db7
        isBonded:
          type: boolean
          example: false
        latency:
          type: integer
          example: 40
        paths:
          type: array
          items:
            type: object
            properties:
              active:
                type: boolean
              address:
                type: string
                example: 195.181.173.159/9993
              expired:
                type: boolean
                example: false
              lastReceive:
                type: integer
                format: int64
                example: 1618955164580
              lastSend:
                type: integer
                format: int64
                example: 1618955164596
              preferred:
                type: boolean
                example: true
              trustedPathId:
                type: integer
                example: 0
        role:
          type: string
          example: LEAF
        version:
          type: string
          example: 1.6.4
        versionMajor:
          type: integer
          example: 1
        versionMinor:
          type: integer
          example: 6
        versionRev:
          type: integer
          example: 4
  responses:
    UnauthorizedError:
      description: Authorization required.
  securitySchemes:
    tokenAuth:
      type: http
      scheme: token