/AWS1/IF_QQB=>GETDOCUMENTCONTENT()
¶
About GetDocumentContent¶
Retrieves the content of a document that was ingested into Amazon Q Business. This API validates user authorization against document ACLs before returning a pre-signed URL for secure document access. You can download or view source documents referenced in chat responses through the URL.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_applicationid
TYPE /AWS1/QQBAPPLICATIONID
/AWS1/QQBAPPLICATIONID
¶
The unique identifier of the Amazon Q Business application containing the document. This ensures the request is scoped to the correct application environment and its associated security policies.
iv_indexid
TYPE /AWS1/QQBINDEXID
/AWS1/QQBINDEXID
¶
The identifier of the index where documents are indexed.
iv_documentid
TYPE /AWS1/QQBDOCUMENTID
/AWS1/QQBDOCUMENTID
¶
The unique identifier of the document that is indexed via BatchPutDocument API or file-upload or connector sync. It is also found in chat or chatSync response.
Optional arguments:¶
iv_datasourceid
TYPE /AWS1/QQBDATASOURCEID
/AWS1/QQBDATASOURCEID
¶
The identifier of the data source from which the document was ingested. This field is not present if the document is ingested by directly calling the BatchPutDocument API. If the document is from a file-upload data source, the datasource will be "uploaded-docs-file-stat-datasourceid".
iv_outputformat
TYPE /AWS1/QQBOUTPUTFORMAT
/AWS1/QQBOUTPUTFORMAT
¶
Document outputFormat. Defaults to RAW if not selected.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_qqbgetdoccontentrsp
/AWS1/CL_QQBGETDOCCONTENTRSP
¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->/aws1/if_qqb~getdocumentcontent(
iv_applicationid = |string|
iv_datasourceid = |string|
iv_documentid = |string|
iv_indexid = |string|
iv_outputformat = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_presignedurl( ).
lv_string = lo_result->get_mimetype( ).
ENDIF.