Developer guide - Enhanced Document Understanding on AWS

Developer guide

This section provides the source code for the solution, additional customizations, an API reference, and information for deploying the solution without the UI.

Source code

Visit our GitHub repository to download the source files for this solution and to share your customizations with others.

The Enhanced Document Understanding on AWS templates are generated using the AWS CDK. See the README.md file for additional information.

Customization guide

Refer the README.md file for information about the code and how to deploy it using CDK Toolkit.

API reference

This section provides API references for the solution.

API HTTP Method Functionality Authorized Callers

/case

POST

Creates a new case Cognito authenticated JWT token

/case/{caseId}

GET

Retrieves case details, including a list of uploaded documents Cognito authenticated JWT token

/cases

GET

Retrieves a list of cases Cognito authenticated JWT token

/document

POST

Uploads a new document to a case Cognito authenticated JWT token

/document/download

GET

Downloads an existing document for a case Cognito authenticated JWT token

/document/{caseId}/{documentId}

GET

Gets the S3 location with key prefix where the document is uploaded Cognito authenticated JWT token

/inferences/{caseId}/{documentId}

GET

Gets inferences for a document associated with a case Cognito authenticated JWT token

/inferences/{caseId}/{documentId}/{inferenceType}

GET

Get the available inferences for the document Cognito authenticated JWT token

/redact/{caseId}/{documentId}

POST

Requests redaction of selected content in a document Cognito authenticated JWT token

/search/kendra/{query}

GET

Searches for documents using NLP queries and Amazon Kendra service Cognito authenticated JWT token

/search/opensearch/{query}

GET

Searches for documents using keyword queries and Amazon OpenSearch Serverless service Cognito authenticated JWT token

Deploying the application without the UI

The solution provides an option to deploy only the API endpoints with the workflow configuration and integrate it with another UI application. Check the Mappings section in the CloudFormation template to enable or disable features for deployment.