{"swagger":"2.0","info":{"description":"API hosted by ABB DMS to receive specific tag creation information from ADMS. Tags on SCADA devices and Fire Mitifation tags on all SCADA and non-SCADA devices will be sent from ADMS into ABB DMS, and this API will be used to support that integration data flow.","version":"1.0.0","title":"ABB DMS hosted API for ADMS ABB Integration","contact":{"email":"x.y@z.com"}},"tags":[{"name":"Tags","description":"Set of tag operations, used to manage tag objects in ABB DMS"}],"paths":{"/tags":{"get":{"tags":["Tags"],"summary":"get all tags based on source system","description":"method will return all tags in ABB based on the source system, will be used by ADMS to get all tags sent from ADMS into ABB","operationId":"gettags","produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"name":"sourcesystem","in":"query","description":"Source system of the tag, will be used by ADMS to gather all tags created by ADMS through the interface","required":true,"type":"string"}],"responses":{"200":{"description":"tags sourced from ADMS provided","schema":{"$ref":"#/definitions/Tags"},"headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}},"400":{"description":"invalid input, object invalid","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}},"408":{"description":"no tags for provided source system exist in ABB DMS","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}}}}},"/tags/{id}":{"delete":{"tags":["Tags"],"summary":"delete tag","operationId":"deletetag","description":"Deletes tag from ABB system if tag with specified ID exists in the ABB system","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"name":"id","in":"path","description":"tag id","required":true,"type":"string"}],"responses":{"201":{"description":"item deleted","headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}},"408":{"description":"tag does not exist in ABB model","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}}}},"get":{"tags":["Tags"],"summary":"get tag by tag ID","description":"method will return tag from ABB system if tag with specified ID exists in the system","operationId":"gettagbyid","produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"name":"id","in":"path","description":"tag id","required":true,"type":"string"}],"responses":{"200":{"description":"tag found and provided to calling application","schema":{"$ref":"#/definitions/Tag"},"headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}},"408":{"description":"tag does not exist in ABB DMS","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}}}},"post":{"tags":["Tags"],"summary":"add tag","operationId":"addtag","description":"Method used to add tag into ADMS system","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"name":"id","in":"path","description":"tag id","required":true,"type":"string"},{"in":"body","name":"Tag","description":"Tag to add into ADMS","schema":{"$ref":"#/definitions/Tag"}}],"responses":{"201":{"description":"item created","headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}},"400":{"description":"invalid input, object invalid","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}},"409":{"description":"tag with the same ID already exists in ABB DMS","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}},"410":{"description":"provided electrical device does not in ABB DMS","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}}}}},"/tags/{id}/{user}/{comment}":{"patch":{"tags":["Tags"],"summary":"updates tag","operationId":"updatetag","description":"method provides a way for tag comment to be updated in ABB DMS, method is executed successfully if tag exists in ABB DMS","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"header","name":"X-Source-ID","type":"string","format":"uuid","required":true},{"in":"header","name":"X-Transaction-ID","type":"string","format":"uuid","required":true},{"name":"id","in":"path","description":"tag id","required":true,"type":"string"},{"name":"user","in":"path","description":"user who did the change","required":true,"type":"string"},{"name":"comment","in":"path","description":"updated comment of the tag","required":true,"type":"string"}],"responses":{"201":{"description":"tag comment updated","headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}},"410":{"description":"provided tag does not in ABB DMS","schema":{"$ref":"#/definitions/ErrorResponse"},"headers":{"X-Source-ID":{"type":"string","format":"uuid","description":"ID of the calling system"},"X-Transaction-ID":{"type":"string","format":"uuid","description":"Unique transaction ID"}}}}}}},"definitions":{"Tag":{"required":["comment","mrid","timestamp","deviceid","phases","user","tagtype","sourcesystem"],"properties":{"comment":{"type":"string","example":"This is my TAG!","description":"comment placed in the tag"},"mrid":{"type":"string","example":197892,"description":"unique ID of the tag"},"timestamp":{"type":"string","format":"date-time","example":"2007-04-05T12:30-02:00","description":"date time in UTC as specified in design document"},"deviceid":{"type":"string","example":908748,"description":"unique ID of the tagged device"},"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"},"sourcesystem":{"type":"string","example":"ADMS","description":"source system for the tags, will be used to query ADMS tags from ABB"},"tagtype":{"type":"string","example":"FM","description":"tag type in ABB, read from configuration on ADMS side, ADMS tag type will be mapped to ABB tag type"}}},"Tags":{"properties":{"tags":{"type":"array","items":{"$ref":"#/definitions/Tag"}}}},"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","schemes":["https"],"basePath":"/petar.vasilic/ADMStoABB/1.0.0"}