swagger: "2.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: "demo.shoplogix.com"
basePath: "/web/api"
tags:
- name: "mupload.axd"
description: "Function for processing manual input variables"
schemes:
- "https"
paths:
/mupload.axd:
post:
tags:
- "mupload.axd"
summary: "Add new variable entry"
description: ""
operationId: "addInput"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "query"
name: "machineid"
type: string
required: true
description: Machine ID value from configuration.
- in: "query"
name: "localtime"
type: string
pattern: "YYYYMMDD[T]HHmmss.SSS"
required: true
description: Local time of machine in URL friendly format, e.g. `20210305T004403.722`
- in: "query"
name: "async"
type: boolean
required: true
description: This should always be set to `true`
- in: "body"
name: "body"
description: "Array of OpcManualUploadRequest objects"
required: true
schema:
$ref: "#/definitions/ManualUploadRequest"
- in: header
name: "user-agent"
type: "string"
required: true
enum: [""]
description: Needs to be set to empty value
responses:
"400":
description: "Returns description of error."
schema:
$ref: "#/definitions/BadRequestResponse"
"404":
description: "Machine '{machineId}' not found"
security:
- basicAuth: []
securityDefinitions:
basicAuth:
type: basic
definitions:
ManualUploadRequest:
type: "array"
items:
$ref: '#/definitions/Signal'
Signal:
type: "object"
required:
- "Name"
- "Time3"
- "Type"
- "Count"
- "Value"
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"
type:
type: "string"
enum: ["Cycle", "Signal"]
count:
type: "number"
pattern: "double"
description: "This is only supplied when `type` == Cycle"
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}'"]
|