{"swagger":"2.0","info":{"version":"v1","title":"topfact Archive! API","description":"REST API for the topfact Archive System. Supports document management, archive management, and role-based access control. \n\n**Authentication:**\n- **Bearer Token**: Use the 'accesskey' header with a JWT token from POST /api/Auth/User\n\n**Resource Groups:**\n- Authentication: User, App and Token Management\n- Archives: Archive and Archive Field Management\n- Documents: Document Management and Search Functions\n- Files: File Upload, Download and Metadata\n\n**Rate Limiting**: Some endpoints are rate-limited (60 requests/minute)","contact":{"name":"topfact AG","url":"https://www.topfact.de","email":"tic@topfact.de"}},"host":"app.topfactcloud.de","basePath":"/topfact/api","schemes":["https"],"paths":{"/api/Annotation/{archiveguid}/{docid}":{"get":{"tags":["Annotation"],"summary":"Get the annotations for the selected document. (Authentication required)","operationId":"Annotation_Get","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"Archive Guid","required":true,"type":"string"},{"name":"docid","in":"path","description":"Document ID","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Annotation/Comment":{"post":{"tags":["Annotation"],"summary":"Add a new annotation comment to the document. (Authentication required)","operationId":"Annotation_AddComment","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"req","in":"body","description":"topfact.Archive.Models.Request.AddAnnotationCommentRequest","required":true,"schema":{"$ref":"#/definitions/AddAnnotationCommentRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Archive":{"get":{"tags":["Archive"],"summary":"Retrieves a list of archives for the authenticated user. (Authentication required)","description":"This method checks for a valid access key in the request.\r\nIf the access key is invalid or not provided, it returns a BadRequest response.\r\nIt also handles exceptions that may occur during the retrieval of archives.","operationId":"Archive_GetArchives","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Archive/{archiveguid}":{"get":{"tags":["Archive"],"summary":"Retrieves an archive based on the provided archive GUID. (Authentication required)","description":"This method logs the execution details if debug logging is enabled.\r\nIt checks for a valid access key in the request and retrieves the corresponding token.\r\nIf the token is valid, it attempts to fetch the archive using the provided GUID.","operationId":"Archive_GetArchive","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"The GUID of the archive to retrieve.","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Archive/Version":{"get":{"tags":["Archive"],"summary":"Retrieves the version of the application. (Authentication required)","description":"This method logs the execution details at the debug level if debugging is enabled.\r\nIt retrieves the version information from the assembly of the application instance.","operationId":"Archive_GetVersion","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Archive/Cache":{"get":{"tags":["Archive"],"summary":"Retrieves cached archives for the authenticated user. (Authentication required)","description":"This method checks for a valid access key in the request, retrieves the associated token,\r\nand then attempts to fetch all cached archives.\r\nIf any errors occur during the fetching process, they are logged.","operationId":"Archive_GetCachedArchives","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}},"delete":{"tags":["Archive"],"summary":"Removes cached archives by invalidating the cache. (Authentication required)","description":"This method is invoked via an HTTP DELETE request to the \"api/Archive/Cache\" route.\r\nIt checks for a valid access key in the request, and if valid, it invalidates the cache.\r\nIf the access key is missing or invalid, it returns a bad request response.","operationId":"Archive_GetRemoveCachedArchives","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Auth/User":{"get":{"tags":["Authentication"],"summary":"Authenticates a user based on the provided HTTP Basic Authorization header and returns a user token if\r\nauthentication is successful.","description":"This method expects the HTTP request to include a Basic Authorization header\r\n            containing user credentials. If authentication fails or the header is missing or invalid, the response will\r\n            indicate the error. The returned token includes the realm set to the request host.","operationId":"Auth_LoginUser","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}},"post":{"tags":["Authentication"],"summary":"Authenticates a user based on the provided login credentials and returns an authentication token if\r\nsuccessful.","description":"This endpoint does not require authentication and is intended for initial user login.\r\n            If authentication succeeds, the returned token includes the realm set to the request host. If authentication\r\n            fails or an error occurs, a descriptive error response is returned.","operationId":"Auth_LoginUserPost","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"The login request containing the user's username and password. Both fields are required and must not be null\r\n            or empty.","required":true,"schema":{"$ref":"#/definitions/LoginRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Auth/App":{"get":{"tags":["Authentication"],"summary":"Authenticates an external application using the provided authorization header.","description":"This method is decorated with the {System.Web.Http.HttpGetAttribute} and {System.Web.Http.RouteAttribute}\r\nto specify that it handles GET requests at the route \"api/Auth/App\".\r\nIt also applies a rate limit of 60 requests per minute per IP address.","operationId":"Auth_LoginExternalApp","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}},"post":{"tags":["Authentication"],"summary":"Authenticates an external application using credentials provided in the request body and returns an\r\nauthentication token if successful.","description":"This endpoint is intended for use by external applications to obtain an\r\n            authentication token. The request must include a valid Authorization header with the application's\r\n            credentials. If authentication fails, the response will indicate whether the credentials are invalid or the\r\n            application registration is inactive or deleted. This endpoint does not require user authentication and is\r\n            rate-limited per IP address.","operationId":"Auth_LoginExternalAppPost","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"The login request containing the application's credentials. Must include valid ClientID and ClientSecret\r\n            information.","required":true,"schema":{"$ref":"#/definitions/LoginAppRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Auth/LongLivedToken":{"post":{"tags":["Authentication"],"summary":"Generates a long-lived token for a user based on the provided credentials and validity duration.","description":"The token validity can be between 1 and 36500 days. This endpoint is intended for\r\n            generating persistent tokens for integrations or automation scenarios.","operationId":"Auth_GenerateLongLivedToken","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"The request containing the username, password, and desired number of validity days.","required":true,"schema":{"$ref":"#/definitions/LongLivedTokenRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Dialog":{"get":{"tags":["Dialog"],"summary":"Get all dialogs for the user. (Authentication required)","operationId":"Dialog_GetDialogs","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Dialog/Type/{type}":{"get":{"tags":["Dialog"],"summary":"Get all user dialogs for the specific type (search, result, add, index). (Authentication required)","operationId":"Dialog_GetDialogsByType","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"type","in":"path","description":"search, result, add, index","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Dialog/{guid}":{"get":{"tags":["Dialog"],"summary":"Get the specific dialog by dialog Guid. (Authentication required)","operationId":"Dialog_GetDialogByDialogGuid","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"guid","in":"path","description":"The Guid for the dialog","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/v2/Document/{archiveguid}/{docguid}":{"get":{"tags":["Document"],"summary":"Get a document with all indexdata and all attached files. (Authentication required)","operationId":"Document_GetDocumentIdFromGuid","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"},{"name":"docguid","in":"path","description":"","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/{archiveguid}/{docid}":{"get":{"tags":["Document"],"summary":"Get a document with all indexdata and all attached files. (Authentication required)","operationId":"Document_GetDocument","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"},{"name":"docid","in":"path","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}},"delete":{"tags":["Document"],"summary":"Delete the document, files and all other status informations from archive. (Authentication required)","operationId":"Document_DeleteDocument","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"},{"name":"docid","in":"path","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Download/{archiveguid}/{docid}":{"get":{"tags":["Document"],"summary":"Download a documents binary as stream. (Authentication required)","operationId":"Document_GetDocumentAsStream","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"The Archive GUID","required":true,"type":"string"},{"name":"docid","in":"path","description":"The Documents Id","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Link/{archiveguid}/{docid}":{"get":{"tags":["Document"],"summary":"Get a unique key to download the document with webbrowser. (Authentication required)","operationId":"Document_GetDocumentDownloadLink","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"},{"name":"docid","in":"path","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Log/{archiveguid}/{docid}":{"get":{"tags":["Document"],"summary":"Returns the protocol for the document. (Authentication required)","operationId":"Document_GetDocumentLog","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"},{"name":"docid","in":"path","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Ocr/{archiveguid}/{docid}":{"get":{"tags":["Document"],"summary":"Retrieves the full text of a document using OCR (Optical Character Recognition). (Authentication required)","description":"This method checks for a valid access key in the request. If the access key is invalid or missing,\r\nit returns a BadRequest response. If the access key is valid, it retrieves the corresponding token\r\nand attempts to fetch the document's OCR data. In case of any exceptions, it returns a BadRequest\r\nresponse with the error message.","operationId":"Document_GetDocumentFulltext","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"The unique identifier for the archive containing the document.","required":true,"type":"string"},{"name":"docid","in":"path","description":"The unique identifier for the document.","required":true,"type":"integer","format":"int32"},{"name":"fileid","in":"query","description":"The unique identifier for the file within the document.","required":false,"type":"integer","format":"int32"},{"name":"pageindex","in":"query","description":"The page index to retrieve. Defaults to -1 if not specified.","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"The maximum number of results to return. Defaults to 100 if not specified.","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Preview/{archiveguid}/{docid}":{"get":{"tags":["Document"],"summary":"Get the preview image for the document if exists. (Authentication required)","operationId":"Document_GetDocumentPreview","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"},{"name":"docid","in":"path","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Thumb/{archiveguid}/{docid}":{"get":{"tags":["Document"],"summary":"Get the thumbnail for the document. (Authentication required)","operationId":"Document_GetDocumentThumbnail","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"},{"name":"docid","in":"path","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document":{"put":{"tags":["Document"],"summary":"Changes the indexdata for a document (Authentication required)","operationId":"Document_ChangeDocumentIndexData","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/ChangeDocumentRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}},"post":{"tags":["Document"],"summary":"Add a new document to topfact Archiv. (Authentication required)","operationId":"Document_AddDocument","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/AddDocumentRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Create":{"post":{"tags":["Document"],"summary":"Create a new document in topfact Archiv without files. Files must added after the request is complete. Use AddFile to add file to the document. (Authentication required)","operationId":"Document_CreateDocument","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/CreateDocumentRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Merge":{"post":{"tags":["Document"],"summary":"Merge multiple archive files from docid into a existing document. (Authentication required)","operationId":"Document_MergeDocuments","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/MergeDocumentRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Link":{"post":{"tags":["Document"],"summary":"Creates a document link with a validity period and a unique key to download the document with webbrowser. (Authentication required)","operationId":"Document_CreateDocumentLink","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/GetDocumentLinkRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Export":{"post":{"tags":["Document"],"summary":"Export a document (Authentication required)","operationId":"Document_DownloadDocument","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/DownloadDocumentRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/FieldValues":{"post":{"tags":["Document"],"summary":"Returns all unique values for a archive field (Authentication required)","operationId":"Document_GetDocumentsFieldValues","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/GetFieldValuesRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Lock":{"put":{"tags":["Document"],"summary":"Lock or unlock the requested document. (Authentication required)","operationId":"Document_LockDocument","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/LockDocumentRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Image/{archiveguid}/{docid}":{"delete":{"tags":["Document"],"summary":"Delete the image status for the requested document. (Authentication required)","operationId":"Document_DeleteImageStatus","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"},{"name":"docid","in":"path","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/OCR/{archiveguid}/{docid}":{"delete":{"tags":["Document"],"summary":"Delete the ocr status for the requested document. (Authentication required)","operationId":"Document_DeleteOcrStatus","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"},{"name":"docid","in":"path","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/File/{archiveguid}/{docid}":{"get":{"tags":["File"],"summary":"Get all files for the document (include filecontent). (Authentication required)","operationId":"File_GetFiles","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"},{"name":"docid","in":"path","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}},"post":{"tags":["File"],"summary":"Add a new file to an existing stored document as stream. This is for large files. (Authentication required)","operationId":"File_AddFileAsStream","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"Archive Guid","required":true,"type":"string"},{"name":"docid","in":"path","description":"Document ID","required":true,"type":"integer","format":"int32"},{"name":"filename","in":"query","description":"Filename","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/File/{archiveguid}/{docid}/{fileid}":{"get":{"tags":["File"],"summary":"Get the specific file for the document <b>(inculde filecontent)</b>. (Authentication required)","operationId":"File_GetFile","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"Archive Guid","required":true,"type":"string"},{"name":"docid","in":"path","description":"Document ID","required":true,"type":"integer","format":"int32"},{"name":"fileid","in":"path","description":"File ID","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}},"delete":{"tags":["File"],"summary":"Delete additional files attached to a document, the main file cannot deleted (Authentication required)","operationId":"File_DeleteFile","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"},{"name":"docid","in":"path","description":"","required":true,"type":"integer","format":"int32"},{"name":"fileid","in":"path","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/File/Info/{archiveguid}/{docid}":{"get":{"tags":["File"],"summary":"Return all files to the document without file binaries. (Authentication required)","operationId":"File_GetFilesInfo","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"Archive Guid","required":true,"type":"string"},{"name":"docid","in":"path","description":"Document ID","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/File/Ocr/{archiveguid}/{docid}/{fileid}":{"get":{"tags":["File"],"summary":"Return the fulltext of the file. (Authentication required)","operationId":"File_GetFileFulltext","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"Archive Guid","required":true,"type":"string"},{"name":"docid","in":"path","description":"Document ID","required":true,"type":"integer","format":"int32"},{"name":"fileid","in":"path","description":"File ID","required":true,"type":"integer","format":"int32"},{"name":"pageindex","in":"query","description":"Page index of the fulltext to return","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"Limit of fulltext characters to return","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/File/Stream/{archiveguid}/{docid}/{fileid}":{"get":{"tags":["File"],"summary":"Download only the file binary as stream. Use parameter format with original or pdf. (Authentication required)","operationId":"File_GetFileAsStream","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"Archive GUID","required":true,"type":"string"},{"name":"docid","in":"path","description":"Documents ID","required":true,"type":"integer","format":"int32"},{"name":"fileid","in":"path","description":"File ID","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/File/Stream":{"post":{"tags":["File"],"summary":"Retrieves a file as a stream based on the provided request parameters.\r\nThis method is invoked via an HTTP POST request to the specified route. (Authentication required)","description":"The method performs the following operations:\r\n1. Logs the execution details if debug logging is enabled.\r\n2. Validates the access key for authentication.\r\n3. Validates the request parameters (ArchiveGuid, DocId, FileId).\r\n4. Retrieves the file using the file service and prepares it for streaming.\r\n5. Handles exceptions and logs errors as necessary.","operationId":"File_GetFileAsStreamWithPost","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"req","in":"body","description":"The request object containing parameters for file retrieval.","required":true,"schema":{"$ref":"#/definitions/GetFileRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/File":{"put":{"tags":["File"],"summary":"Update file position and visibility (Authentication required)","operationId":"File_UpdateFile","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/UpdateFileRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}},"post":{"tags":["File"],"summary":"Add a new file to an existing stored document. (Authentication required)","operationId":"File_AddFile","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/AddFileRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/File/Version":{"put":{"tags":["File"],"summary":"Move the file to the history and create a new file version. (Authentication required)","operationId":"File_UpdateFile","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/NewFileVersionRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/File/Rename":{"put":{"tags":["File"],"summary":"Renames a file based on the provided request data. (Authentication required)","description":"This method requires a valid access key for authentication. If the access key is\r\nnot provided or invalid, a bad request response is returned. The method also\r\nhandles exceptions and returns an appropriate error message.","operationId":"File_RenameFile","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"The request containing the details for renaming the file.","required":true,"schema":{"$ref":"#/definitions/RenameFileRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Info/Version":{"get":{"tags":["Info"],"summary":"Retrieves the version of the application. (Authentication required)","description":"This method responds to HTTP GET requests at the route \"api/info/version\".\r\nIt extracts the version information from the assembly of the application instance.","operationId":"Info_GetVersion","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/List/Dynamic":{"get":{"tags":["List"],"summary":"Get all mobile lists for the current user. (Authentication required)","operationId":"List_GetUserLists","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/List/Simple":{"get":{"tags":["List"],"summary":" (Authentication required)","operationId":"List_GetSimpleStructures","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/OCR/Status":{"get":{"tags":["OCR"],"summary":"Retrieves the count of unprocessed files. (Authentication required)","description":"This method is decorated with the {System.Web.Http.HttpGetAttribute} and {System.Web.Http.RouteAttribute}\r\nto specify that it responds to GET requests at the route \"api/OCR/Unprocessed\".","operationId":"OCR_GetUnprocessedFileCount","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/OCR/File":{"get":{"tags":["OCR"],"summary":"Retrieves an unprocessed file for OCR processing. (Authentication required)","operationId":"OCR_GetUnprocessedFile","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}},"post":{"tags":["OCR"],"summary":"Adds a file to the OCR (Optical Character Recognition) processing queue. (Authentication required)","description":"This method handles the HTTP POST request to the specified route.\r\nIt performs pre-authentication by validating the access key from the request.\r\nIf the access key is valid, it retrieves the associated token.\r\nIf the access key or token is invalid, it returns a bad request response.\r\nCurrently, the implementation for adding the file is not completed.","operationId":"OCR_AddFileToOcr","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/OCR/File/Result":{"post":{"tags":["OCR"],"summary":"Handles the OCR file result submission. (Authentication required)","description":"This method performs the following steps:\r\n1. Validates the access key from the request.\r\n2. Retrieves the token associated with the access key.\r\n3. Processes the OCR result using the OCR service.\r\n4. Returns appropriate HTTP responses based on the processing result.","operationId":"OCR_FileOcrResult","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"value","in":"body","description":"The OCR result data to be processed.","required":true,"schema":{"$ref":"#/definitions/OcrResult"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Search":{"get":{"tags":["Search"],"summary":"Searches for documents in the specified archive using the provided search criteria and returns the matching\r\nresults or the count of matching documents. (Authentication required)","description":"Authentication is required via an access key provided in the request. The method\r\n            enforces a maximum result count of 10,000 documents per request. If no columns are specified, all document\r\n            fields are included in the response.","operationId":"Search_GetSearchDocuments","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"query","description":"The unique identifier of the archive to search within. Must be a valid GUID string.","required":true,"type":"string"},{"name":"search","in":"query","description":"The search criteria, specified as a semicolon-separated list of field-value pairs in the format\r\n            'Field=Value'. Each pair defines a search condition.","required":true,"type":"string"},{"name":"columns","in":"query","description":"A comma-separated list of document fields to include in the results. If empty, all fields are returned.","required":false,"type":"string"},{"name":"count","in":"query","description":"The maximum number of documents to return. The value must be between 1 and 10,000. Defaults to 10,000.","required":false,"type":"integer","format":"int32"},{"name":"countOnly","in":"query","description":"If set to <see langword=\"true\" />, only the count of matching documents is returned; otherwise, the matching\r\n            documents are returned.","required":false,"type":"boolean"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}},"post":{"tags":["Search"],"summary":"Searches for documents based on the provided search request. (Authentication required)","description":"This method is accessible via HTTP POST at the following routes:\r\n- api/Search\r\n- api/Document/Search","operationId":"Search_SearchDocuments","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"The search request containing the parameters for the search.","required":true,"schema":{"$ref":"#/definitions/SearchRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/Search":{"post":{"tags":["Search"],"summary":"Searches for documents based on the provided search request. (Authentication required)","description":"This method is accessible via HTTP POST at the following routes:\r\n- api/Search\r\n- api/Document/Search","operationId":"Search_SearchDocuments","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"The search request containing the parameters for the search.","required":true,"schema":{"$ref":"#/definitions/SearchRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Search/DocIDs":{"post":{"tags":["Search"],"summary":"Searches for documents by their IDs based on the provided search request. (Authentication required)","description":"This API endpoint supports two routes:\r\n- api/Search/DocIDs\r\n- api/Document/SearchIDs","operationId":"Search_SearchDocumentsByIDs","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"The search request containing the necessary parameters for the search.","required":true,"schema":{"$ref":"#/definitions/SearchRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/SearchIDs":{"post":{"tags":["Search"],"summary":"Searches for documents by their IDs based on the provided search request. (Authentication required)","description":"This API endpoint supports two routes:\r\n- api/Search/DocIDs\r\n- api/Document/SearchIDs","operationId":"Search_SearchDocumentsByIDs","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"The search request containing the necessary parameters for the search.","required":true,"schema":{"$ref":"#/definitions/SearchRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Search/Professional":{"post":{"tags":["Search"],"summary":"Searches for professional documents based on the provided search request. (Authentication required)","description":"This API endpoint supports two routes:\r\n- api/Search/Professional\r\n- api/Document/SearchProfessional","operationId":"Search_SearchDocumentsProfessional","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"The professional search request containing the search parameters.","required":true,"schema":{"$ref":"#/definitions/ProfessionalSearchRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Document/SearchProfessional":{"post":{"tags":["Search"],"summary":"Searches for professional documents based on the provided search request. (Authentication required)","description":"This API endpoint supports two routes:\r\n- api/Search/Professional\r\n- api/Document/SearchProfessional","operationId":"Search_SearchDocumentsProfessional","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"The professional search request containing the search parameters.","required":true,"schema":{"$ref":"#/definitions/ProfessionalSearchRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Stamp/Archive/{archiveguid}":{"get":{"tags":["Stamp"],"summary":"Get all stamps for the selected archive. (Authentication required)","operationId":"Stamp_GetStamps","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Stamp/Groups/{archiveguid}":{"get":{"tags":["Stamp"],"summary":"Get the users stamps in the selected archive, assigned to his groups. (Authentication required)","operationId":"Stamp_GetStampsForGroup","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveguid","in":"path","description":"","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/Stamp/Structure/{strukturId}":{"get":{"tags":["Stamp"],"summary":" (Authentication required)","operationId":"Stamp_GetStampsForGroup","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"strukturId","in":"path","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/User":{"get":{"tags":["User"],"summary":"Retrieves the user information based on the provided access key. (Authentication required)","description":"This method checks for a valid access key in the request. If the access key is valid,\r\nit retrieves the corresponding user information. In case of any exceptions,\r\nit returns a 400 Bad Request with the exception message.","operationId":"User_GetUser","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/User/License":{"get":{"tags":["User"],"summary":"Retrieves the user licenses for the authenticated user. (Authentication required)","description":"This method is decorated with a rate limit attribute that allows a maximum of 100 requests\r\nper IP address within a 60-second time window.","operationId":"User_GetUserLicense","consumes":[],"produces":["application/json","text/json","application/bson"],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/User/Profiles/{archiveGuid}":{"get":{"tags":["User"],"summary":"Retrieves user profiles based on the provided archive GUID. (Authentication required)","description":"This method is decorated with a rate limit attribute that allows a maximum of 100 requests\r\nper IP address within a 60-second time window.","operationId":"User_GetUserProfiles","consumes":[],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"archiveGuid","in":"path","description":"The unique identifier for the archive whose user profiles are to be retrieved.","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}},"/api/User/Logout":{"post":{"tags":["User"],"summary":"Logs out a user from the system. (Authentication required)","description":"This method checks for a valid access key in the request, retrieves the associated token,\r\nand attempts to log out the user. If successful, it returns a response indicating the logout was successful.\r\nIf any errors occur during the process, an error response is returned with details.","operationId":"User_LogoutUser","consumes":["application/json","text/json","application/bson"],"produces":["application/json","text/json","application/bson"],"parameters":[{"name":"request","in":"body","description":"The logout request containing necessary information for logging out the user.","required":true,"schema":{"$ref":"#/definitions/LogoutRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}}},"definitions":{"AddAnnotationCommentRequest":{"type":"object","properties":{"StampId":{"format":"int32","type":"integer"},"ArchiveGuid":{"type":"string"},"DocId":{"format":"int32","type":"integer"},"Title":{"type":"string"},"Comment":{"type":"string"},"Token":{"$ref":"#/definitions/Token"}}},"Token":{"type":"object","properties":{"OrgId":{"format":"int32","type":"integer"},"OrgGuid":{"type":"string"},"UserId":{"format":"int32","type":"integer"},"UserGuid":{"type":"string"},"Username":{"type":"string"},"UserNumber":{"type":"string"},"EMail":{"type":"string"},"CreatedAt":{"format":"date-time","type":"string"},"ValidTo":{"format":"date-time","type":"string"},"Realm":{"type":"string"},"IsDelegated":{"type":"boolean"},"AccessKey":{"type":"string"}}},"LoginRequest":{"type":"object","properties":{"Username":{"type":"string"},"Password":{"type":"string"},"Scope":{"type":"string"}}},"LoginAppRequest":{"type":"object","properties":{"ClientId":{"type":"string"},"ClientSecret":{"type":"string"},"Scope":{"type":"string"}}},"LongLivedTokenRequest":{"type":"object","properties":{"Username":{"type":"string"},"Password":{"type":"string"},"Days":{"format":"int32","type":"integer"}}},"AddDocumentRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"ArchiveFields":{"type":"array","items":{"$ref":"#/definitions/ArchiveField"}},"Indexfields":{"type":"array","items":{"$ref":"#/definitions/IndexField"}},"ArchiveFiles":{"type":"array","items":{"$ref":"#/definitions/ArchiveFile"}},"Token":{"$ref":"#/definitions/Token"}}},"ArchiveField":{"type":"object","properties":{"FieldId":{"format":"int32","type":"integer"},"FieldGuid":{"type":"string"},"ArchiveId":{"format":"int32","type":"integer"},"Fieldname":{"type":"string"},"Description":{"type":"string"},"Fieldtype":{"type":"string"},"Fieldlength":{"format":"int32","type":"integer"},"FieldAlias":{"type":"string"},"Sysfield":{"type":"boolean"},"Value":{"type":"object"},"Precision":{"format":"int32","type":"integer"},"DefaultValueAction":{"format":"int32","type":"integer"},"DefaultValueType":{"format":"int32","type":"integer"},"DefaultValue":{"type":"string"},"DefaultValueOptional":{"type":"boolean"},"IsIndexed":{"type":"boolean"},"Indexname":{"type":"string"}}},"IndexField":{"type":"object","properties":{"Fieldname":{"type":"string"},"Value":{"type":"object"}}},"ArchiveFile":{"type":"object","properties":{"ArchiveId":{"format":"int32","type":"integer"},"ArchiveGuid":{"type":"string"},"DocId":{"format":"int32","type":"integer"},"DocGuid":{"type":"string"},"FileId":{"format":"int32","type":"integer"},"FileGuid":{"type":"string"},"StorageId":{"format":"int32","type":"integer"},"Filename":{"type":"string"},"Fileextension":{"type":"string"},"Filelength":{"format":"int32","type":"integer"},"Filebinary":{"format":"byte","type":"string"},"Position":{"format":"int32","type":"integer"},"Version":{"format":"int32","type":"integer"},"Visible":{"type":"boolean"},"ImageStatus":{"format":"int32","type":"integer"},"FulltextStatus":{"format":"int32","type":"integer"},"PageCount":{"format":"int32","type":"integer"},"DateCreated":{"format":"date-time","type":"string"},"UserCreated":{"type":"string"},"DateModified":{"format":"date-time","type":"string"},"UserModified":{"type":"string"}}},"ChangeDocumentRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"DocId":{"format":"int32","type":"integer"},"Indexdata":{"type":"array","items":{"$ref":"#/definitions/ArchiveField"}},"Indexfields":{"type":"array","items":{"$ref":"#/definitions/IndexField"}},"ReturnDocument":{"type":"boolean"},"Token":{"$ref":"#/definitions/Token"}}},"CreateDocumentRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"Indexfields":{"type":"array","items":{"$ref":"#/definitions/IndexField"}},"Token":{"$ref":"#/definitions/Token"}}},"MergeDocumentRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"MasterDocId":{"format":"int32","type":"integer"},"DocumentsToMerge":{"type":"array","items":{"format":"int32","type":"integer"}},"Token":{"$ref":"#/definitions/Token"}}},"GetDocumentLinkRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"DocId":{"format":"int32","type":"integer"},"ValidDays":{"format":"int32","type":"integer"},"DateCreated":{"format":"date-time","type":"string"},"Token":{"$ref":"#/definitions/Token"}}},"DownloadDocumentRequest":{"type":"object","properties":{"DocId":{"format":"int32","type":"integer"},"ArchiveGuid":{"type":"string"},"AsPdf":{"type":"boolean"},"WithAnnotations":{"type":"boolean"},"Token":{"$ref":"#/definitions/Token"}}},"GetFieldValuesRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"Fieldname":{"type":"string"},"Filter":{"type":"string"},"Count":{"format":"int32","type":"integer"},"UseLikeSearch":{"type":"boolean"},"Searchfields":{"type":"array","items":{"$ref":"#/definitions/SearchField"}},"Token":{"$ref":"#/definitions/Token"}}},"SearchField":{"type":"object","properties":{"Fieldname":{"type":"string"},"Criterion":{"type":"string"},"Value":{"type":"object"},"ValueTo":{"type":"object"},"ValueType":{"format":"int32","type":"integer"}}},"LockDocumentRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"DocId":{"format":"int32","type":"integer"},"ShouldLock":{"type":"boolean"},"Token":{"$ref":"#/definitions/Token"}}},"GetFileRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"DocId":{"format":"int32","type":"integer"},"FileId":{"format":"int32","type":"integer"},"WithBinaries":{"type":"boolean"},"AsPdf":{"type":"boolean"},"WithAnnotations":{"type":"boolean"},"Token":{"$ref":"#/definitions/Token"}}},"AddFileRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"DocId":{"format":"int32","type":"integer"},"File":{"$ref":"#/definitions/ArchiveFile"},"Token":{"$ref":"#/definitions/Token"}}},"UpdateFileRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"DocId":{"format":"int32","type":"integer"},"FileId":{"format":"int32","type":"integer"},"ChangePosition":{"type":"boolean"},"Position":{"format":"int32","type":"integer"},"ChangeVisiblility":{"type":"boolean"},"Visible":{"type":"boolean"},"SetAsVisibleOnly":{"type":"boolean"},"Token":{"$ref":"#/definitions/Token"}}},"NewFileVersionRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"DocId":{"format":"int32","type":"integer"},"OldFileId":{"format":"int32","type":"integer"},"NewFileId":{"format":"int32","type":"integer"},"Token":{"$ref":"#/definitions/Token"}}},"RenameFileRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"DocId":{"format":"int32","type":"integer"},"FileId":{"format":"int32","type":"integer"},"NewFileName":{"type":"string"},"Token":{"$ref":"#/definitions/Token"}}},"OcrResult":{"type":"object","properties":{"Status":{"type":"string"},"StatusCode":{"format":"int32","type":"integer"},"Message":{"type":"string"},"OcrClient":{"type":"string"},"ProcessingGuid":{"type":"string"},"Confidence":{"format":"float","type":"number"},"DeskewAngle":{"format":"float","type":"number"},"ImageWidth":{"format":"int32","type":"integer"},"ImageHeight":{"format":"int32","type":"integer"},"Language":{"type":"string"},"PageOrientation":{"type":"string"},"Text":{"type":"string"},"WordCount":{"format":"int32","type":"integer"},"LineCount":{"format":"int32","type":"integer"},"RegionCount":{"format":"int32","type":"integer"},"Words":{"type":"array","items":{"$ref":"#/definitions/OcrWord"}}}},"OcrWord":{"type":"object","properties":{"Word":{"type":"string"},"Confidence":{"format":"float","type":"number"},"Height":{"format":"int32","type":"integer"},"Width":{"format":"int32","type":"integer"},"X":{"format":"int32","type":"integer"},"Y":{"format":"int32","type":"integer"}}},"SearchRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"Searchfields":{"type":"array","items":{"$ref":"#/definitions/SearchField"}},"Columns":{"type":"array","items":{"type":"string"}},"RowCount":{"format":"int32","type":"integer"},"DocIds":{"type":"array","items":{"format":"int32","type":"integer"}},"CustomFilter":{"type":"string"},"OrderField":{"type":"string"},"DocumentCountOnly":{"type":"boolean"},"HideLockedDocuments":{"type":"boolean"},"Token":{"$ref":"#/definitions/Token"}}},"ProfessionalSearchRequest":{"type":"object","properties":{"ArchiveGuid":{"type":"string"},"RowCount":{"format":"int32","type":"integer"},"Columns":{"type":"array","items":{"type":"string"}},"ProfessionalQuery":{"type":"string"},"SortQuery":{"type":"string"},"HideLockedDocuments":{"type":"boolean"},"Token":{"$ref":"#/definitions/Token"}}},"LogoutRequest":{"type":"object","properties":{"Token":{"$ref":"#/definitions/Token"}}}}}