Index Document API (2.0)

Download OpenAPI specification:Download

DANAConnect Team: support@danaconnect.com License: Proprietary

Document Management and Search Service with OpenSearch Integration.

This API provides intelligent document indexing, advanced search capabilities, and secure file management within the DANAConnect platform.

Key Features:

  • Document indexing with metadata enrichment
  • Advanced full-text search with filtering
  • Secure document storage and retrieval
  • URL shortening for secure document sharing

Document Management API V2.0

Advanced Document Management and Search Service with OpenSearch Integration.

This enhanced version provides intelligent document indexing, advanced search capabilities, and secure file management within a scalable architecture. Leveraging OpenSearch for high-performance indexing and retrieval, it enables sophisticated document operations while maintaining enterprise-grade security and auditability.

Key capabilities include:

  • Intelligent document indexing and metadata enrichment
  • Advanced full-text search with filtering and faceting
  • Secure document storage and retrieval with access control
  • Automated compression and packaging of document collections
  • URL shortening for secure document sharing
  • Comprehensive audit logging and download tracking
  • Seamless integration with DANAConnect conversation flows

Search Documents

Advanced document search in OpenSearch with support for:

  • Filter-based search (key-value) with 'contains' matching
  • Text search in additionalInfo field
  • Date ranges (createDate, validUntilDate)
  • Logical operators AND/OR to combine conditions

Results are limited by configuration (index-document.search.limit)

Securityoauth2
Request
Request Body schema: application/json
Array of objects (FilterSearchDTO)

List of filters to search documents by key-value pairs. Supports 'contains' matching on values.

documentTypeId
integer <int64>

Filter documents by document type ID

servicesId
integer <int64>

Filter documents by service ID

operator
string

Logical operator to combine search conditions. Valid values: 'AND', 'OR'. Default: 'AND'

Enum: "AND" "OR"
Responses
200

Search completed successfully. The response body contains a business status code:

Code Description
200 OK
400

Invalid search request. The response body contains a business error code:

Code Description
6 Unknown error
14 Unexpected filter operator
65 No documents match the provided search criteria
401

Unauthorized - invalid or missing JWT token

500

Internal server error during search operation

post/document/2.0/search
Request samples
application/json
{
  • "filters": [
    ],
  • "documentTypeId": 0,
  • "servicesId": 0,
  • "operator": "AND"
}
Response samples
application/json
{
  • "code": 200,
  • "description": "Search completed successfully",
  • "documentsList": [
    ],
  • "totalHits": 42
}

Index Document

Indexes one or more documents in OpenSearch and stores them in S3. Returns secure download URLs for each indexed document.

Securityoauth2
Request
Request Body schema: application/json
servicesId
integer <int32>

Identifier indicating Document Manager's service configuration type in DANAConnect platform

isStrict
boolean

If set to true, the operation runs in strict mode and aborts if any document URL is not found. If false, found documents are processed and missing ones are reported in the response.

isZip
boolean

If set to true, all found files will be provided as a zip file, otherwise only the individual list download URL is generated

Array of objects (DocumentDTO)

List of documents to be indexed

Array of objects (FilterDTO)

Key-value filter pairs to associate with the indexed documents

additionalInfo
string

Additional information to store with the document

Responses
200

Documents indexed successfully. The response body contains a business status code:

Code Description
0 OK
100 OK with warning (partial success in non-strict mode)
400

Invalid request. The response body contains a business error code:

Code Description
3 Exceeded the maximum number of documents allowed
4 Document not found
6 Unknown error
7 Duplicated URL on document list
9 Exceeded the maximum number of files to be compressed
10 The service configuration is incorrect or not assigned
30 You must include the 'filters' field with at least one configured filter
31 No filters are configured for this document type
32 Each filter must contain a valid 'key'
33 The filter with key is not allowed
34 The document list must not be empty
35 The 'isZip' must not be null
37 The configuration Document Type is incorrect
38 The configuration Document Type is not assigned
39 The configuration Document Type is not enabled
40 Client configuration not found
57 Client configuration version is invalid
500 At the moment, we cannot establish a connection
401

Unauthorized - invalid or missing JWT token

500

Internal server error during document processing

post/document/2.0/index_document
Request samples
application/json
{
  • "servicesId": 0,
  • "isStrict": true,
  • "isZip": true,
  • "documentList": [
    ],
  • "filters": [
    ],
  • "additionalInfo": "string"
}
Response samples
application/json
{
  • "code": 0,
  • "description": "string",
  • "documentList": [
    ]
}