Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Swagger open api macro
openapi: 3.0.0
info:
  description: "Shoplogix manual upload API. Used for sending values of any configured *Manual Type* variables as well as Cycle values for Manual Part Type Machines."
  version: "1.0.0"
  title: "Manual Input Upload"
  contact:
    email: "support@shoplogix.com"
servers:
  - url: https://demo.shoplogix.com
    description: Customer facing demo server
tags:
- name: "mupload.axd"
  description: "Function for processing manual input variables"
paths:
  /mupload.axd:
    post:
      tags:
      - "mupload.axd"
      summary: "Add new variable signals"
      description: ""
      operationId: "addInput"
      requestBody:
        content:
          "application/json":
            schema:
              $ref: "#/components/schemas/ManualUploadRequest"
      responses:
        "400":
          description: "Returns description of error."
          content:
            "application/json":
              schema:
                $ref: "#/components/schemas/BadRequestResponse"
        "404":
          description: "Machine '{machineId}' not found"
          content:
            "application/json":
              schema:
                properties:
                  error:
                    description: "Machine '{machineId}' not found"
                    type: string
                    enum:
                    - "Machine '{machineId}' not found"
      parameters:
      - in: "query"
        name: "machineid"
        required: true
        description: Machine ID value from configuration.
        schema:
          type: string
      - in: "query"
        name: "localtime"
        required: true
        description: Local time of machine in URL friendly format, e.g. `20210305T004403.722`
        schema:
          type: string
          pattern: "YYYYMMDD[T]HHmmss.SSS"
      - in: "query"
        name: "async"
        required: true
        description: This should always be set to `true`
        schema:
          type: boolean
      - in: header
        name: "user-agent"
        required: true
        description: Needs to be set to empty value
        schema:
          type: "string"
          enum: 
          - ""
      security:
      - basicAuth: []
security:
- basicAuth: []
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    ManualUploadRequest:
      type: "array"
      items:
        anyOf:
        - $ref: '#/components/schemas/CycleSignal'
        - $ref: '#/components/schemas/GeneralSignal'
    BaseSignal:
      type: "object"
      required:
      - "Name"
      - "Time3"
      - "Type"
      properties:
        name:
          type: "string"
          description: "Variable name from configuration"
          example: "CurrentStatusInput"
        time3:
          type: "string"
          format: "date-time"
          pattern: "YYYY-MM-DD[T]HH:mm:ss.SSSSSSSZSSSSSSSz"
    CycleSignal:
      allOf:
      - $ref: "#/components/schemas/BaseSignal"
      required:
      - "type"
      - "count"
      properties:
        type:
          type: "string"
          enum: ["Cycle"]
        count:
          type: "number"
          pattern: "double"
          description: "This is only supplied when `type` == Cycle"
    GeneralSignal:
      allOf:
      - $ref: "#/components/schemas/BaseSignal"
      required:
      - "type"
      - "value"
      properties:
        type:
          type: "string"
          enum: ["Signal"]
        value:
          type: "string"
    BadRequestResponse:
      type: "object"
      properties:
        error:
          type: "string"
          enum: ["Machine '{machineId}' not found", "No access to machine '{machineId}'", "Machine '{machineId}' has no time zone configured", "Could not parse local time: '${localTimeText}'"]

...