Method: projects.knowledgeBases.documents.list

Returns the list of all documents of the knowledge base.

Note: The projects.agent.knowledgeBases.documents resource is deprecated; only use projects.knowledgeBases.documents .

HTTP request

GET https://{endpoint}/v2beta1/{parent=projects/*/knowledgeBases/*}/documents

Where {endpoint} is one of the supported service endpoints .

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The knowledge base to list all documents for. Format: projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID> .

Authorization requires the following IAM permission on the specified resource parent :

  • dialogflow.documents.list

Query parameters

Parameters
pageSize

integer

The maximum number of items to return in a single page. By default 10 and at most 100.

pageToken

string

The nextPageToken value returned from a previous list request.

filter

string

The filter expression used to filter documents returned by the list method. The expression has the following syntax:

[AND ] ...

The following fields and operators are supported:

  • knowledgeTypes with has(:) operator
  • displayName with has(:) operator
  • state with equals(=) operator

Examples:

  • "knowledgeTypes:FAQ" matches documents with FAQ knowledge type.
  • "displayName:customer" matches documents whose display name contains "customer".
  • "state=ACTIVE" matches documents with ACTIVE state.
  • "knowledgeTypes:FAQ AND state=ACTIVE" matches all active FAQ documents.

For more information about filtering, see API Filtering .

Request body

The request body must be empty.

Response body

If successful, the response body contains an instance of ListDocumentsResponse .

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/dialogflow

For more information, see the Authentication Overview .