Print Hive Sub Tasks API

Sub-task management for print jobs

GitHub OpenAPI

Operations 20

POST /v1/jobs/{jobId}/subtasks Create jobs by job id subtasks #
GET /v1/jobs/{jobId}/subtasks Get jobs by job id subtasks #
GET /v1/jobs/{jobId}/subtask-runs/{subtaskId}/review Get jobs by job id subtask runs by subtask id review #
GET /v1/jobs/{jobId}/subtask-run-reviews Get jobs by job id subtask run reviews #
PATCH /v1/subtasks/{id} Update subtasks by id #
POST /v1/subtasks/{id}/execute Create subtasks by id execute #
POST /v1/subtasks/{id}/retry Create subtasks by id retry #
POST /v1/subtasks/{id}/skip Create subtasks by id skip #
GET /v1/printers/{id}/pending-subtasks Get printers by id pending subtasks #
GET /v1/jobs/{jobId}/can-start Get jobs by job id can start #
POST /v1/admin/subtask-test-runs Create admin subtask test runs #
GET /v1/admin/subtask-runs Get admin subtask runs #
GET /v1/admin/subtask-runs/{subtaskId} Get admin subtask runs by subtask id #
POST /v1/admin/subtask-runs/{subtaskId}/feedback Create admin subtask runs by subtask id feedback #
POST /v1/internal/subtasks/{id}/frames Create internal subtasks by id frames #
POST /v1/internal/subtasks/{id}/events Create internal subtasks by id events #
POST /v1/internal/subtasks/{id}/claim-bed-clear-execution Create internal subtasks by id claim bed clear execution #
POST /v1/internal/subtasks/{id}/consume-supervised-arm Create internal subtasks by id consume supervised arm #
POST /v1/internal/subtasks/{id}/consume-vision-guided-supervised-arm Create internal subtasks by id consume vision guided supervised arm #
POST /v1/internal/subtasks/{id}/result Create internal subtasks by id result #

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-sub-tasks-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-sub-tasks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Print Hive API Documentation Sub Tasks 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: Sub-Tasks
  description: Sub-task management for print jobs
paths:
  /v1/jobs/{jobId}/subtasks:
    post:
      tags:
      - Sub-Tasks
      description: Create sub-tasks for a print job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tasks:
                  type: array
                  items:
                    type: object
                    properties:
                      task_type:
                        type: string
                        enum:
                        - empty_bed_detection
                        - temperature_check
                        - gcode_command
                        - ai_detection
                        - capture_frame
                        - cooldown_check
                        - printer_ready_check
                        - file_upload
                        - start_print
                        - bed_clear
                        - wait_for_temperature
                        - reheat
                        - webhook_signal
                        - mqtt_signal
                        - prime_nozzle
                        - verify_bed_clear
                        - post_complete_bed_detection
                        - bed_occupancy_verification
                        - bed_occupancy_reveal_calibration
                        - vision_guided_bed_clear
                      phase:
                        type: string
                        enum:
                        - pre
                        - in_flight
                        - post
                      is_required:
                        type: boolean
                      max_retries:
                        type: number
                      timeout_ms:
                        type: number
                      parameters:
                        type: object
                      schedule_interval_ms:
                        type: number
                    required:
                    - task_type
                    - phase
              required:
              - tasks
      parameters:
      - schema:
          type: string
        in: path
        name: jobId
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  subtasks:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        task_type:
                          type: string
                        phase:
                          type: string
                        status:
                          type: string
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create jobs by job id subtasks
      x-summary-source: derived
      operationId: postV1JobsByJobIdSubtasks
      x-operation-id-source: derived
    get:
      tags:
      - Sub-Tasks
      description: List sub-tasks for a print job
      parameters:
      - schema:
          type: string
          enum:
          - pre
          - in_flight
          - post
        in: query
        name: phase
        required: false
      - schema:
          type: string
          enum:
          - QUEUED
          - IN_PROGRESS
          - FINISHED
          - FAILED
          - SKIPPED
        in: query
        name: status
        required: false
      - schema:
          type: string
        in: path
        name: jobId
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get jobs by job id subtasks
      x-summary-source: derived
      operationId: getV1JobsByJobIdSubtasks
      x-operation-id-source: derived
  /v1/jobs/{jobId}/subtask-runs/{subtaskId}/review:
    get:
      tags:
      - Sub-Tasks
      description: Get job-scoped subtask run review details
      parameters:
      - schema:
          type: string
        in: query
        name: organizationId
        required: false
      - schema:
          type: string
        in: path
        name: jobId
        required: true
      - schema:
          type: string
        in: path
        name: subtaskId
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get jobs by job id subtask runs by subtask id review
      x-summary-source: derived
      operationId: getV1JobsByJobIdSubtaskRunsBySubtaskIdReview
      x-operation-id-source: derived
  /v1/jobs/{jobId}/subtask-run-reviews:
    get:
      tags:
      - Sub-Tasks
      description: Get review details for a job's subtask runs in one call
      parameters:
      - schema:
          type: string
        in: query
        name: organizationId
        required: false
      - schema:
          type: string
        in: query
        name: taskType
        required: false
      - schema:
          type: string
        in: path
        name: jobId
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get jobs by job id subtask run reviews
      x-summary-source: derived
      operationId: getV1JobsByJobIdSubtaskRunReviews
      x-operation-id-source: derived
  /v1/subtasks/{id}:
    patch:
      tags:
      - Sub-Tasks
      description: Update a sub-task status or result
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                  - QUEUED
                  - IN_PROGRESS
                  - FINISHED
                  - FAILED
                  - SKIPPED
                result:
                  type: object
                error_message:
                  type: string
                retry_count:
                  type: number
                claim_generation:
                  type: string
                  format: uuid
              if:
                required:
                - claim_generation
              then:
                required:
                - status
                not:
                  anyOf:
                  - required:
                    - result
                  - required:
                    - retry_count
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Update subtasks by id
      x-summary-source: derived
      operationId: patchV1SubtasksById
      x-operation-id-source: derived
  /v1/subtasks/{id}/execute:
    post:
      tags:
      - Sub-Tasks
      description: Manually trigger sub-task execution
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create subtasks by id execute
      x-summary-source: derived
      operationId: postV1SubtasksByIdExecute
      x-operation-id-source: derived
  /v1/subtasks/{id}/retry:
    post:
      tags:
      - Sub-Tasks
      description: Retry a failed sub-task
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create subtasks by id retry
      x-summary-source: derived
      operationId: postV1SubtasksByIdRetry
      x-operation-id-source: derived
  /v1/subtasks/{id}/skip:
    post:
      tags:
      - Sub-Tasks
      description: Skip a failed sub-task
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create subtasks by id skip
      x-summary-source: derived
      operationId: postV1SubtasksByIdSkip
      x-operation-id-source: derived
  /v1/printers/{id}/pending-subtasks:
    get:
      tags:
      - Sub-Tasks
      description: Get pending sub-tasks for a printer
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get printers by id pending subtasks
      x-summary-source: derived
      operationId: getV1PrintersByIdPendingSubtasks
      x-operation-id-source: derived
  /v1/jobs/{jobId}/can-start:
    get:
      tags:
      - Sub-Tasks
      description: Check if job can start (all required pre-tasks complete)
      parameters:
      - schema:
          type: string
        in: path
        name: jobId
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get jobs by job id can start
      x-summary-source: derived
      operationId: getV1JobsByJobIdCanStart
      x-operation-id-source: derived
  /v1/admin/subtask-test-runs:
    post:
      tags:
      - Sub-Tasks
      description: Create an admin-triggered production-path subtask test run
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                task_type:
                  type: string
                  minLength: 1
                  maxLength: 100
                job_id:
                  type: number
                printer_id:
                  type: string
                  minLength: 1
                  maxLength: 100
                inspection_z_buffer:
                  type: number
                empty_bed_threshold:
                  type: number
                max_attempts:
                  type: number
                motion_confirmed:
                  type: boolean
                required_device_roles:
                  type: array
                  maxItems: 16
                  items:
                    type: string
                    minLength: 1
                    maxLength: 64
              required:
              - task_type
              - job_id
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create admin subtask test runs
      x-summary-source: derived
      operationId: postV1AdminSubtaskTestRuns
      x-operation-id-source: derived
  /v1/admin/subtask-runs:
    get:
      tags:
      - Sub-Tasks
      description: List admin-visible subtask runs
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get admin subtask runs
      x-summary-source: derived
      operationId: getV1AdminSubtaskRuns
      x-operation-id-source: derived
  /v1/admin/subtask-runs/{subtaskId}:
    get:
      tags:
      - Sub-Tasks
      description: Get subtask run review details
      parameters:
      - schema:
          type: string
        in: path
        name: subtaskId
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get admin subtask runs by subtask id
      x-summary-source: derived
      operationId: getV1AdminSubtaskRunsBySubtaskId
      x-operation-id-source: derived
  /v1/admin/subtask-runs/{subtaskId}/feedback:
    post:
      tags:
      - Sub-Tasks
      description: Record run-level feedback or frame correction for a subtask run
      parameters:
      - schema:
          type: string
        in: path
        name: subtaskId
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create admin subtask runs by subtask id feedback
      x-summary-source: derived
      operationId: postV1AdminSubtaskRunsBySubtaskIdFeedback
      x-operation-id-source: derived
  /v1/internal/subtasks/{id}/frames:
    post:
      tags:
      - Sub-Tasks
      description: Internal endpoint for persisting subtask frame captures through the API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                frame_base64:
                  type: string
                content_type:
                  type: string
                frame_timestamp:
                  type: string
                metadata:
                  type: object
                model_predicted_label:
                  type:
                  - string
                  - 'null'
                model_confidence:
                  type:
                  - number
                  - 'null'
                model_version:
                  type:
                  - string
                  - 'null'
                capture_trigger:
                  type:
                  - string
                  - 'null'
                  enum:
                  - clearing_pre
                  - clearing_step
                  - clearing_post
                  - null
              required:
              - frame_base64
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create internal subtasks by id frames
      x-summary-source: derived
      operationId: postV1InternalSubtasksByIdFrames
      x-operation-id-source: derived
  /v1/internal/subtasks/{id}/events:
    post:
      tags:
      - Sub-Tasks
      description: Internal endpoint for appending durable subtask timeline events
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create internal subtasks by id events
      x-summary-source: derived
      operationId: postV1InternalSubtasksByIdEvents
      x-operation-id-source: derived
  /v1/internal/subtasks/{id}/claim-bed-clear-execution:
    post:
      tags:
      - Sub-Tasks
      description: Atomically claim one current BED_CLEAR subtask before motion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                job_id:
                  type: integer
                  minimum: 1
                printer_id:
                  type: string
                  format: uuid
                expected_model_id:
                  type: string
                  minLength: 1
                expected_hardware_profile:
                  type: string
                  enum:
                  - none
                  - farmloop_stage_1
                authorization_mode:
                  type: string
                  enum:
                  - production
                  - supervised
                expected_rollout_evidence:
                  anyOf:
                  - type: object
                  - type: 'null'
                supervised_run_id:
                  anyOf:
                  - type: string
                    minLength: 1
                  - type: 'null'
                expected_plan_hash:
                  anyOf:
                  - type: string
                    pattern: ^[a-f0-9]{64}$
                  - type: 'null'
              required:
              - job_id
              - printer_id
              - expected_model_id
              - expected_hardware_profile
              - authorization_mode
              - expected_rollout_evidence
              - supervised_run_id
              - expected_plan_hash
      parameters:
      - schema:
          type: string
          format: uuid
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create internal subtasks by id claim bed clear execution
      x-summary-source: derived
      operationId: postV1InternalSubtasksByIdClaimBedClearExecution
      x-operation-id-source: derived
  /v1/internal/subtasks/{id}/consume-supervised-arm:
    post:
      tags:
      - Sub-Tasks
      description: Atomically consume one human-armed Stage 1 validation token before motion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                run_id:
                  type: string
                  minLength: 1
              required:
              - run_id
      parameters:
      - schema:
          type: string
          format: uuid
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create internal subtasks by id consume supervised arm
      x-summary-source: derived
      operationId: postV1InternalSubtasksByIdConsumeSupervisedArm
      x-operation-id-source: derived
  /v1/internal/subtasks/{id}/consume-vision-guided-supervised-arm:
    post:
      tags:
      - Sub-Tasks
      description: Atomically consume one human-armed supervised Vision Guided Bed Clear token before motion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                run_id:
                  type: string
                  minLength: 1
              required:
              - run_id
      parameters:
      - schema:
          type: string
          format: uuid
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create internal subtasks by id consume vision guided supervised arm
      x-summary-source: derived
      operationId: postV1InternalSubtasksByIdConsumeVisionGuidedSupervisedArm
      x-operation-id-source: derived
  /v1/internal/subtasks/{id}/result:
    post:
      tags:
      - Sub-Tasks
      description: Internal endpoint for updating subtask results from hive-link
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                  - FINISHED
                  - FAILED
                result:
                  type: object
                error:
                  type: string
                executionTimeMs:
                  type: number
                dispatchLeaseToken:
                  type: string
                  format: uuid
                claim_generation:
                  type: string
                  format: uuid
              required:
              - status
              - executionTimeMs
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
        default:
          description: Unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create internal subtasks by id result
      x-summary-source: derived
      operationId: postV1InternalSubtasksByIdResult
      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