Print Hive Hosts API

Host management endpoints

GitHub OpenAPI

Operations 15

GET /v1/hosts/printer-assignments Get printer assignments for the organization #
POST /v1/hosts/rebalance Rebalance printers across hosts #
POST /v1/hosts/register Register a host #
PATCH /v1/hosts/{id}/last-seen Update host last seen #
GET /v1/hosts/{id}/printer-assignments Get printer assignments #
POST /v1/hosts/assign-printer Create hosts assign printer #
DELETE /v1/hosts/printer-assignment/{printer_id}/{host_id} Delete hosts printer assignment by printer id by host id #
GET /v1/hosts/{host_id}/credentials Get node credentials #
GET /v1/hosts/assignment-attempts/by-key Get hosts assignment attempts by key #
POST /v1/hosts/assignment-attempts/move Create hosts assignment attempts move #
GET /v1/hosts/assignment-attempts/{attemptId} Get hosts assignment attempts by attempt id #
POST /v1/hosts/assignment-attempts/{attemptId}/retry Create hosts assignment attempts by attempt id retry #
POST /v1/hosts/{hostId}/update-attempts/claim Create hosts by host id update attempts claim #
POST /v1/hosts/{hostId}/update-attempts/{attemptId}/observations Create hosts by host id update attempts by attempt id observations #
GET /v1/farm-connectivity Printer connectivity by fault layer for the organization #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/printhiv3d-com:printhiv3d-com-hosts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

printhiv3d-com-hosts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Print Hive API Documentation Hosts API
  description: 'REST API for the Print Hive print farm management platform: printers, print jobs, models, materials, inventory, smart queue, and integrations.'
  version: 1.0.0
servers:
- url: https://api.printhiv3d.com
  description: Production
tags:
- name: Hosts
  description: Host management endpoints
paths:
  /v1/hosts/printer-assignments:
    get:
      summary: Get printer assignments for the organization
      tags:
      - Hosts
      description: Get the Host that holds each assigned printer in the organization. A failed or truncated lookup answers 500.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                  - printer_id
                  - host_id
                  properties:
                    printer_id:
                      type: string
                    host_id:
                      type: string
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
      operationId: getV1HostsPrinterAssignments
      x-operation-id-source: derived
  /v1/hosts/rebalance:
    post:
      summary: Rebalance printers across hosts
      tags:
      - Hosts
      description: Compute load imbalances across hive-link nodes and move printers to balance load. Accepts API key auth (org derived from key) or Bearer JWT auth (organizationId required in body, membership verified).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                organizationId:
                  type: string
                idempotencyKey:
                  type: string
                  minLength: 1
                  maxLength: 80
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  plan:
                    type: object
                    properties:
                      moves:
                        type: array
                        items:
                          type: object
                      reason:
                        type: string
                  result:
                    type: object
                    properties:
                      executed:
                        type: number
                      succeeded:
                        type: number
                      pending:
                        type: number
                      failed:
                        type: number
                      moves:
                        type: array
                        items:
                          type: object
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      operationId: postV1HostsRebalance
      x-operation-id-source: derived
  /v1/hosts/register:
    post:
      summary: Register a host
      tags:
      - Hosts
      description: Register a new host or update an existing one
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - hostname
              properties:
                hostname:
                  type: string
                name:
                  type: string
                organization_id:
                  type: string
                organizationId:
                  type: string
                  description: Organization ID (optional, defaults to user's primary organization)
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  hostname:
                    type: string
                  organization_id:
                    type:
                    - string
                    - 'null'
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  last_seen_at:
                    type:
                    - string
                    - 'null'
                  enabled:
                    type: boolean
                  api_key:
                    type: string
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: postV1HostsRegister
      x-operation-id-source: derived
  /v1/hosts/{id}/last-seen:
    patch:
      summary: Update host last seen
      tags:
      - Hosts
      description: Update the last seen timestamp for a host
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                connected_printer_ids:
                  type: array
                  items:
                    type: string
                connected_printers:
                  type: array
                  items:
                    type: object
                    required:
                    - id
                    - status
                    properties:
                      id:
                        type: string
                      status:
                        type: string
                connected_printer_assignments:
                  type: array
                  items:
                    type: object
                    required:
                    - printer_id
                    - assignment_epoch
                    additionalProperties: false
                    properties:
                      printer_id:
                        type: string
                      assignment_epoch:
                        type: integer
                        minimum: 1
                        maximum: 9007199254740991
                      sessionProof:
                        type: object
                        required:
                        - installationId
                        - incarnationId
                        - generation
                        - localLockGeneration
                        - installationCapabilityHash
                        additionalProperties: false
                        properties:
                          installationId:
                            type: string
                            format: uuid
                          incarnationId:
                            type: string
                            format: uuid
                          generation:
                            type: integer
                            minimum: 1
                            maximum: 9007199254740991
                          localLockGeneration:
                            type: integer
                            minimum: 1
                            maximum: 9007199254740991
                          installationCapabilityHash:
                            type: string
                            pattern: ^[0-9a-f]{64}$
                discovered_printers:
                  type: array
                  items:
                    type: object
                    required:
                    - ip
                    - name
                    properties:
                      serial:
                        type: string
                      ip:
                        type: string
                      name:
                        type: string
                      model:
                        type: string
                      discoveryMethod:
                        type: string
                network_subnets:
                  type: array
                  items:
                    type: string
                  maxItems: 32
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  leaseRenewals:
                    type: object
                    required:
                    - version
                    - renewedPrinterIds
                    - reclaimedAssignments
                    - stalePrinterIds
                    properties:
                      version:
                        type: integer
                        enum:
                        - 1
                      renewedPrinterIds:
                        type: array
                        items:
                          type: string
                      reclaimedAssignments:
                        type: array
                        items:
                          type: object
                          required:
                          - printerId
                          - assignmentEpoch
                          properties:
                            printerId:
                              type: string
                            assignmentEpoch:
                              type: integer
                              minimum: 1
                              maximum: 9007199254740991
                      stalePrinterIds:
                        type: array
                        items:
                          type: string
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: patchV1HostsByIdLastSeen
      x-operation-id-source: derived
  /v1/hosts/{id}/printer-assignments:
    get:
      summary: Get printer assignments
      tags:
      - Hosts
      description: Get all printer assignments for a host
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                  - assignment_epoch
                  properties:
                    id:
                      type: string
                    printer_id:
                      type: string
                    host_id:
                      type: string
                    organization_id:
                      type:
                      - string
                      - 'null'
                    lease_host_id:
                      type:
                      - string
                      - 'null'
                    assignment_epoch:
                      type: integer
                      minimum: 1
                      maximum: 9007199254740991
                    lease_expires_at:
                      type:
                      - string
                      - 'null'
                    connection_state:
                      type:
                      - string
                      - 'null'
                    created_at:
                      type: string
                    updated_at:
                      type: string
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getV1HostsByIdPrinterAssignments
      x-operation-id-source: derived
  /v1/hosts/assign-printer:
    post:
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Hosts
      summary: Create hosts assign printer
      x-summary-source: derived
      operationId: postV1HostsAssignPrinter
      x-operation-id-source: derived
  /v1/hosts/printer-assignment/{printer_id}/{host_id}:
    delete:
      parameters:
      - schema:
          type: string
        in: path
        name: printer_id
        required: true
      - schema:
          type: string
        in: path
        name: host_id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Hosts
      summary: Delete hosts printer assignment by printer id by host id
      x-summary-source: derived
      operationId: deleteV1HostsPrinterAssignmentByPrinterIdByHostId
      x-operation-id-source: derived
  /v1/hosts/{host_id}/credentials:
    get:
      summary: Get node credentials
      tags:
      - Hosts
      description: Retrieve the username and decrypted password for a host node. Requires admin-scoped API key.
      parameters:
      - schema:
          type: string
        in: path
        name: host_id
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  username:
                    type: string
                  password:
                    type: string
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getV1HostsByHostIdCredentials
      x-operation-id-source: derived
  /v1/hosts/assignment-attempts/by-key:
    get:
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Hosts
      summary: Get hosts assignment attempts by key
      x-summary-source: derived
      operationId: getV1HostsAssignmentAttemptsByKey
      x-operation-id-source: derived
  /v1/hosts/assignment-attempts/move:
    post:
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Hosts
      summary: Create hosts assignment attempts move
      x-summary-source: derived
      operationId: postV1HostsAssignmentAttemptsMove
      x-operation-id-source: derived
  /v1/hosts/assignment-attempts/{attemptId}:
    get:
      parameters:
      - schema:
          type: string
        in: path
        name: attemptId
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Hosts
      summary: Get hosts assignment attempts by attempt id
      x-summary-source: derived
      operationId: getV1HostsAssignmentAttemptsByAttemptId
      x-operation-id-source: derived
  /v1/hosts/assignment-attempts/{attemptId}/retry:
    post:
      parameters:
      - schema:
          type: string
        in: path
        name: attemptId
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Hosts
      summary: Create hosts assignment attempts by attempt id retry
      x-summary-source: derived
      operationId: postV1HostsAssignmentAttemptsByAttemptIdRetry
      x-operation-id-source: derived
  /v1/hosts/{hostId}/update-attempts/claim:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - currentVersion
              properties:
                currentVersion:
                  pattern: ^v?\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$
                  type: string
      parameters:
      - schema:
          format: uuid
          type: string
        in: path
        name: hostId
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Hosts
      summary: Create hosts by host id update attempts claim
      x-summary-source: derived
      operationId: postV1HostsByHostIdUpdateAttemptsClaim
      x-operation-id-source: derived
  /v1/hosts/{hostId}/update-attempts/{attemptId}/observations:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - claimGeneration
              - revision
              - stage
              - message
              properties:
                claimGeneration:
                  format: uuid
                  type: string
                revision:
                  minimum: 1
                  type: integer
                stage:
                  anyOf:
                  - type: string
                    enum:
                    - requested
                  - type: string
                    enum:
                    - claimed
                  - type: string
                    enum:
                    - downloading
                  - type: string
                    enum:
                    - verifying
                  - type: string
                    enum:
                    - waiting_for_work
                  - type: string
                    enum:
                    - activating
                  - type: string
                    enum:
                    - restart_expected
                  - type: string
                    enum:
                    - probation
                  - type: string
                    enum:
                    - rolling_back
                message:
                  minLength: 1
                  maxLength: 500
                  type: string
                blockers:
                  anyOf:
                  - type: object
                    required:
                    - kind
                    properties:
                      kind:
                        type: string
                        enum:
                        - none
                  - type: object
                    required:
                    - kind
                    - printJobs
                    - printerTasks
                    properties:
                      kind:
                        type: string
                        enum:
                        - processor_work
                      printJobs:
                        minimum: 0
                        type: integer
                      printerTasks:
                        minimum: 0
                        type: integer
                  - type: object
                    required:
                    - kind
                    - subtasks
                    properties:
                      kind:
                        type: string
                        enum:
                        - subtasks
                      subtasks:
                        minimum: 0
                        type: integer
                  - type: object
                    required:
                    - kind
                    - filePreparations
                    properties:
                      kind:
                        type: string
                        enum:
                        - file_preparations
                      filePreparations:
                        minimum: 0
                        type: integer
                  - type: object
                    required:
                    - kind
                    - uploads
                    properties:
                      kind:
                        type: string
                        enum:
                        - uploads
                      uploads:
                        minimum: 0
                        type: integer
                progressCompleted:
                  anyOf:
                  - minimum: 0
                    type: integer
                  - type: 'null'
                progressTotal:
                  anyOf:
                  - minimum: 0
                    type: integer
                  - type: 'null'
                progressUnit:
                  anyOf:
                  - maxLength: 40
                    type: string
                  - type: 'null'
                outcome:
                  anyOf:
                  - type: string
                    enum:
                    - completed
                  - type: string
                    enum:
                    - failed
                  - type: 'null'
                errorCode:
                  anyOf:
                  - maxLength: 80
                    type: string
                  - type: 'null'
                errorDetail:
                  anyOf:
                  - maxLength: 1000
                    type: string
                  - type: 'null'
      parameters:
      - schema:
          format: uuid
          type: string
        in: path
        name: hostId
        required: true
      - schema:
          format: uuid
          type: string
        in: path
        name: attemptId
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Hosts
      summary: Create hosts by host id update attempts by attempt id observations
      x-summary-source: derived
      operationId: postV1HostsByHostIdUpdateAttemptsByAttemptIdObservations
      x-operation-id-source: derived
  /v1/farm-connectivity:
    get:
      summary: Printer connectivity by fault layer for the organization
      tags:
      - Hosts
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getV1FarmConnectivity
      x-operation-id-source: derived
components:
  schemas:
    Error:
      type: object
      description: 'Consistent Print Hive API error body: a machine-readable error code and a human-readable message.'
      properties:
        error:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable explanation of the failure.
      required:
      - error
      - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    apiKey:
      type: apiKey
      in: header
      name: x-api-key