Skip to content

Commit dd89acf

Browse files
Amazon Q Business now supports the GetDocumentContent() API that enables customers to securely access the source documents through clickable citation links at query time
1 parent c08ef19 commit dd89acf

19 files changed

+1297
-5
lines changed

generator/ServiceModels/qbusiness/qbusiness-2023-11-27.api.json

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,23 @@
709709
{"shape":"AccessDeniedException"}
710710
]
711711
},
712+
"GetDocumentContent":{
713+
"name":"GetDocumentContent",
714+
"http":{
715+
"method":"GET",
716+
"requestUri":"/applications/{applicationId}/index/{indexId}/documents/{documentId}/content",
717+
"responseCode":200
718+
},
719+
"input":{"shape":"GetDocumentContentRequest"},
720+
"output":{"shape":"GetDocumentContentResponse"},
721+
"errors":[
722+
{"shape":"InternalServerException"},
723+
{"shape":"ResourceNotFoundException"},
724+
{"shape":"ThrottlingException"},
725+
{"shape":"ValidationException"},
726+
{"shape":"AccessDeniedException"}
727+
]
728+
},
712729
"GetGroup":{
713730
"name":"GetGroup",
714731
"http":{
@@ -4051,6 +4068,52 @@
40514068
"mediaExtractionConfiguration":{"shape":"MediaExtractionConfiguration"}
40524069
}
40534070
},
4071+
"GetDocumentContentRequest":{
4072+
"type":"structure",
4073+
"required":[
4074+
"applicationId",
4075+
"indexId",
4076+
"documentId"
4077+
],
4078+
"members":{
4079+
"applicationId":{
4080+
"shape":"ApplicationId",
4081+
"location":"uri",
4082+
"locationName":"applicationId"
4083+
},
4084+
"indexId":{
4085+
"shape":"IndexId",
4086+
"location":"uri",
4087+
"locationName":"indexId"
4088+
},
4089+
"dataSourceId":{
4090+
"shape":"DataSourceId",
4091+
"location":"querystring",
4092+
"locationName":"dataSourceId"
4093+
},
4094+
"documentId":{
4095+
"shape":"DocumentId",
4096+
"location":"uri",
4097+
"locationName":"documentId"
4098+
},
4099+
"outputFormat":{
4100+
"shape":"OutputFormat",
4101+
"location":"querystring",
4102+
"locationName":"outputFormat"
4103+
}
4104+
}
4105+
},
4106+
"GetDocumentContentResponse":{
4107+
"type":"structure",
4108+
"required":[
4109+
"presignedUrl",
4110+
"mimeType"
4111+
],
4112+
"members":{
4113+
"presignedUrl":{"shape":"String"},
4114+
"mimeType":{"shape":"String"}
4115+
}
4116+
},
40544117
"GetGroupRequest":{
40554118
"type":"structure",
40564119
"required":[
@@ -5610,6 +5673,10 @@
56105673
"min":1,
56115674
"pattern":"(http://|https://)[a-zA-Z0-9-_.]+(?::[0-9]{1,5})?"
56125675
},
5676+
"OutputFormat":{
5677+
"type":"string",
5678+
"enum":["RAW"]
5679+
},
56135680
"Payload":{
56145681
"type":"string",
56155682
"sensitive":true
@@ -6243,7 +6310,10 @@
62436310
"url":{"shape":"String"},
62446311
"citationNumber":{"shape":"Integer"},
62456312
"updatedAt":{"shape":"Timestamp"},
6246-
"textMessageSegments":{"shape":"TextSegmentList"}
6313+
"textMessageSegments":{"shape":"TextSegmentList"},
6314+
"documentId":{"shape":"String"},
6315+
"indexId":{"shape":"String"},
6316+
"datasourceId":{"shape":"String"}
62476317
}
62486318
},
62496319
"SourceAttributionMediaId":{

generator/ServiceModels/qbusiness/qbusiness-2023-11-27.docs.json

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"CreateIndex": "<p>Creates an Amazon Q Business index.</p> <p>To determine if index creation has completed, check the <code>Status</code> field returned from a call to <code>DescribeIndex</code>. The <code>Status</code> field is set to <code>ACTIVE</code> when the index is ready to use.</p> <p>Once the index is active, you can index your documents using the <a href=\"https://docs.aws.amazon.com/amazonq/latest/api-reference/API_BatchPutDocument.html\"> <code>BatchPutDocument</code> </a> API or the <a href=\"https://docs.aws.amazon.com/amazonq/latest/api-reference/API_CreateDataSource.html\"> <code>CreateDataSource</code> </a> API.</p>",
1818
"CreatePlugin": "<p>Creates an Amazon Q Business plugin.</p>",
1919
"CreateRetriever": "<p>Adds a retriever to your Amazon Q Business application.</p>",
20-
"CreateSubscription": "<p>Subscribes an IAM Identity Center user or a group to a pricing tier for an Amazon Q Business application.</p> <p>Amazon Q Business offers two subscription tiers: <code>Q_LITE</code> and <code>Q_BUSINESS</code>. Subscription tier determines feature access for the user. For more information on subscriptions and pricing tiers, see <a href=\"https://aws.amazon.com/q/business/pricing/\">Amazon Q Business pricing</a>.</p>",
20+
"CreateSubscription": "<p>Subscribes an IAM Identity Center user or a group to a pricing tier for an Amazon Q Business application.</p> <p>Amazon Q Business offers two subscription tiers: <code>Q_LITE</code> and <code>Q_BUSINESS</code>. Subscription tier determines feature access for the user. For more information on subscriptions and pricing tiers, see <a href=\"https://aws.amazon.com/q/business/pricing/\">Amazon Q Business pricing</a>.</p> <note> <p>For an example IAM role policy for assigning subscriptions, see <a href=\"https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/setting-up.html#permissions\">Set up required permissions</a> in the Amazon Q Business User Guide.</p> </note>",
2121
"CreateUser": "<p>Creates a universally unique identifier (UUID) mapped to a list of local user ids within an application.</p>",
2222
"CreateWebExperience": "<p>Creates an Amazon Q Business web experience.</p>",
2323
"DeleteApplication": "<p>Deletes an Amazon Q Business application.</p>",
@@ -39,6 +39,7 @@
3939
"GetChatResponseConfiguration": "<p>Retrieves detailed information about a specific chat response configuration from an Amazon Q Business application. This operation returns the complete configuration settings and metadata.</p>",
4040
"GetDataAccessor": "<p>Retrieves information about a specified data accessor. This operation returns details about the data accessor, including its display name, unique identifier, Amazon Resource Name (ARN), the associated Amazon Q Business application and IAM Identity Center application, the IAM role for the ISV, the action configurations, and the timestamps for when the data accessor was created and last updated.</p>",
4141
"GetDataSource": "<p>Gets information about an existing Amazon Q Business data source connector.</p>",
42+
"GetDocumentContent": "<p>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.</p>",
4243
"GetGroup": "<p>Describes a group by group name.</p>",
4344
"GetIndex": "<p>Gets information about an existing Amazon Q Business index.</p>",
4445
"GetMedia": "<p>Returns the image bytes corresponding to a media object. If you have implemented your own application with the Chat and ChatSync APIs, and have enabled content extraction from visual data in Amazon Q Business, you use the GetMedia API operation to download the images so you can show them in your UI with responses.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/extracting-meaning-from-images.html\">Extracting semantic meaning from images and visuals</a>.</p>",
@@ -320,6 +321,7 @@
320321
"GetDataAccessorResponse$applicationId": "<p>The unique identifier of the Amazon Q Business application associated with this data accessor.</p>",
321322
"GetDataSourceRequest$applicationId": "<p>The identifier of the Amazon Q Business application.</p>",
322323
"GetDataSourceResponse$applicationId": "<p>The identifier of the Amazon Q Business application.</p>",
324+
"GetDocumentContentRequest$applicationId": "<p>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.</p>",
323325
"GetGroupRequest$applicationId": "<p>The identifier of the application id the group is attached to.</p>",
324326
"GetIndexRequest$applicationId": "<p>The identifier of the Amazon Q Business application connected to the index.</p>",
325327
"GetIndexResponse$applicationId": "<p>The identifier of the Amazon Q Business application associated with the index.</p>",
@@ -1226,6 +1228,7 @@
12261228
"FailedDocument$dataSourceId": "<p>The identifier of the Amazon Q Business data source connector that contains the failed document.</p>",
12271229
"GetDataSourceRequest$dataSourceId": "<p>The identifier of the data source connector.</p>",
12281230
"GetDataSourceResponse$dataSourceId": "<p>The identifier of the data source connector.</p>",
1231+
"GetDocumentContentRequest$dataSourceId": "<p>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\".</p>",
12291232
"GetGroupRequest$dataSourceId": "<p>The identifier of the data source the group is attached to.</p>",
12301233
"ListDataSourceSyncJobsRequest$dataSourceId": "<p> The identifier of the data source connector.</p>",
12311234
"ListGroupsRequest$dataSourceId": "<p>The identifier of the data source for getting a list of groups mapped to users.</p>",
@@ -1636,7 +1639,7 @@
16361639
}
16371640
},
16381641
"DocumentContent": {
1639-
"base": "<p>The contents of a document.</p>",
1642+
"base": "<p>The contents of a document.</p> <note> <p>Documents have size limitations. The maximum file size for a document is 50 MB. The maximum amount of text that can be extracted from a single document is 5 MB. For more information, see <a href=\"https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/doc-types.html\">Supported document formats in Amazon Q Business</a>.</p> </note>",
16401643
"refs": {
16411644
"Document$content": "<p>The contents of the document.</p>"
16421645
}
@@ -1682,6 +1685,7 @@
16821685
"Document$id": "<p>The identifier of the document.</p>",
16831686
"DocumentDetails$documentId": "<p>The identifier of the document.</p>",
16841687
"FailedDocument$id": "<p>The identifier of the document that couldn't be removed from the Amazon Q Business index.</p>",
1688+
"GetDocumentContentRequest$documentId": "<p>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.</p>",
16851689
"RelevantContent$documentId": "<p>The unique identifier of the document containing the relevant content.</p>"
16861690
}
16871691
},
@@ -1873,6 +1877,16 @@
18731877
"refs": {
18741878
}
18751879
},
1880+
"GetDocumentContentRequest": {
1881+
"base": null,
1882+
"refs": {
1883+
}
1884+
},
1885+
"GetDocumentContentResponse": {
1886+
"base": null,
1887+
"refs": {
1888+
}
1889+
},
18761890
"GetGroupRequest": {
18771891
"base": null,
18781892
"refs": {
@@ -2133,6 +2147,7 @@
21332147
"EligibleDataSource$indexId": "<p>The identifier of the index the data source is attached to.</p>",
21342148
"GetDataSourceRequest$indexId": "<p>The identfier of the index used with the data source connector.</p>",
21352149
"GetDataSourceResponse$indexId": "<p>The identifier of the index linked to the data source connector.</p>",
2150+
"GetDocumentContentRequest$indexId": "<p>The identifier of the index where documents are indexed.</p>",
21362151
"GetGroupRequest$indexId": "<p>The identifier of the index the group is attached to.</p>",
21372152
"GetIndexRequest$indexId": "<p>The identifier of the Amazon Q Business index you want information on.</p>",
21382153
"GetIndexResponse$indexId": "<p>The identifier of the Amazon Q Business index.</p>",
@@ -2863,6 +2878,12 @@
28632878
"WebExperienceOrigins$member": null
28642879
}
28652880
},
2881+
"OutputFormat": {
2882+
"base": null,
2883+
"refs": {
2884+
"GetDocumentContentRequest$outputFormat": "<p>Raw document outputFormat.</p>"
2885+
}
2886+
},
28662887
"Payload": {
28672888
"base": null,
28682889
"refs": {
@@ -3492,6 +3513,8 @@
34923513
"DocumentAclUser$id": "<p>The unique identifier of the user in the document's ACL. This is used to identify the user when applying access rules.</p>",
34933514
"DocumentAttributeStringListValue$member": null,
34943515
"GetDataSourceResponse$type": "<p>The type of the data source connector. For example, <code>S3</code>.</p>",
3516+
"GetDocumentContentResponse$presignedUrl": "<p>A pre-signed URL that provides temporary access to download the document content directly from Amazon Q Business. The URL expires after 5 minutes for security purposes. This URL is generated only after successful ACL validation.</p>",
3517+
"GetDocumentContentResponse$mimeType": "<p>The MIME type of the document content (e.g., application/pdf, text/plain, application/vnd.openxmlformats-officedocument.wordprocessingml.document).</p>",
34953518
"GetMediaResponse$mediaMimeType": "<p>The MIME type of the media object (image/png).</p>",
34963519
"GetPolicyResponse$policy": "<p>The JSON representation of the permission policy.</p>",
34973520
"GetUserRequest$userId": "<p>The user email address attached to the user.</p>",
@@ -3507,6 +3530,9 @@
35073530
"SourceAttribution$title": "<p>The title of the document which is the source for the Amazon Q Business generated response. </p>",
35083531
"SourceAttribution$snippet": "<p>The content extract from the document on which the generated response is based. </p>",
35093532
"SourceAttribution$url": "<p>The URL of the document which is the source for the Amazon Q Business generated response. </p>",
3533+
"SourceAttribution$documentId": "<p>The unique identifier of the source document used in the citation, obtained from the Amazon Q Business index during chat response generation. This ID is used as input to the <code>GetDocumentContent</code> API to retrieve the actual document content for user verification.</p>",
3534+
"SourceAttribution$indexId": "<p>The identifier of the index containing the source document's metadata and access control information. This links the citation back to the specific Amazon Q Business index where the document's searchable content and permissions are stored.</p>",
3535+
"SourceAttribution$datasourceId": "<p>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 (similar to checkDocumentAccess). If the document is from a file-upload data source, the datasource will be \"uploaded-docs-file-stat-datasourceid\".</p>",
35103536
"StringAttributeValueBoosting$key": null,
35113537
"TextOutputEvent$systemMessage": "<p>An AI-generated message in a <code>TextOutputEvent</code>.</p>",
35123538
"TextSegment$mediaMimeType": "<p>The MIME type (image/png) of the media object associated with the text segment in the source attribution.</p>",

0 commit comments

Comments
 (0)