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/GeneralSignalGenericSignal'
    BaseSignal:
      type: "object"
      required:
      - "Name"
      - "Time3time3"
      - "Type"
      properties:
        nametime3:
          type: "string"
          description: "VariableDate time namewith fromUTC configurationoffset"
          example: "CurrentStatusInput"
        time3:
          type: "string"
          format: "date-time2021-03-04T23:38:53.8830000-05:00"
          pattern: "YYYY-MM-DD[T]HH:mm:ss.SSSSSSSz"'([12]\d{3})-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T([0-1]\d|2[0-3]):([0-5]\d):([0-5]\d)\.(\d{7})([+-]\d{2}:\d{2})?'
    CycleSignal:
      allOf:
      - $ref: "#/components/schemas/BaseSignal"
      required:
      - "type"
      - "count"
      properties:
        type:
          type: "string"
          enum: ["Cycle","Scrap"]
        count:
          type: "number"
          pattern: "double"
    GenericSignal:
     description allOf:
"This  is only supplied when `type`- == Cycle$ref: "#/components/schemas/BaseSignal"
    GeneralSignal  required:
      allOf: - "name"
      - $ref: "#/components/schemas/BaseSignal "type"
      - "value"
      required:properties:
        name:
          -type: "typestring"
      -    description: "value"Variable name from configuration"
        properties:  example: "CurrentStatus"
        type:
          type: "string"
          enum: ["Signal"]
        value:
          example: "Running"
          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}'"]

...