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"
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:
/web/api/mupload.axd:
post:
tags:
- "mupload.axd"
summary: "Add new variable entrysignals"
description: ""
operationId: "addInput"
consumes:requestBody:
content:
- "application/json":
produces: schema:
$ref: "#/components/schemas/ManualUploadRequest"
responses:
"400":
description: "Returns description of error."
content:
- "application/json":
parameters:
schema:
$ref: "#/components/schemas/BadRequestResponse"
"404":
description: "Machine '{machineId}' not found"
- in: "query"
content:
"application/json":
schema:
properties:
name: "machineid 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.
- inexample: "query"35dd7a94-b0a0-4466-8def-26afc4977ee7
nameschema:
"localtime" type: string
- in: "query"
patternname: "YYYYMMDD[T]HHmmss.SSSlocaltime"
required: true
description: Local time of machine in URL friendly format, e.g. `20210305T004403.722`
schema:
type: string
pattern: '[1-9]\d{3}([0-1][0-9])([0-3][0-9])T([0-2][0-9])([0-5][0-9])([0-5][0-9]).\d{3}'
- in: "query"
name: "async"
typerequired: booleantrue
requiredexample: true
description: This should always be set to `true`
- inschema:
"body" nametype: "body" boolean
- in: header
description: "Array of OpcManualUploadRequest objectsname: "user-agent"
required: true
schemadescription: >-
$ref: "#/definitions/ManualUploadRequest" Needs to be set to value with prefix: PN_
- inexample: headerPN_script
nameschema:
"user-agent" type: "string"
security:
required: true - basicAuth: []
security:
- enumbasicAuth: [""]
components:
securitySchemes:
descriptionbasicAuth:
Needs to be set to emptytype: valuehttp
responsesscheme: basic
schemas:
"400"ManualUploadRequest:
type: "array"
description items:
"Returns description of error." anyOf:
schema: - $ref: '#/components/schemas/CycleSignal'
- $ref: "'#/components/definitions/BadRequestResponse"schemas/GenericSignal'
BaseSignal:
type: "404object":
required:
description: "Machine '{machineId}' not- found"time3"
securityproperties:
- basicAuthtime3:
[] securityDefinitions: basicAuth: type: basic
definitions:"string"
ManualUploadRequest: typedescription: "arrayDate time with UTC offset"
items: $ref: '#/definitions/Signal'example: "2021-03-04T23:38:53.8830000-05:00"
Signal: type: "object"pattern: '([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})?'
requiredCycleSignal:
- "Name" allOf:
- "Time3$ref: "#/components/schemas/BaseSignal"
- "Type" required:
- "Counttype"
- "Valuecount"
properties:
name type:
type: "string"
description enum: "Variable name from configuration["Cycle","Scrap"]
count:
type: "number"
example pattern: "CurrentStatusInputdouble"
GenericSignal:
time3 allOf:
- type$ref: "string"#/components/schemas/BaseSignal"
required:
format: "date-time"
- "name"
- "type"
- "value"
patternproperties:
"YYYY-MM-DD[T]HH:mm:ss.SSSSSSSZ" typename:
type: "string"
enum description: ["Cycle", "Signal"]"Variable name from configuration"
example: "CurrentStatus"
counttype:
type: "numberstring"
pattern enum: ["doubleSignal"]
descriptionvalue:
"This is only supplied when `type` == Cycle" example: "Running"
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}'"]
|