Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Swagger open api macro
swaggeropenapi: "23.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"
host: "
servers:
  - url: https://demo.shoplogix.com"
basePath: "/web/api"
    description: Customer facing demo server
tags:
- name: "mupload.axd"
  description: "Function for processing manual input variables"
schemes:
- "https"
paths:
  /mupload.axd:
    post:
      tags:
      - "mupload.axd"
      summary: "Add new variable entries.signals"
      description: ""
      operationId: "addInput"
      consumes:requestBody:
        content:
       -   "application/json":
            producesschema:
         -     $ref: "application/json"#/components/schemas/ManualUploadRequest"
      responses:
        parameters"400":
      -    indescription: "query"Returns description of error."
          namecontent:
   "machineid"         "application/json":
        type: string      schema:
                $ref: "#/components/schemas/BadRequestResponse"
        required"404":
 true         description: "Machine ID value from configuration. '{machineId}' not found"
         - in: "query"content:
            "application/json":
              schema:
                  name: "localtime"properties:
                  error:
                    description: "Machine '{machineId}' not found"
                    type: string
                    patternenum: "YYYYMMDD[T]HHmmss.SSS"
           required: true        - description: Local time of machine in URL friendly format, e.g. `20210305T004403.722`"Machine '{machineId}' not found"
      parameters:
      - in: "query"
        name: "asyncmachineid"
        typerequired: booleantrue
        requireddescription: trueMachine ID value from configuration.
        descriptionschema:
     This should always be set totype: `true`string
      - in: "bodyquery"
        name: "bodylocaltime"
        required: true
        description: "ArrayLocal time of OpcManualUploadRequest objects" machine in URL friendly format, e.g. `20210305T004403.722`
        requiredschema:
 true         schematype: string
          $refpattern: "#/definitions/ManualUploadRequestYYYYMMDD[T]HHmmss.SSS"
      - in: header"query"
        name: "user-agentasync"
        typerequired: "string"true
        requireddescription: trueThis should always be set to `true`
        enumschema:
 [""]         descriptiontype: Needs to be set to empty valueboolean
      - in: header
        responsesname: "user-agent"
        "400"required: true
         description: Needs "Returnsto descriptionbe ofset error."to empty value
        schema:
            $reftype: "#/definitions/BadRequestResponsestring"
        "404":  enum: 
       description: "Machine '{machineId}' not- found""
      security:
      - basicAuth: []
security:
- basicAuth: []
components:
  securityDefinitionssecuritySchemes:
    basicAuth:
      type: http
      scheme: basic
 definitions schemas:
    ManualUploadRequest:
      type: "array"
      items:
        anyOf:
        - $ref: '#/components/definitionsschemas/SignalCycleSignal'
  Signal:      type: "object"- $ref: '#/components/schemas/GeneralSignal'
    requiredBaseSignal:
      -type: "Nameobject"
      - "Time3"required:
      - "TypeName"
      - "CountTime3"
      - "ValueType"
      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.SSSSSSSZ"
    CycleSignal:
      allOf:
      - $ref: "#/components/schemas/BaseSignal"
      required:
      - "type"
      - "count"
      properties:
        type:
          type: "string"
          enum: ["Cycle", "Signal"]]
        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}'"]

...