@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Amazon Textract
@version 2018-06-27
@auth AWS SigV4
@endpoints 25
@hint download_for_search
@toc root(25)

@endpoint POST /
@required {Document: Document, FeatureTypes: [str]}
@optional {HumanLoopConfig: HumanLoopConfig, QueriesConfig: QueriesConfig, AdaptersConfig: AdaptersConfig}
@returns(200) {DocumentMetadata: DocumentMetadata?{Pages: int?}, Blocks: [Block]?, HumanLoopActivationOutput: HumanLoopActivationOutput?{HumanLoopArn: str?, HumanLoopActivationReasons: [str]?, HumanLoopActivationConditionsEvaluationResults: str?}, AnalyzeDocumentModelVersion: str?}

@endpoint POST /
@required {Document: Document}
@returns(200) {DocumentMetadata: DocumentMetadata?{Pages: int?}, ExpenseDocuments: [ExpenseDocument]?}

@endpoint POST /
@required {DocumentPages: [Document]}
@returns(200) {IdentityDocuments: [IdentityDocument]?, DocumentMetadata: DocumentMetadata?{Pages: int?}, AnalyzeIDModelVersion: str?}

@endpoint POST /
@required {AdapterName: str, FeatureTypes: [str]}
@optional {ClientRequestToken: str, Description: str, AutoUpdate: str, Tags: map<str,str>}
@returns(200) {AdapterId: str?}

@endpoint POST /
@required {AdapterId: str, DatasetConfig: AdapterVersionDatasetConfig, OutputConfig: OutputConfig}
@optional {ClientRequestToken: str, KMSKeyId: str, Tags: map<str,str>}
@returns(200) {AdapterId: str?, AdapterVersion: str?}

@endpoint POST /
@required {AdapterId: str}

@endpoint POST /
@required {AdapterId: str, AdapterVersion: str}

@endpoint POST /
@required {Document: Document}
@returns(200) {DocumentMetadata: DocumentMetadata?{Pages: int?}, Blocks: [Block]?, DetectDocumentTextModelVersion: str?}

@endpoint POST /
@required {AdapterId: str}
@returns(200) {AdapterId: str?, AdapterName: str?, CreationTime: str(timestamp)?, Description: str?, FeatureTypes: [str]?, AutoUpdate: str?, Tags: map<str,str>?}

@endpoint POST /
@required {AdapterId: str, AdapterVersion: str}
@returns(200) {AdapterId: str?, AdapterVersion: str?, CreationTime: str(timestamp)?, FeatureTypes: [str]?, Status: str?, StatusMessage: str?, DatasetConfig: AdapterVersionDatasetConfig?{ManifestS3Object: S3Object?{Bucket: str?, Name: str?, Version: str?}}, KMSKeyId: str?, OutputConfig: OutputConfig?{S3Bucket: str, S3Prefix: str?}, EvaluationMetrics: [AdapterVersionEvaluationMetric]?, Tags: map<str,str>?}

@endpoint POST /
@required {JobId: str}
@optional {MaxResults: int, NextToken: str}
@returns(200) {DocumentMetadata: DocumentMetadata?{Pages: int?}, JobStatus: str?, NextToken: str?, Blocks: [Block]?, Warnings: [Warning]?, StatusMessage: str?, AnalyzeDocumentModelVersion: str?}

@endpoint POST /
@required {JobId: str}
@optional {MaxResults: int, NextToken: str}
@returns(200) {DocumentMetadata: DocumentMetadata?{Pages: int?}, JobStatus: str?, NextToken: str?, Blocks: [Block]?, Warnings: [Warning]?, StatusMessage: str?, DetectDocumentTextModelVersion: str?}

@endpoint POST /
@required {JobId: str}
@optional {MaxResults: int, NextToken: str}
@returns(200) {DocumentMetadata: DocumentMetadata?{Pages: int?}, JobStatus: str?, NextToken: str?, ExpenseDocuments: [ExpenseDocument]?, Warnings: [Warning]?, StatusMessage: str?, AnalyzeExpenseModelVersion: str?}

@endpoint POST /
@required {JobId: str}
@optional {MaxResults: int, NextToken: str}
@returns(200) {DocumentMetadata: DocumentMetadata?{Pages: int?}, JobStatus: str?, NextToken: str?, Results: [LendingResult]?, Warnings: [Warning]?, StatusMessage: str?, AnalyzeLendingModelVersion: str?}

@endpoint POST /
@required {JobId: str}
@returns(200) {DocumentMetadata: DocumentMetadata?{Pages: int?}, JobStatus: str?, Summary: LendingSummary?{DocumentGroups: [DocumentGroup]?, UndetectedDocumentTypes: [str]?}, Warnings: [Warning]?, StatusMessage: str?, AnalyzeLendingModelVersion: str?}

@endpoint POST /
@optional {AdapterId: str, AfterCreationTime: str(timestamp), BeforeCreationTime: str(timestamp), MaxResults: int, NextToken: str}
@returns(200) {AdapterVersions: [AdapterVersionOverview]?, NextToken: str?}

@endpoint POST /
@optional {AfterCreationTime: str(timestamp), BeforeCreationTime: str(timestamp), MaxResults: int, NextToken: str}
@returns(200) {Adapters: [AdapterOverview]?, NextToken: str?}

@endpoint POST /
@required {ResourceARN: str}
@returns(200) {Tags: map<str,str>?}

@endpoint POST /
@required {DocumentLocation: DocumentLocation, FeatureTypes: [str]}
@optional {ClientRequestToken: str, JobTag: str, NotificationChannel: NotificationChannel, OutputConfig: OutputConfig, KMSKeyId: str, QueriesConfig: QueriesConfig, AdaptersConfig: AdaptersConfig}
@returns(200) {JobId: str?}

@endpoint POST /
@required {DocumentLocation: DocumentLocation}
@optional {ClientRequestToken: str, JobTag: str, NotificationChannel: NotificationChannel, OutputConfig: OutputConfig, KMSKeyId: str}
@returns(200) {JobId: str?}

@endpoint POST /
@required {DocumentLocation: DocumentLocation}
@optional {ClientRequestToken: str, JobTag: str, NotificationChannel: NotificationChannel, OutputConfig: OutputConfig, KMSKeyId: str}
@returns(200) {JobId: str?}

@endpoint POST /
@required {DocumentLocation: DocumentLocation}
@optional {ClientRequestToken: str, JobTag: str, NotificationChannel: NotificationChannel, OutputConfig: OutputConfig, KMSKeyId: str}
@returns(200) {JobId: str?}

@endpoint POST /
@required {ResourceARN: str, Tags: map<str,str>}

@endpoint POST /
@required {ResourceARN: str, TagKeys: [str]}

@endpoint POST /
@required {AdapterId: str}
@optional {Description: str, AdapterName: str, AutoUpdate: str}
@returns(200) {AdapterId: str?, AdapterName: str?, CreationTime: str(timestamp)?, Description: str?, FeatureTypes: [str]?, AutoUpdate: str?}

@end
