{"swagger":"2.0","info":{"description":"API hosted by ADMS to receive specific actions related to temporary line cuts, temporary jumpers and non-SCADA device status change actions. External system can use the API to create\\delete temporary cuts and temporary jumpers and change device status of non-SCADA devices. Integration API is supposed only to be used by ABB DMS.","version":"1.0.0","title":"ADMS hosted API for ADMS ABB Integration","contact":{"email":"x.y@z.com"}},"tags":[{"name":"Temporary Elements","description":"Operations related to temporary element actions in ADMS"},{"name":"Device Status","description":"Operations related to device status actions in ADMS"}],"paths":{"/temporarycuts/{id}":{"post":{"tags":["Temporary Elements"],"summary":"add temporary cut in ADMS system","operationId":"addtemporarycut","description":"Method used to add temporary cut on a distribution line segment in ADMS system","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Timestamp","type":"string","format":"date-time","required":true},{"name":"id","in":"path","description":"temporary cut ID that is to be created in ADMS","required":true,"type":"string"},{"in":"body","name":"temporarycut","description":"Temporary cut object to add into ADMS","schema":{"$ref":"#/definitions/TemporaryCut"}}],"responses":{"201":{"description":"temporary cut created","headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"400":{"description":"invalid input, object invalid","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"401":{"description":"internal error occured while processing the request","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"409":{"description":"temporary cut with the same ID already exists","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"410":{"description":"provided electrical device does not in ADMS model","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"411":{"description":"percentage error","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"412":{"description":"phase error","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}}}},"delete":{"tags":["Temporary Elements"],"summary":"delete temporary cut by ID","operationId":"deletetemporarycut","description":"Deletes temporary cut from ADMS system if cut with provided id exists in the ADMS system","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Timestamp","type":"string","format":"date-time","required":true},{"name":"id","in":"path","description":"temporary cut id","required":true,"type":"string"}],"responses":{"201":{"description":"item deleted","headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"401":{"description":"internal error occured while processing the request","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"408":{"description":"element does not exist in ADMS model","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}}}},"get":{"tags":["Temporary Elements"],"summary":"get temporary cut by external ID","description":"method will return temporary cut from ADMS queried by provided temporary cut ID","operationId":"gettemporarycutbyid","produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Timestamp","type":"string","format":"date-time","required":true},{"name":"id","in":"path","description":"temporary cut ID to be used for lookup in ADMS","required":true,"type":"string"}],"responses":{"200":{"description":"temporary cut provided to the calling application","schema":{"$ref":"#/definitions/TemporaryCut"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"401":{"description":"internal error occured while processing the request","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"408":{"description":"element does not exist in ADMS model","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}}}}},"/temporaryjumpers/{id}":{"post":{"tags":["Temporary Elements"],"summary":"add temporary jumper in ADMS","operationId":"addtemporaryjumper","description":"Method used to add temporary jumper to ADMS system","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Timestamp","type":"string","format":"date-time","required":true},{"name":"id","in":"path","description":"temporary jumper id","required":true,"type":"string"},{"in":"body","name":"temporaryjumper","description":"Temporary jumper to add into ADMS","schema":{"$ref":"#/definitions/TemporaryJumper"}}],"responses":{"201":{"description":"temporary jumper created","headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"400":{"description":"invalid input, object invalid","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"401":{"description":"internal error occured while processing the request","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"409":{"description":"temporary cut with the same ID already exists","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"410":{"description":"provided electrical device does not in ADMS model","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"411":{"description":"phase mismatch error","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}}}},"delete":{"tags":["Temporary Elements"],"summary":"delete temporary jumper from ADMS system","operationId":"deletetemporaryjumper","description":"Deletes temporary jumper from ADMS system if jumper with provided ID exists in the system","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Timestamp","type":"string","format":"date-time","required":true},{"name":"id","in":"path","description":"temporary jumper id","required":true,"type":"string"}],"responses":{"201":{"description":"item deleted","headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"401":{"description":"internal error occured while processing the request","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"408":{"description":"element does not exist in ADMS model","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}}}},"get":{"tags":["Temporary Elements"],"summary":"get temporary jumper from ADMS by ID","description":"method will return temporary jumper from ADMS queried by provided temporary jumper ID","operationId":"gettemporaryjumperbyid","produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Timestamp","type":"string","format":"date-time","required":true},{"name":"id","in":"path","description":"temporary jumper ID to be used for lookup in ADMS","required":true,"type":"string"}],"responses":{"200":{"description":"temporary jumper provided to the calling application","schema":{"$ref":"#/definitions/TemporaryJumper"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"401":{"description":"internal error occured while processing the request","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"408":{"description":"element does not exist in ADMS model","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}}}}},"/devicestatuses/{id}":{"put":{"tags":["Device Status"],"summary":"changes device status","operationId":"changedevicestatus","description":"changes device status in ADMS","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Timestamp","type":"string","format":"date-time","required":true},{"name":"id","in":"path","description":"device ID to be used for lookup in ADMS","required":true,"type":"string"},{"name":"payload","in":"body","description":"device status change to be applied in ADMS","schema":{"$ref":"#/definitions/DeviceStatus"}}],"responses":{"200":{"description":"device status updated","headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"400":{"description":"invalid input, object invalid","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"401":{"description":"internal error occured while processing the request","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"406":{"description":"device status change for SCADA device received","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"407":{"description":"device state same in received message and in ADMS","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"408":{"description":"element does not exist in ADMS model","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"409":{"description":"device has a do not operate tag in ADMS","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}}}},"get":{"tags":["Device Status"],"summary":"get device status by device ID","description":"method will return device state from ADMS queried by provided device ID","operationId":"getdevicestatusbyid","produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Timestamp","type":"string","format":"date-time","required":true},{"name":"id","in":"path","description":"device ID to be used for lookup in ADMS","required":true,"type":"string"}],"responses":{"200":{"description":"device status provided","schema":{"$ref":"#/definitions/DeviceStatus"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"401":{"description":"internal error occured while processing the request","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}},"408":{"description":"element does not exist in ADMS model","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"},"X-Timestamp":{"type":"string","format":"date-time","description":"Timestamp"}}}}}}},"definitions":{"TemporaryCut":{"required":["name","id","timestamp","linesegment","connecteddevice","percentage","phases","user"],"properties":{"name":{"type":"string","example":"temp element 1","description":"name of the element"},"id":{"type":"string","example":197892,"description":"unique ID of the temporary cut"},"timestamp":{"type":"string","format":"date-time","example":"2007-04-05T12:30-02:00","description":"date time in UTC as specified in design document"},"linesegment":{"type":"string","example":908748,"description":"unique ID of the line segment"},"connecteddevice":{"type":"string","example":"009874","description":"unique ID of the connected device, used to lookup connectivity node in ADMS network model"},"percentage":{"type":"number","example":36,"description":"percentage of the line that was cut by the temporary cut, used to determine location of the cut on the line"},"phases":{"type":"string","enum":["A","B","C","AB","AC","BC","ABC"],"example":"A","description":"phases of the line cut by temporary cut"},"user":{"type":"string","example":"johndoe","description":"user which executed the action"}}},"TemporaryJumper":{"required":["name","id","timestamp","linesegment1","connecteddevice1","percentage1","linesegment2","connecteddevice2","percentage2","phases","user"],"properties":{"name":{"type":"string","example":"temp element 1","description":"name of the element"},"id":{"type":"string","example":447391,"description":"unique ID of the temporary element"},"timestamp":{"type":"string","format":"date-time","example":"2007-04-05T12:30-02:00","description":"date time in UTC as specified in design document"},"linesegment1":{"type":"string","example":4466372,"description":"unique ID of the jumped line segment"},"connecteddevice1":{"type":"string","example":332442,"description":"unique ID of the device connected to the line, used to lookup connectivity node in ADMS network model"},"percentage1":{"type":"number","example":32,"description":"percentage of the line that was jumped by the temporary jumper, used to determine location of the jumper on the line"},"linesegment2":{"type":"string","example":4466372,"description":"unique ID of the jumped line segment"},"connecteddevice2":{"type":"string","example":332442,"description":"unique ID of the device connected to the line, used to lookup connectivity node in ADMS network model"},"percentage2":{"type":"number","example":32,"description":"percentage of the line that was jumped by the temporary jumper, used to determine location of the jumper on the line"},"phases":{"type":"string","enum":["A","B","C","AB","AC","BC","ABC"],"example":"A","description":"phases of the line jumped via temporary jumper"},"user":{"type":"string","example":"johndoe","description":"user which executed the action"}}},"DeviceStatus":{"required":["id","timestamp","normalstatusvalue","actualstatusvalue","phases","user"],"properties":{"id":{"type":"string","example":123,"description":"unique ID of the device in ADMS Network Model"},"timestamp":{"type":"string","format":"date-time","example":"2007-04-05T12:30-02:00","description":"date time in UTC as specified in design document"},"normalstatusvalue":{"type":"integer","example":0,"description":"normal status of the device"},"actualstatusvalue":{"type":"integer","example":4,"description":"current state"},"phases":{"type":"string","enum":["A","B","C","AB","AC","BC","ABC"],"example":"A","description":"switched phases"}}},"ErrorResponse":{"properties":{"errorCode":{"type":"string","example":410,"description":"HTTP error code"},"title":{"type":"string","example":"resource not found","description":"title of the error"},"detail":{"type":"string","example":"Device with ID XYZ not found in ADMS Network Model","description":"details of the error"}}}},"host":"virtserver.swaggerhub.com","basePath":"/petar.vasilic/ABBtoADMS/1.0.0","schemes":["https"]}