{"swagger":"2.0","info":{"description":"API to exchange documents between Abacus and a thirdparty document management system.  This YAML describes the DMS-side REST-services.","version":"1.17","title":"Abacus DMS Connector","contact":{"email":"info@abacus.ch"}},"host":"abacus.ch","basePath":"/dms/v1","tags":[{"name":"document","description":"all services related to a document (CRUD)"},{"name":"storage","description":"service to retrieve the storage informations"},{"name":"authentication","description":"Test connection"}],"schemes":["https"],"paths":{"/document/{documentId}":{"get":{"tags":["document"],"summary":"gets the download URL for the document with the given id","description":"Gets a parameterized URL to the DMS webclient to show documents for a given document id","produces":["application/json"],"parameters":[{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document to get"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/URL"}},"400":{"description":"ex. document does not exist","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}},"post":{"tags":["document"],"summary":"saves a new document to the DMS","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document to create"},{"in":"formData","name":"documentProperties","description":"see json specification DocumentProperties model","required":true,"type":"string"},{"in":"formData","name":"file","description":"file to upload","required":true,"type":"file"}],"responses":{"201":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiResponse"}},"400":{"description":"document could not be saved","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}},"put":{"tags":["document"],"summary":"updates document properties of an existing document","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document to create"},{"in":"body","name":"documentProperties","description":"see json specification DocumentProperties model","required":true,"schema":{"$ref":"#/definitions/DocumentProperties"}}],"responses":{"201":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiResponse"}},"400":{"description":"document could not be saved","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}},"delete":{"tags":["document"],"summary":"deletes a document from the DMS","produces":["application/json"],"parameters":[{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document to delete"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiResponse"}},"400":{"description":"could not delete document","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}}},"/viewerUrl/{documentId}":{"get":{"tags":["document"],"summary":"gets the URL to the DMS webclient for the given document id","produces":["application/json"],"parameters":[{"in":"path","name":"documentId","type":"string","required":true,"description":"36-char id of the document to view"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/URL"}}}}},"/storage":{"put":{"tags":["storage"],"summary":"changes on storages","description":"notifies that a storage has either been inserted or updated","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"storage","in":"body","description":"storage meta data object","required":true,"schema":{"$ref":"#/definitions/Storage"}}],"responses":{"200":{"description":"storage changes received","schema":{"$ref":"#/definitions/ApiResponse"}},"400":{"description":"Conflict, example syntax is incorrect","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}}},"/storage/{storageId}":{"delete":{"tags":["storage"],"summary":"deletions of storages","description":"posts a deletion of a storage","produces":["application/json"],"parameters":[{"in":"path","name":"storageId","type":"string","required":true,"description":"36-char id of the storage which was deleted"}],"responses":{"200":{"description":"storage deletion received","schema":{"$ref":"#/definitions/ApiResponse"}},"400":{"description":"Conflict, example syntax is incorrect","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}}},"/connectiontest":{"get":{"tags":["authentication"],"summary":"service to test connectivity","produces":["application/json"],"security":[{"outputmanagement_auth":[]}],"responses":{"200":{"description":"OK (successfully authenticated)","schema":{"$ref":"#/definitions/ApiResponse"}},"401":{"$ref":"#/responses/UnauthorizedError"}}}}},"definitions":{"DocumentProperties":{"type":"object","required":["name","storageId"],"properties":{"creationUser":{"$ref":"#/definitions/User"},"mandant":{"type":"integer","minimum":1,"maximum":999999,"description":"number of the Abacus mandant, ex. 7777","example":7777},"storageId":{"type":"string","format":"string","minimum":36,"maximum":36,"description":"Id of the storage which contains the document","example":"39f527c0-1e35-e001-8fdf-00505698000c"},"folderId":{"type":"string","format":"string","minimum":36,"maximum":36,"description":"Id of the folder which contains the document","example":"916bef5a-1d18-e134-39b8-7814400cf8e6"},"udk":{"type":"string","format":"string","maximum":26,"description":"unique document key, ex. 7 (for address with address number 7). Attention it's not always a number","example":"7"},"udkDisplayText":{"type":"string","format":"string","description":"display text for the corresponding udk, ex. \"Musterfirma AG\"","example":"Musterfirma AG"},"name":{"type":"string","format":"string","maximum":255,"description":"name of the document including the file extension, ex. myfile.pdf","example":"myfile.pdf"},"description":{"type":"string","format":"string","maximum":200,"description":"document description","example":"myDescription"},"eid":{"type":"string","format":"string","maximum":36,"description":"external id for a document. Several documents can have the same eid Default is empty string"},"size":{"type":"integer","format":"int64","description":"file size in bytes","example":18432},"creationTimeStamp":{"type":"string","format":"date-time","description":"document creation timestamp as defined by RFC3339","example":"2017-07-21T17:32:28Z"},"modificationTimeStamp":{"type":"string","format":"date-time","description":"document modification timestamp as defined by RFC3339","example":"2017-07-21T17:32:28Z"},"dossierObject":{"type":"string","format":"string","maxLength":10,"description":"Unique id for a dossierObject as saved in Abacus","example":"ADR"}}},"Storage":{"type":"object","properties":{"id":{"type":"string","format":"string","minLength":36,"maxLength":36,"description":"Unique id for a storage as saved in Abacus","example":"39f527c0-1e35-e001-8fdf-00505698000c"},"mandant":{"type":"integer","minimum":1,"maximum":999999,"description":"number of the Abacus mandant, ex. 7777","example":7777},"name":{"type":"string","format":"string","description":"name of the storage","example":"Korrespondenz"},"translations":{"$ref":"#/definitions/Translations"},"application":{"$ref":"#/definitions/Application"},"dossierObject":{"$ref":"#/definitions/DossierObject"}}},"Translations":{"type":"object","additionalProperties":{"type":"string","description":"translated name"},"example":{"de":"Übersetzung","en":"Translation","fr":"Traduction"}},"DossierObject":{"type":"object","properties":{"id":{"type":"string","format":"string","maxLength":10,"description":"Unique id for a dossierObject as saved in Abacus","example":"ADR"},"name":{"type":"string","format":"string","description":"name of the dossierObject","example":"Adressen"},"translations":{"$ref":"#/definitions/Translations"}}},"Application":{"type":"object","properties":{"id":{"type":"string","format":"string","maxLength":10,"description":"Unique id for an application as saved in Abacus","example":"adre"},"name":{"type":"string","format":"string","description":"name of the application","example":"CRM"},"translations":{"$ref":"#/definitions/Translations"}}},"URL":{"type":"object","properties":{"url":{"type":"string","format":"string","maximum":255,"description":"URL to open the DMS web client with documents for a given search query"}}},"User":{"type":"object","properties":{"name":{"type":"string","format":"string","description":"username in Abacus","example":"meier"},"fullname":{"type":"string","format":"string","description":"firstname and surname","example":"Hans Meier"},"id":{"type":"string","format":"string","maximum":36,"description":"unique user id in Abacus","example":"388f3b0e-741b-e701-740e-705a0fc541c6"}}},"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}}},"responses":{"UnauthorizedError":{"description":"Authentication information is missing or invalid","headers":{"WWW_Authenticate":{"type":"string"}}}},"securityDefinitions":{"outputmanagement_auth":{"type":"basic"}},"security":[{"outputmanagement_auth":[]}]}