Lists all Document
s in a Corpus
.
HTTP request
GET https://generativelanguage.googleapis.com/v1beta/{parent=corpora/*}/documents
Path parameters
Parameters | |
---|---|
parent |
Required. The name of the |
Query parameters
Parameters | |
---|---|
pageSize |
Optional. The maximum number of If unspecified, at most 10 |
pageToken |
Optional. A page token, received from a previous Provide the When paginating, all other parameters provided to |
Request body
The request body must be empty.
Response body
Response from documents.list
containing a paginated list of Document
s. The Document
s are sorted by ascending document.create_time
.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"documents": [
{
object ( |
Fields | |
---|---|
documents[] |
The returned |
nextPageToken |
A token, which can be sent as |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/generative-language.retriever
https://www.googleapis.com/auth/generative-language.retriever.readonly
For more information, see the Authentication Overview.