Method: projects.locations.knowledgeBases.documents.list

Stay organized with collections Save and categorize content based on your preferences.

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/*/locations/*/knowledgeBases/*}/documents

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

The URLs use gRPC Transcoding syntax.

Path parameters



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



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



The nextPageToken value returned from a previous list request.



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


  • "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:


For more information, see the Authentication Overview.