Print Hive Files API

File management endpoints

GitHub OpenAPI

Operations 9

GET /v1/files/{fileId}/metadata Get file metadata #
GET /v1/files/{fileId} Download file #
DELETE /v1/files/{fileId} Delete file #
GET /v1/files/{fileId}/download-url Get single-file download URL #
POST /v1/files/{fileId}/restore Restore Model File #
GET /v1/models/{modelId}/files/audit Audit model files #
DELETE /v1/models/{modelId}/files/cleanup Clean up orphaned files #
GET /v1/files/{fileId}/plate-previews Get signed per-plate preview images for a Model File #
GET /v1/files/{fileId}/compatible-printers Get printers ranked by compatibility with a file #

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-files-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-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Print Hive API Documentation Files 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: Files
  description: File management endpoints
paths:
  /v1/files/{fileId}/metadata:
    get:
      summary: Get file metadata
      tags:
      - Files
      description: Retrieves metadata information for a specific file including size, type, and custom metadata
      parameters:
      - schema:
          type: string
        in: query
        name: print_job_id
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: printer_task_id
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: claim_generation
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: printer_task_access_token
        required: false
      - schema:
          type: string
        in: path
        name: fileId
        required: true
        description: The unique identifier of the file
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      responses:
        '200':
          description: File metadata object
          content:
            application/json:
              schema:
                description: File metadata object
                type: object
                required:
                - id
                - file_path
                - file_size
                - file_type
                - filename
                - metadata
                - model_id
                properties:
                  organization_id:
                    type: string
                  parent_file_id:
                    type:
                    - string
                    - 'null'
                  model_name:
                    type:
                    - string
                    - 'null'
                  lifecycle_status:
                    type: string
                    enum:
                    - queued
                    - processing
                    - ready
                    - failed
                  is_printable:
                    type:
                    - boolean
                    - 'null'
                  content_hash:
                    type:
                    - string
                    - 'null'
                  rev:
                    type: number
                  id:
                    type: string
                    description: Unique identifier for the file
                  created_at:
                    type:
                    - string
                    - 'null'
                    format: date-time
                    description: When the file was created
                  created_by:
                    type:
                    - string
                    - 'null'
                    description: User ID who created the file
                  filename:
                    type: string
                    description: Original name of the file
                  file_path:
                    type: string
                    description: Storage path of the file
                  file_type:
                    type: string
                    description: MIME type of the file
                  file_size:
                    type: number
                    description: Size of the file in bytes
                  model_id:
                    type: string
                    description: Associated 3D model ID
                  metadata:
                    type: object
                    additionalProperties: true
                    description: Additional metadata associated with the file
                  activePlateNumber:
                    type: number
                    description: Active plate number
                  project_filaments:
                    type: array
                    description: Filaments used in the project
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Filament ID
                        type:
                          type: string
                          description: Filament type
                        color_hex:
                          type: string
                          description: Filament color
                        color_rgba:
                          type: string
                          description: Filament color RRGGBBAA in Hex format
                        used_m:
                          type: number
                          description: Filament used meters
                        used_g:
                          type: number
                          description: Filament used grams
        '404':
          description: File not found
          content:
            application/json:
              schema:
                description: File not found
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: File not found
                  message:
                    type: string
                    example: The requested file does not exist
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                description: Internal server error
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An error occurred while retrieving the file metadata
      operationId: getV1FilesByFileIdMetadata
      x-operation-id-source: derived
  /v1/files/{fileId}:
    get:
      summary: Download file
      tags:
      - Files
      description: Downloads the actual file content. The response will be the file stream with appropriate content-type headers.
      parameters:
      - schema:
          type: string
        in: query
        name: print_job_id
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: printer_task_id
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: claim_generation
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: printer_task_access_token
        required: false
      - schema:
          type: string
        in: path
        name: fileId
        required: true
        description: The unique identifier of the file to download
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      responses:
        '404':
          description: File not found
          content:
            application/json:
              schema:
                description: File not found
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: File not found
                  message:
                    type: string
                    example: The requested file does not exist
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                description: Internal server error
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An error occurred while retrieving the file
      operationId: getV1FilesByFileId
      x-operation-id-source: derived
    delete:
      summary: Delete file
      tags:
      - Files
      description: Soft-deletes a file row for sync consumers while retaining storage data for replay/grace-period recovery.
      parameters:
      - schema:
          type: string
        in: path
        name: fileId
        required: true
        description: The unique identifier of the file to delete
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      responses:
        '200':
          description: File deleted successfully
          content:
            application/json:
              schema:
                description: File deleted successfully
                type: object
                properties:
                  success:
                    type: boolean
        '404':
          description: File not found
          content:
            application/json:
              schema:
                description: File not found
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: File not found
                  message:
                    type: string
                    example: The requested file does not exist
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                description: Internal server error
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An error occurred while deleting the file
      operationId: deleteV1FilesByFileId
      x-operation-id-source: derived
  /v1/files/{fileId}/download-url:
    get:
      summary: Get single-file download URL
      tags:
      - Files
      description: Generates a signed download URL for one file while preserving legacy direct-vs-nested storage path compatibility.
      parameters:
      - schema:
          type: string
        in: query
        name: print_job_id
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: printer_task_id
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: claim_generation
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: printer_task_access_token
        required: false
      - schema:
          type: string
        in: path
        name: fileId
        required: true
        description: The unique identifier of the file to sign
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      responses:
        '200':
          description: Signed download URL
          content:
            application/json:
              schema:
                description: Signed download URL
                type: object
                required:
                - download_url
                properties:
                  download_url:
                    type: string
        '404':
          description: File not found
          content:
            application/json:
              schema:
                description: File not found
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: File not found
                  message:
                    type: string
                    example: The requested file does not exist
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                description: Internal server error
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An error occurred while generating the download URL
      operationId: getV1FilesByFileIdDownloadUrl
      x-operation-id-source: derived
  /v1/files/{fileId}/restore:
    post:
      summary: Restore Model File
      tags:
      - Files
      parameters:
      - schema:
          type: string
          format: uuid
        in: path
        name: fileId
        required: true
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      responses:
        '204':
          description: Model File restored
          content:
            application/json:
              schema:
                description: Model File restored
        '404':
          description: Model File not found
          content:
            application/json:
              schema:
                description: Model File not found
        '409':
          description: Parent Model is unavailable
          content:
            application/json:
              schema:
                description: Parent Model is unavailable
      operationId: postV1FilesByFileIdRestore
      x-operation-id-source: derived
  /v1/models/{modelId}/files/audit:
    get:
      summary: Audit model files
      tags:
      - Files
      description: Lists all files for a model from both database and storage, identifying orphaned files that exist in storage but not in the database
      parameters:
      - schema:
          type: string
        in: path
        name: modelId
        required: true
        description: The unique identifier of the model
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      responses:
        '200':
          description: File audit results
          content:
            application/json:
              schema:
                description: File audit results
                type: object
                required:
                - database_files
                - storage_files
                - orphaned_files
                - summary
                properties:
                  database_files:
                    type: array
                    description: Files recorded in the database
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        filename:
                          type: string
                        file_path:
                          type: string
                        file_size:
                          type: number
                        file_type:
                          type: string
                        created_at:
                          type:
                          - string
                          - 'null'
                        metadata:
                          type: object
                  storage_files:
                    type: array
                    description: Files found in storage bucket
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        id:
                          type:
                          - string
                          - 'null'
                        updated_at:
                          type:
                          - string
                          - 'null'
                        created_at:
                          type:
                          - string
                          - 'null'
                        last_accessed_at:
                          type:
                          - string
                          - 'null'
                        metadata:
                          type: object
                  orphaned_files:
                    type: array
                    description: Files in storage but not in database
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        path:
                          type: string
                        size:
                          type: number
                        last_modified:
                          type:
                          - string
                          - 'null'
                  summary:
                    type: object
                    properties:
                      total_database_files:
                        type: number
                      total_storage_files:
                        type: number
                      total_orphaned_files:
                        type: number
        '404':
          description: Model not found
          content:
            application/json:
              schema:
                description: Model not found
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: Model not found
                  message:
                    type: string
                    example: The requested model does not exist
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                description: Internal server error
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An error occurred while auditing model files
      operationId: getV1ModelsByModelIdFilesAudit
      x-operation-id-source: derived
  /v1/models/{modelId}/files/cleanup:
    delete:
      summary: Clean up orphaned files
      tags:
      - Files
      description: Deletes orphaned files from storage that are not recorded in the database
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - orphaned_file_paths
              properties:
                orphaned_file_paths:
                  type: array
                  items:
                    type: string
                  description: Array of file paths to delete
                organizationId:
                  type: string
                  description: Organization ID (optional, defaults to user's primary organization)
      parameters:
      - schema:
          type: string
        in: path
        name: modelId
        required: true
        description: The unique identifier of the model
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      responses:
        '200':
          description: Cleanup results
          content:
            application/json:
              schema:
                description: Cleanup results
                type: object
                required:
                - success
                - deleted_files
                - failed_deletions
                properties:
                  success:
                    type: boolean
                  deleted_files:
                    type: array
                    items:
                      type: string
                    description: Successfully deleted file paths
                  failed_deletions:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        error:
                          type: string
                    description: Failed deletion attempts
        '404':
          description: Model not found
          content:
            application/json:
              schema:
                description: Model not found
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: Model not found
                  message:
                    type: string
                    example: The requested model does not exist
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                description: Internal server error
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An error occurred while cleaning up orphaned files
      operationId: deleteV1ModelsByModelIdFilesCleanup
      x-operation-id-source: derived
  /v1/files/{fileId}/plate-previews:
    get:
      summary: Get signed per-plate preview images for a Model File
      tags:
      - Files
      description: 'Returns the per-Plate preview summary recorded during Model File processing: ranked preview images with signed URLs, the active Plate index, and the objects placed on each Plate. Only storage paths inside the file''s own recorded asset references are signed.'
      parameters:
      - schema:
          type: string
        in: query
        name: print_job_id
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: printer_task_id
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: claim_generation
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: printer_task_access_token
        required: false
      - schema:
          type: string
        in: path
        name: fileId
        required: true
        description: The unique identifier of the file
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      responses:
        '404':
          description: File not found
          content:
            application/json:
              schema:
                description: File not found
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: Not Found
                  message:
                    type: string
                    example: The requested file does not exist
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                description: Internal server error
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An error occurred while resolving the plate previews
      operationId: getV1FilesByFileIdPlatePreviews
      x-operation-id-source: derived
  /v1/files/{fileId}/compatible-printers:
    get:
      summary: Get printers ranked by compatibility with a file
      tags:
      - Files
      description: Returns all printers in the organization ranked by their compatibility with the specified model file. Considers printer model, available filament slots, and material matching with color proximity.
      parameters:
      - schema:
          type: integer
          minimum: 1
        in: query
        name: plateNumber
        required: false
      - schema:
          type: string
          format: uuid
        in: query
        name: organizationId
        required: false
        description: Organization ID (uses default if not provided)
      - schema:
          type: string
          enum:
          - 'true'
          - 'false'
          default: 'false'
        in: query
        name: includeOffline
        required: false
        description: Include offline printers in results
      - schema:
          type: string
          format: uuid
        in: query
        name: makeId
        required: false
        description: Make ID to use for exact material matching via make_materials
      - schema:
          type: number
          minimum: 0
          maximum: 100
          default: 15
        in: query
        name: colorThreshold
        required: false
        description: Delta-E threshold for color proximity matching (0-100)
      - schema:
          type: string
        in: query
        name: materialIds
        required: false
        description: JSON array of {index, materialId} for explicit material requirements
      - schema:
          type: string
        in: query
        name: acceptableMaterials
        required: false
        description: 'JSON acceptable material sets: an array of {optionId, label?, materialIds:[{index, materialId}]}, or an indexed map of acceptable_materials rules {index: [{material_id|type|colors|color_threshold|profile_id|profile_ids}]}'
      - schema:
          type: string
          enum:
          - 'true'
          - 'false'
        in: query
        name: strategyExactMaterial
        required: false
        description: Enable exact material ID matching strategy
      - schema:
          type: string
          enum:
          - 'true'
          - 'false'
        in: query
        name: strategyTypeColor
        required: false
        description: Enable type + color matching strategy
      - schema:
          type: string
          enum:
          - 'true'
          - 'false'
        in: query
        name: strategyLooseMatch
        required: false
        description: Enable loose (type only) matching strategy
      - schema:
          type: string
          format: uuid
        in: path
        name: fileId
        required: true
        description: The model file ID
      security:
      - apiKey: []
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  file:
                    type: object
                    properties:
                      id:
                        type: string
                      filename:
                        type: string
                      sliced_for_model:
                        type:
                        - 'null'
                        - string
                      sliced_for_model_display:
                        type:
                        - 'null'
                        - string
                      required_filaments:
                        type: array
                        items:
                          type: object
                          properties:
                            index:
                              type: number
                            type:
                              type: string
                            color:
                              type: string
                            used_grams:
                              type: number
                  printers:
                    type: array
                    items:
                      type: object
                      properties:
                        printer_id:
                          type: string
                        name:
                          type: string
                        model:
                          type: string
                        model_id:
                          type:
                          - 'null'
                          - string
                        score:
                          type: number
                        match_type:
                          type: string
                        reasons:
                          type: array
                          items:
                            type: string
                        is_connected:
                          type: boolean
                        compatibility_details:
                          type: object
                          additionalProperties: true
                        loaded_filaments:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
                        state_observed_at:
                          type:
                          - 'null'
                          - string
                        material_evidence:
                          type: object
                          additionalProperties: true
                        material_evidence_gate:
                          type: object
                          additionalProperties: true
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
      operationId: getV1FilesByFileIdCompatiblePrinters
      x-operation-id-source: derived
components:
  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