Phasio Manufacturer Thread File Controller API

API for managing files attached to threads

OpenAPI Specification

phasio-manufacturer-thread-file-controller-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Phasio Activity Internal Manufacturer Thread File Controller API
  description: This is the API documentation for the Phasio application.
  version: '1.0'
servers:
- url: https://m-api.eu.phas.io
  description: Generated server url
security:
- Phasio API Bearer Token: []
tags:
- name: Manufacturer Thread File Controller
  description: API for managing files attached to threads
paths:
  /api/manufacturer/v1/thread-file/{threadId}:
    put:
      tags:
      - Manufacturer Thread File Controller
      summary: Upload a file to a thread
      description: Uploads and attaches a file to a specified thread
      operationId: upload
      parameters:
      - name: threadId
        in: path
        description: ID of the thread to attach the file to
        required: true
        schema:
          type: integer
          format: int64
        example: 1
      - name: requisitionId
        in: query
        description: RequisitionId to attach the file to
        required: false
        schema:
          type: integer
          format: int64
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: File to upload
              required:
              - file
      responses:
        '200':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadFileDto'
        '400':
          description: Invalid request or file upload failed
        '401':
          description: Unauthorized - missing operator context
  /api/manufacturer/v1/thread-file/{fileId}:
    get:
      tags:
      - Manufacturer Thread File Controller
      summary: Download a thread file
      description: Downloads a file attached to a thread by its ID
      operationId: download
      parameters:
      - name: fileId
        in: path
        description: ID of the file to download
        required: true
        schema:
          type: string
          format: uuid
        example: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: File downloaded successfully
          content:
            application/octet-stream: {}
        '400':
          description: Invalid request or file not found
        '401':
          description: Unauthorized - missing operator context
  /api/manufacturer/v1/thread-file/thread/{threadId}:
    get:
      tags:
      - Manufacturer Thread File Controller
      summary: Get files by thread ID
      description: Retrieves all files attached to the specified thread
      operationId: getFilesByThread_1
      parameters:
      - name: threadId
        in: path
        description: ID of the thread to get files for
        required: true
        schema:
          type: integer
          format: int64
        example: 1
      responses:
        '200':
          description: Files retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ThreadFileDto'
        '400':
          description: Invalid request or thread not found
        '401':
          description: Unauthorized - missing operator context
components:
  schemas:
    ThreadFileDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        createdAt:
          type: string
          format: date-time
        size:
          type: integer
          format: int64
        uploader:
          type: string
        requisitionId:
          type: integer
          format: int64
      required:
      - createdAt
      - id
      - name
      - size
      - uploader
  securitySchemes:
    Phasio API Bearer Token:
      type: http
      name: Authorization
      in: header
      scheme: bearer
      bearerFormat: JWT