Method: corpora.list

Lists all Corpora owned by the user.

HTTP request

GET https://generativelanguage.googleapis.com/v1beta/corpora

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
pageSize

integer

Optional. The maximum number of Corpora to return (per page). The service may return fewer Corpora.

If unspecified, at most 10 Corpora will be returned. The maximum size limit is 20 Corpora per page.

pageToken

string

Optional. A page token, received from a previous corpora.list call.

Provide the nextPageToken returned in the response as an argument to the next request to retrieve the next page.

When paginating, all other parameters provided to corpora.list must match the call that provided the page token.

Request body

The request body must be empty.

Response body

Response from corpora.list containing a paginated list of Corpora. The results are sorted by ascending corpus.create_time.

If successful, the response body contains data with the following structure:

JSON representation
{
  "corpora": [
    {
      object (Corpus)
    }
  ],
  "nextPageToken": string
}
Fields
corpora[]

object (Corpus)

The returned corpora.

nextPageToken

string

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no more pages.

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.