diff --git a/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/documine.yaml b/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/documine.yaml index 8a636dacd..66f94bd9e 100644 --- a/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/documine.yaml +++ b/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/documine.yaml @@ -6,9 +6,12 @@ info: The DocuMine API provides a comprehensive solution for managing resources such as dossiers and their associated files. Users can also retrieve components of files that have been processed and extracted by the system. - All endpoints are secured using OAuth2, with the "authorizationCode" being the supported authorization flow. + All endpoints are secured using OAuth2, with the "authorizationCode" being the general supported authorization flow. Obtain a JWT token for authentication and send it in the 'Authorization' header with the format `Bearer {JWT_TOKEN}`. + Please also note that the `authorizationUrl` and `tokenUrl` in this specification contain `{workspaceId}` placeholders that + must be replaced by your respective RedactManager workspace identifier. + Example Headers: ```properties Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI... @@ -36,7 +39,9 @@ tags: description: Operations for managing files within a dossier. - name: 4. Components description: Operations related to components of a file within a dossier. - - name: 5. License + - name: 5. Users + description: Operations related to users. + - name: 6. License description: Operations related to license information and usage metrics. paths: /api/dossier-templates: @@ -266,6 +271,69 @@ paths: $ref: '#/components/responses/429' "500": $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}/dossier-status-definitions: + get: + summary: Returns the list of all existing dossier status definitions + tags: + - 1. Dossier Templates + description: | + Retrieves a collection of dossier status definitions associated with a specific dossier template. Each dossier + status definition includes details such as the status name, description, and other relevant metadata. This endpoint + is useful for clients needing to display or set the status of a dossier associated with a specific dossier template. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/DossierStatusDefinitionList' + description: | + Successfully returned the dossier status definitions for the specified dossier template. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier-template' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}/dossier-attribute-definitions: + get: + summary: Returns the list of all existing dossier attribute definitions + tags: + - 1. Dossier Templates + description: | + Retrieves a collection of dossier attribute definitions associated with a specific dossier template. Each dossier + attribute definition includes details such as attribute type, name, and other relevant metadata. This endpoint + is useful for clients needing to understand what attributes are expected or allowed for dossiers associated with + a specific dossier template. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/DossierAttributeDefinitionList' + description: | + Successfully returned the dossier attribute definitions for the specified dossier template. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier-template' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/file-attribute-definitions: get: summary: Returns the list of all existing file attribute definitions @@ -274,8 +342,8 @@ paths: description: | Retrieves a collection of file attribute definitions associated with a specific dossier template. Each file attribute definition includes details such as attribute type, name, and other relevant metadata. This endpoint - is useful for clients needing to understand what attributes are expected or allowed for files under a particular - dossier template. + is useful for clients needing to understand what attributes are expected or allowed for files associated with + a specific dossier template. parameters: - $ref: '#/components/parameters/dossierTemplateId' responses: @@ -286,6 +354,18 @@ paths: $ref: '#/components/schemas/FileAttributeDefinitionList' description: | Successfully returned the file attribute definitions for the specified dossier template. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier-template' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossiers: get: operationId: getDossiers @@ -444,6 +524,42 @@ paths: $ref: '#/components/responses/429' "500": $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/attributes: + post: + operationId: setDossierAttributes + tags: + - 2. Dossiers + summary: Update or set attributes for a specific dossier. + description: | + This endpoint facilitates the updating or setting of specific dossier attributes for a given dossier. + Ensure you provide the necessary dossier attributes within the request body. + + Use this route to maintain or enhance dossier metadata and properties. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/dossierId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DossierAttributes' + required: true + responses: + "204": + description: | + Dossier attributes successfully updated. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files: get: operationId: getDossierStatus @@ -564,10 +680,14 @@ paths: File deletion successful. This confirms the absence of the specified file, irrespective of its previous existence. "400": $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' "403": $ref: '#/components/responses/403' "404": $ref: '#/components/responses/404-file' + "429": + $ref: '#/components/responses/429' "500": $ref: '#/components/responses/500' get: @@ -594,10 +714,14 @@ paths: Successfully retrieved the status of the requested file. "400": $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' "403": $ref: '#/components/responses/403' "404": $ref: '#/components/responses/404-file' + "429": + $ref: '#/components/responses/429' "500": $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/bulk/delete: @@ -630,10 +754,14 @@ paths: Bulk file deletion successful. "400": $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' "403": $ref: '#/components/responses/403' "404": $ref: '#/components/responses/404-dossier' + "429": + $ref: '#/components/responses/429' "500": $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/{fileId}/attributes: @@ -658,15 +786,19 @@ paths: $ref: '#/components/schemas/FileAttributes' required: true responses: - "200": + "204": description: | File attributes successfully updated. "400": $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' "403": $ref: '#/components/responses/403' "404": $ref: '#/components/responses/404-file' + "429": + $ref: '#/components/responses/429' "500": $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/{fileId}/components: @@ -699,10 +831,14 @@ paths: Successfully retrieved file components. "400": $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' "403": $ref: '#/components/responses/403' "404": $ref: '#/components/responses/404-file' + "429": + $ref: '#/components/responses/429' "500": $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/bulk/get-components: @@ -733,19 +869,81 @@ paths: $ref: '#/components/schemas/FileComponentsList' description: | Successfully fetched components for all files in the dossier. - "404": - $ref: '#/components/responses/404-dossier' "400": $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' "403": $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' + /api/users: + get: + operationId: getUsers + tags: + - 5. Users + - tenant-user-management + summary: Get a list of users + description: | + This endpoint facilitates to retrieve a list of known users. + + With the `username` parameter you can filter for a specific user name. If the parameter is + used, the returned list either contains a single matching entry or is empty. + parameters: + - $ref: '#/components/parameters/username' + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/UserList' + description: List of users successfully retrieved. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' + /api/users/{userId}: + get: + operationId: getUserById + tags: + - 5. Users + summary: Retrieve a specific user by its identifier. + description: | + This endpoint facilitates to retrieve a specific user. + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: User successfully retrieved. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-user' + "429": + $ref: '#/components/responses/429' "500": $ref: '#/components/responses/500' /api/license/active/usage: post: - operationId: getReport + operationId: getLicenseReport tags: - - 5. License + - 6. License summary: Generate and retrieve a license usage report. description: | This endpoint enables users to create and fetch a report detailing the active usage of licenses. The report contains @@ -767,18 +965,16 @@ paths: License report successfully generated and retrieved. "400": $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' "403": $ref: '#/components/responses/403' + "429": + $ref: '#/components/responses/429' "500": $ref: '#/components/responses/500' components: headers: - X-Tenant-ID: - description: Tenant identifier, also known as the *Workspace ID* in the application. - required: true - schema: - type: string - example: 'my-workspace' Authorization: description: JWT token for authorization. Format should be `Bearer {JWT_TOKEN}`. required: true @@ -835,6 +1031,20 @@ components: Some endpoints support a `includeSoftDeleted` parameter: If this is set to `true`, this response is returned only if the file is deleted permanently. + "404-download": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorMessage' + description: | + Download not found. This happens if the requested download does not exist for the current user. + "404-user": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorMessage' + description: | + User not found. This happens if the requested user does not exist. "409-dossier-conflict": content: '*/*': @@ -1092,6 +1302,17 @@ components: - `true`: The component object's field `componentDetails` stores detailed information about the *source* of its respective value(s). - `false` (default): The component object does not contain a field `componentDetails`. + username: + name: username + in: query + required: false + schema: + type: string + style: form + explode: true + description: | + If the `username` parameter is set, the user list is filtered for that specific user name. This means the list + either has one matching entry or is empty. schemas: EntityReference: type: object @@ -1391,6 +1612,96 @@ components: entityRuleId: DEF.13.37 type: another_entity_type page: 456 + DossierStatusDefinition: + type: object + description: | + The `DossierStatusDefinition` object contains the relevant information to define a dossier status. The dossier status + is used to assign a custom status to a dossier. + properties: + id: + type: string + format: uuid + description: | + A unique identifier for the dossier status definition. This ID is automatically generated by + the system upon creation and is used for referencing the dossier status definition in API calls. + example: bcd22239-cedf-442f-a5a1-1664cba94dc6 + name: + type: string + description: | + User-defined name of the dossier status definition, capturing its essence. The name needs to be unique + for the dossier template. + example: "Done" + description: + type: string + description: | + A text that can be added to provide further details about the status. E.g., what it is intended for or + the circumstances under which it can be used. + example: "Dossiers with this status should only contain approved files and indicate that the users have completed the redactions." + rank: + format: int32 + type: integer + description: | + A number that allows to define a custom display order. + default: "" + example: 1 + color: + type: string + description: | + A hexadecimal color code that can be set to assign a color to a + the `PREVIEW` file. + + - Yellow is `#ffda05` + - Green is `#5eb160` + example: "#5eb160" + required: + - name + - rank + - color + DossierAttributeDefinition: + type: object + description: | + The `DossierAttributeDefinition` object contains the relevant information to define a dossier attribute. Dossier attributes + are used to manage additional meta-data of dossiers. + properties: + id: + type: string + format: uuid + description: | + A unique identifier for the dossier attribute definition. This ID is automatically generated by + the system upon creation and is used for referencing the dossier attribute definition in API calls. + name: + type: string + description: | + User-defined name of the dossier attribute definition, capturing its essence. The name needs to be unique + for the dossier template. + type: + type: string + enum: + - TEXT + - NUMBER + - DATE + description: | + Determines the type of the dossier attribute's value. Please note that currently the system + does not validate the values against this definition. This is just a hint for a user interface + that needs to handle invalid entries. Possible values for the type: + - `TEXT`: The value is just a string, i.e., any sequence of characters. + - `NUMBER`: The value is a string expressing a number, with or without decimals. + - `DATE`: The value is a string expressing a date information. + reportingPlaceholder: + type: string + description: | + The name of the placeholder of the dossier attribute that can be used in report templates. The + placeholder follows a specific format convention: + `{{dossier.attribute.}}` while the name is transformed into 'PascalCase' and does not contain + whitespaces. The placeholder is unique in a dossier template. + required: + - name + - type + example: + id: "123e4567-e89b-12d3-a456-426614174000" + name: "Document Summary" + type: "TEXT" + reportingPlaceholder: "{{dossier.attribute.DocumentSummary}}" FileAttributeDefinition: type: object description: | @@ -1415,7 +1726,7 @@ components: - NUMBER - DATE description: | - Determines the type of the dossier attribute's value. Please note that currently the system + Determines the type of the file attribute's value. Please note that currently the system does not validate the values against this definition. This is just a hint for a user interface that needs to handle invalid entries. Possible values for the type: - `TEXT`: The value is just a string, i.e., any sequence of characters. @@ -1429,7 +1740,7 @@ components: type: string description: | The name of the placeholder of the file attribute that can be used in report templates. The placeholder follows a specific format convention: - `{{file.attribute.}}` while the name transformed into 'PascalCase' and does not contain whitespaces. The placeholder is unique in a dossier template. + `{{file.attribute.}}` while the name is transformed into 'PascalCase' and does not contain whitespaces. The placeholder is unique in a dossier template. displaySettings: $ref: '#/components/schemas/FileAttributeDisplaySettings' required: @@ -1449,24 +1760,24 @@ components: FileAttributeDisplaySettings: type: object description: | - Display setting for the RedactManager and DocuMine user interface. These settings control how the UI handles and presents the file attributes. + Display setting for the DocuMine user interface. These settings control how the UI handles and presents the file attributes. properties: primaryAttribute: type: boolean description: | - If `true`, the RedactManager and DocuMine user interfaces show the value of the file attribute in the file list below the file name. + If `true`, the DocuMine user interfaces show the value of the file attribute in the file list below the file name. editable: type: boolean description: | - If `true`, the RedactManager and DocuMine user interfaces allow manual editing of the value. Otherwise only importing and setting by rules would be possible. + If `true`, the DocuMine user interfaces allow manual editing of the value. Otherwise only importing and setting by rules would be possible. filterable: type: boolean description: | - If `true`, the RedactManager and DocuMine user interfaces add filter options to the file list. + If `true`, the DocuMine user interfaces add filter options to the file list. displayedInFileList: type: boolean description: | - if `true`, the RedactManager and DocuMine user interfaces show the values in the file list. + if `true`, the DocuMine user interfaces show the values in the file list. required: - primaryAttribute - editable @@ -1477,6 +1788,44 @@ components: editable: true filterable: true displayedInFileList: false + DossierStatusDefinitionList: + type: object + description: A list of dossier status definitions. + properties: + dossierStatusDefinitions: + items: + $ref: '#/components/schemas/DossierStatusDefinition' + type: array + example: + dossierStatusDefinitions: + - id: "123e7567-e89b-12d3-a456-426614174000" + name: "In Progress" + description: "Dossiers with this status are currently being processed by the users." + rank: 0 + color: "#ffda05" + - id: "23e45378-e90b-12d3-a456-765114174321" + name: "Done" + description: "Dossiers with this status should only contain approved files and indicate that the users have completed the component extraction." + rank: 1 + color: "#5eb160" + DossierAttributeDefinitionList: + type: object + description: A list of dossier attribute definitions. + properties: + dossierAttributeDefinitions: + items: + $ref: '#/components/schemas/DossierAttributeDefinition' + type: array + example: + dossierAttributeDefinitions: + - id: "123e4567-e89b-12d3-a456-426614174000" + name: "Dossier Summary" + type: "TEXT" + reportingPlaceholder: "{{dossier.attribute.DossierSummary}}" + - id: "23e45678-e90b-12d3-a456-765114174321" + name: "Comment" + type: "TEXT" + reportingPlaceholder: "{{dossier.attribute.Comment}}" FileAttributeDefinitionList: type: object description: A list of file attribute definitions. @@ -1546,6 +1895,32 @@ components: filenameMappingCsvColumnHeader: "Filename" delimiter: "," encoding: "UTF-8" + ReportTemplateIdList: + type: array + items: + type: string + format: uuid + uniqueItems: true + description: | + List of template identifiers indicating which templates are used for generating reports or other outputs. + The reports are generated when requesting a download package. + example: + - b79cb3ba-745e-5d9a-8903-4a02327a7e09 + - fb3463a0-7d6e-54a3-bcd8-1b93388c648d + DossierAttributes: + type: object + description: Additional dossier attributes that can be set + properties: + attributeIdToValue: + additionalProperties: + type: string + type: object + example: + attributeIdToValue: + "1049a73c-8013-45d6-8217-0845a4ff1c61": This is a dossier attribute value + "79d5a138-d30a-4014-ad7f-43ffba1f4d04": This is yet another dossier attribute value + "1d30d9e8-4a6c-4ef0-96a0-7bef62e138db": "1234" + "b337b65a-0481-48d9-92e6-79e34760ef01": "1. January 1337" Dossier: type: object description: | @@ -1628,42 +2003,19 @@ components: format: uuid deprecated: true description: | - Identifier for the watermark that's to be applied on redacted documents within this dossier. - In DocuMine, watermarks are not supported. previewWatermarkId: type: string format: uuid deprecated: true description: | - Identifier for the watermark pattern used for generated previews documents within this dossier. - In DocuMine, watermarks are not supported. + dossierAttributes: + $ref: '#/components/schemas/DossierAttributes' downloadFileTypes: - type: array - items: - enum: - - ORIGINAL - - PREVIEW - - REDACTED - - ANNOTATED - - FLATTEN - - DELTA_PREVIEW - type: string - uniqueItems: true - description: | - Types of files available for download from the dossier. These types can - differ based on the application. DocuMine only supports `ORIGINAL`. The files are - provided or generated when requesting a download package. + $ref: '#/components/schemas/DownloadFileTypes' reportTemplateIds: - type: array - items: - type: string - format: uuid - uniqueItems: true - description: | - List of template identifiers indicating which templates are to be used for generating reports or outputs - for this dossier. The reports are generated when requesting a download package. + $ref: '#/components/schemas/ReportTemplateIdList' archivedTime: type: string format: date-time @@ -1815,14 +2167,7 @@ components: description: A unique identifier for a member with access to the dossier. uniqueItems: true reportTemplateIds: - type: array - description: | - An array of identifiers representing templates used for generating reports - or exports from this dossier. - items: - description: An identifier for a report template. - type: string - uniqueItems: true + $ref: "#/components/schemas/ReportTemplateIdList" dossierStatusId: type: string description: | @@ -1852,8 +2197,8 @@ components: of individual dossiers that get created based on this template. example: id: 1e07cde0-d36a-4ab7-b389-494ca694a0cb - name: RedactManager Example - description: Typical settings for RedactManager. + name: DocuMine Example + description: Typical settings for DocuMine. dateAdded: 2020-01-23T04:56:07.000+00:00 dateModified: 2021-01-23T04:56:07.000+00:00 createdBy: c2e33246-e50a-4c43-831c-6789a5637db6 @@ -1862,14 +2207,13 @@ components: validTo: 2030-12-31T23:59:59.999+00:00 dossierTemplateStatus: ACTIVE removeWatermark: false - keepImageMetadata: false - ocrByDefault: false - keepHiddenText: false - keepOverlappingObjects: false + keepImageMetadata: true + ocrByDefault: true + keepHiddenText: true + keepOverlappingObjects: true applyDictionaryUpdatesToAllDossiersByDefault: false downloadFileTypes: - - PREVIEW - - REDACTED + - ORIGINAL properties: id: description: | @@ -1914,30 +2258,7 @@ components: format: date-time type: string downloadFileTypes: - description: | - Specifies the types of files that will be set as default types to download for dossiers created from - this template. Valid options may vary depending on the system. - - * Valid options for RedactManager: - * `ORIGINAL`: The optimized version of the PDF like it is used by the system for further analysis. - * `PREVIEW`: The optimized PDF with redaction annotations indicating what gets redacted by the - system. Note that the content to redact is actually still present and readable. - * `REDACTED`: The redacted PDF - * `DELTA_PREVIEW`: If redactions were imported (e.g., by uploading a PDF with redaction annotations), - this PDF highlights the changes made to imported redactions in different colors (green: no change, - red: removed, blue: added). - * Valid options for DocuMine: - * `ORIGINAL`: The optimized version of the PDF like it is used by the system for further analysis. - items: - description: Enumerated type indicating a permissible download file type for dossiers under this template. - enum: - - ORIGINAL - - PREVIEW - - REDACTED - - DELTA_PREVIEW - type: string - type: array - uniqueItems: true + $ref: '#/components/schemas/DownloadFileTypes' status: description: | Indicates the current status of the dossier template: @@ -1971,13 +2292,34 @@ components: description: Flag specifying if the system should try to remove watermarks in documents prior to OCR processing. type: boolean type: object + DownloadFileTypes: + type: array + uniqueItems: true + description: | + Specifies the types of files that will part of the created download package. The defaults can be defined in the dossier template + and can be overwritten individually on each download. + + DocuMine supports `ORIGINAL` and `PREVIEW`: + + - `ORIGINAL` Contrary to intuition, this is not the uploaded file, but the pre-processed, + optimized PDF, which may also contain the OCR results. + This is the PDF that used by the system for further processing. + - `PREVIEW` The annotated version of the PDF, highlighting the found entities that were + evaluated to extract the components. + items: + enum: + - ORIGINAL + - PREVIEW + type: string + example: + - ORIGINAL DossierTemplateList: description: Represents a list of dossier templates, each encapsulating a set of rules and settings. example: dossierTemplates: - id: 1e07cde0-d36a-4ab7-b389-494ca694a0cb - name: RedactManager Example - description: Typical settings for RedactManager. + name: DocuMine Example + description: Typical settings for DocuMine. dateAdded: 2020-01-23T04:56:07.000+00:00 dateModified: 2021-01-23T04:56:07.000+00:00 createdBy: c2e33246-e50a-4c43-831c-6789a5637db6 @@ -1986,16 +2328,15 @@ components: validTo: 2030-12-31T23:59:59.999+00:00 dossierTemplateStatus: ACTIVE removeWatermark: false - keepImageMetadata: false - ocrByDefault: false - keepHiddenText: false - keepOverlappingObjects: false + keepImageMetadata: true + ocrByDefault: true + keepHiddenText: true + keepOverlappingObjects: true applyDictionaryUpdatesToAllDossiersByDefault: false downloadFileTypes: - - PREVIEW - - REDACTED + - ORIGINAL - id: 8d8cae48-5c33-4617-ac27-1643f29b79d8 - name: DocuMine Example + name: Another DocuMine Example description: Typical settings for DocuMine. dateAdded: 2023-09-01T06:54:32.000+00:00 dateModified: 2023-09-01T06:54:32.000+00:00 @@ -2044,9 +2385,11 @@ components: type: string type: object example: - myFileAttribute: This is a file attribute value - yetAnotherFileAttribute: This is yet another file attribute value - numericValuesNeedToBeStrings: "1234" + attributeIdToValue: + "9049a73c-8013-45d6-8217-0845a4ff1c61": This is a file attribute value + "59d5a138-d30a-4014-ad7f-43ffba1f4d04": This is yet another file attribute value + "9d30d9e8-4a6c-4ef0-96a0-7bef62e138db": "1234" + "a337b65a-0481-48d9-92e6-79e34760ef01": "1. January 1337" FileDeleteRequest: type: object description: Request payload to initiate the deletion of specific files. @@ -2147,7 +2490,7 @@ components: The workflow status of a file. As DocuMine does not have an approval workflow the meaning of the states is as follows: - - `NEW` means "New", nothing else. + - `NEW` - Initial status of the uploaded files. - `UNDER_REVIEW` is actually not used in DocuMine. - `UNDER_APPROVAL` means "In progress", i.e. a user is checking the extracted components. - `APPROVED` means "Done", i.e. a user has checked and adjusted the components if necessary. @@ -2386,7 +2729,7 @@ components: hasSuggestions: true FileStatusList: type: object - description: Represents a list detailing the status of a bunch of files. + description: Represents a list detailing the status of multiple files. properties: files: type: array @@ -2592,6 +2935,62 @@ components: $ref: '#/components/schemas/RuleValidationMessage' type: array type: object + User: + type: object + description: Basic information about a user. + properties: + id: + type: string + format: uuid + description: The unique identifier of the user. + example: efe7eedd-89c5-56f5-984c-0712ee41a2eb + username: + type: string + description: The user name that is used for logging in. + example: myusername + email: + type: string + description: The email address of the user. + example: myusername@example.com + firstName: + type: string + description: The first name of the user. + example: John + lastName: + type: string + description: The last name of the user. + example: Doe + roles: + uniqueItems: true + type: array + description: | + The roles of the user. In particular: + - `USER` - default user permission to work with RedactManager + - `MANAGER` - additional privileges to create and manage dossiers + - `USER_ADMIN` - administration privileges limited to manage users only + - `ADMIN` - general administration privileges + items: + type: string + enum: + - USER + - MANAGER + - USER_ADMIN + - ADMIN + example: + - MANAGER + - ADMIN + active: + type: boolean + description: Indicator if the user is active or not. Only active users can log in. + UserList: + type: object + description: A list of multiple users. + properties: + downloadStatus: + type: array + items: + $ref: '#/components/schemas/User' + description: Each item contains the details of a user. LicenseReport: type: object description: A comprehensive report of licensing metrics and usage statistics. @@ -2770,9 +3169,12 @@ components: - file securitySchemes: FF-OAUTH: + type: oauth2 flows: authorizationCode: - authorizationUrl: /auth/realms/redaction/protocol/openid-connect/auth + authorizationUrl: /auth/realms/{workspaceId}/protocol/openid-connect/auth + tokenUrl: /auth/realms/{workspaceId}/protocol/openid-connect/token scopes: { } - tokenUrl: /auth/realms/redaction/protocol/openid-connect/token - type: oauth2 + clientCredentials: + tokenUrl: /auth/realms/{workspaceId}/protocol/openid-connect/token + scopes: {} \ No newline at end of file diff --git a/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/redactmanager.yaml b/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/redactmanager.yaml index 64bfdeb01..c9e09c4c7 100644 --- a/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/redactmanager.yaml +++ b/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/redactmanager.yaml @@ -112,7 +112,7 @@ paths: "500": $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossier-status-definitions: - get: # TODO: implement endpoint to get dossier status definitions + get: summary: Returns the list of all existing dossier status definitions tags: - 1. Dossier Templates @@ -143,7 +143,7 @@ paths: "500": $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossier-attribute-definitions: - get: # TODO: implement endpoint to get dossier attribute definitions + get: summary: Returns the list of all existing dossier attribute definitions tags: - 1. Dossier Templates @@ -365,7 +365,7 @@ paths: "500": $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/attributes: - post: # TODO: implement endpoint to set or update dossier attribute values + post: operationId: setDossierAttributes tags: - 2. Dossiers @@ -401,7 +401,7 @@ paths: "500": $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/create-download: - post: # TODO: implement endpoint to prepare a download for all files of a dossier + post: operationId: prepareDossierDownload tags: - 2. Dossiers @@ -608,7 +608,7 @@ paths: "500": $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/{fileId}/create-download: - post: # TODO: implement endpoint to prepare a download of a single file + post: operationId: prepareFileDownload tags: - 3. Files @@ -692,7 +692,7 @@ paths: "500": $ref: '#/components/responses/500' /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/bulk/create-download: - post: # TODO: implement endpoint to prepare a bulk download of multiple files, check if fileIds match the dossierId + post: operationId: prepareBulkDownload tags: - 3. Files @@ -772,7 +772,7 @@ paths: "500": $ref: '#/components/responses/500' /api/download: - get: # TODO: implement endpoint to get the status of all downloads of the current user + get: operationId: getDownloadStatusList tags: - 4. Downloads @@ -799,7 +799,7 @@ paths: "500": $ref: '#/components/responses/500' /api/downloads/{downloadId}: - get: # TODO: implement endpoint to get a single download status by id + get: operationId: getDownloadStatus tags: - 4. Downloads @@ -829,7 +829,7 @@ paths: $ref: '#/components/responses/429' "500": $ref: '#/components/responses/500' - delete: # TODO: implement endpoint to delete a single download by id + delete: operationId: deleteDownload tags: - 4. Downloads @@ -855,7 +855,7 @@ paths: "500": $ref: '#/components/responses/500' /api/downloads/{downloadId}/download: - get: # TODO: implement endpoint to actually do the download + get: operationId: download tags: - 4. Downloads @@ -891,8 +891,8 @@ paths: $ref: '#/components/responses/429' "500": $ref: '#/components/responses/500' - /api/users: # /api/users?username=kresnadi@budisantoso.de - get: # TODO: implement endpoint to get a user list + /api/users: + get: operationId: getUsers tags: - 5. Users @@ -923,7 +923,7 @@ paths: "500": $ref: '#/components/responses/500' /api/users/{userId}: - get: # TODO: implement endpoint to get a single user by id + get: operationId: getUserById tags: - 5. Users @@ -2077,7 +2077,7 @@ components: - PREVIEW - REDACTED - id: 8d8cae48-5c33-4617-ac27-1643f29b79d8 - name: RedactManager Example + name: Another RedactManager Example description: Typical settings for RedactManager. dateAdded: 2023-09-01T06:54:32.000+00:00 dateModified: 2023-09-01T06:54:32.000+00:00 @@ -2087,13 +2087,15 @@ components: validTo: 2033-12-31T23:59:59.999+00:00 dossierTemplateStatus: ACTIVE removeWatermark: true - keepImageMetadata: true + keepImageMetadata: false ocrByDefault: true keepHiddenText: true - keepOverlappingObjects: true + keepOverlappingObjects: false applyDictionaryUpdatesToAllDossiersByDefault: false downloadFileTypes: - ORIGINAL + - PREVIEW + - REDACTED properties: dossierTemplates: description: Each entry is a dossier template with its details.