Reference documentation and code samples for the Cloud Firestore V1beta1 Client class ListDocumentsRequest.
The request forFirestore.ListDocuments.
Generated from protobuf messagegoogle.firestore.v1beta1.ListDocumentsRequest
Namespace
Google \ Cloud \ Firestore \ V1beta1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ parent
string
Required. The parent resource name. In the format:projects/{project_id}/databases/{database_id}/documentsorprojects/{project_id}/databases/{database_id}/documents/{document_path}. For example:projects/my-project/databases/my-database/documentsorprojects/my-project/databases/my-database/documents/chatrooms/my-chatroom
↳ collection_id
string
Required. The collection ID, relative toparent, to list. For example:chatroomsormessages.
↳ page_size
int
The maximum number of documents to return.
↳ page_token
string
Thenext_page_tokenvalue returned from a previous List request, if any.
↳ order_by
string
The order to sort results by. For example:priority desc, name.
The fields to return. If not set, returns all fields. If a document has a field that is not present in this mask, that field will not be returned in the response.
Reads documents as they were at the given time. This may not be older than 60 seconds.
↳ show_missing
bool
If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields,Document.create_time, orDocument.update_timeset. Requests withshow_missingmay not specifywhereororder_by.
getParent
Required. The parent resource name. In the format:projects/{project_id}/databases/{database_id}/documentsorprojects/{project_id}/databases/{database_id}/documents/{document_path}.
For example:projects/my-project/databases/my-database/documentsorprojects/my-project/databases/my-database/documents/chatrooms/my-chatroom
Returns
Type
Description
string
setParent
Required. The parent resource name. In the format:projects/{project_id}/databases/{database_id}/documentsorprojects/{project_id}/databases/{database_id}/documents/{document_path}.
For example:projects/my-project/databases/my-database/documentsorprojects/my-project/databases/my-database/documents/chatrooms/my-chatroom
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getCollectionId
Required. The collection ID, relative toparent, to list. For example:chatroomsormessages.
Returns
Type
Description
string
setCollectionId
Required. The collection ID, relative toparent, to list. For example:chatroomsormessages.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getPageSize
The maximum number of documents to return.
Returns
Type
Description
int
setPageSize
The maximum number of documents to return.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getPageToken
Thenext_page_tokenvalue returned from a previous List request, if any.
Returns
Type
Description
string
setPageToken
Thenext_page_tokenvalue returned from a previous List request, if any.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getOrderBy
The order to sort results by. For example:priority desc, name.
Returns
Type
Description
string
setOrderBy
The order to sort results by. For example:priority desc, name.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getMask
The fields to return. If not set, returns all fields.
If a document has a field that is not present in this mask, that field
will not be returned in the response.
If the list should show missing documents. A missing document is a
document that does not exist but has sub-documents. These documents will
be returned with a key but will not have fields,Document.create_time,
orDocument.update_timeset.
Requests withshow_missingmay not specifywhereororder_by.
Returns
Type
Description
bool
setShowMissing
If the list should show missing documents. A missing document is a
document that does not exist but has sub-documents. These documents will
be returned with a key but will not have fields,Document.create_time,
orDocument.update_timeset.
Requests withshow_missingmay not specifywhereororder_by.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Firestore V1beta1 Client - Class ListDocumentsRequest (1.53.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.53.0 (latest)](/php/docs/reference/cloud-firestore/latest/V1beta1.ListDocumentsRequest)\n- [1.52.0](/php/docs/reference/cloud-firestore/1.52.0/V1beta1.ListDocumentsRequest)\n- [1.51.0](/php/docs/reference/cloud-firestore/1.51.0/V1beta1.ListDocumentsRequest)\n- [1.50.0](/php/docs/reference/cloud-firestore/1.50.0/V1beta1.ListDocumentsRequest)\n- [1.48.1](/php/docs/reference/cloud-firestore/1.48.1/V1beta1.ListDocumentsRequest)\n- [1.47.3](/php/docs/reference/cloud-firestore/1.47.3/V1beta1.ListDocumentsRequest)\n- [1.46.0](/php/docs/reference/cloud-firestore/1.46.0/V1beta1.ListDocumentsRequest)\n- [1.45.2](/php/docs/reference/cloud-firestore/1.45.2/V1beta1.ListDocumentsRequest)\n- [1.44.1](/php/docs/reference/cloud-firestore/1.44.1/V1beta1.ListDocumentsRequest)\n- [1.43.3](/php/docs/reference/cloud-firestore/1.43.3/V1beta1.ListDocumentsRequest)\n- [1.40.0](/php/docs/reference/cloud-firestore/1.40.0/V1beta1.ListDocumentsRequest)\n- [1.39.0](/php/docs/reference/cloud-firestore/1.39.0/V1beta1.ListDocumentsRequest)\n- [1.38.0](/php/docs/reference/cloud-firestore/1.38.0/V1beta1.ListDocumentsRequest)\n- [1.37.7](/php/docs/reference/cloud-firestore/1.37.7/V1beta1.ListDocumentsRequest)\n- [1.36.1](/php/docs/reference/cloud-firestore/1.36.1/V1beta1.ListDocumentsRequest)\n- [1.35.0](/php/docs/reference/cloud-firestore/1.35.0/V1beta1.ListDocumentsRequest)\n- [1.34.0](/php/docs/reference/cloud-firestore/1.34.0/V1beta1.ListDocumentsRequest)\n- [1.33.0](/php/docs/reference/cloud-firestore/1.33.0/V1beta1.ListDocumentsRequest)\n- [1.32.0](/php/docs/reference/cloud-firestore/1.32.0/V1beta1.ListDocumentsRequest)\n- [1.31.0](/php/docs/reference/cloud-firestore/1.31.0/V1beta1.ListDocumentsRequest)\n- [1.30.0](/php/docs/reference/cloud-firestore/1.30.0/V1beta1.ListDocumentsRequest)\n- [1.28.0](/php/docs/reference/cloud-firestore/1.28.0/V1beta1.ListDocumentsRequest)\n- [1.27.3](/php/docs/reference/cloud-firestore/1.27.3/V1beta1.ListDocumentsRequest) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Cloud Firestore V1beta1 Client class ListDocumentsRequest.\n\nThe request for Firestore.ListDocuments.\n\nGenerated from protobuf message `google.firestore.v1beta1.ListDocumentsRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Firestore \\\\ V1beta1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getParent\n\nRequired. The parent resource name. In the format:\n`projects/{project_id}/databases/{database_id}/documents` or\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\n\nFor example:\n`projects/my-project/databases/my-database/documents` or\n`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`\n\n### setParent\n\nRequired. The parent resource name. In the format:\n`projects/{project_id}/databases/{database_id}/documents` or\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\n\nFor example:\n`projects/my-project/databases/my-database/documents` or\n`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`\n\n### getCollectionId\n\nRequired. The collection ID, relative to `parent`, to list. For example: `chatrooms`\nor `messages`.\n\n### setCollectionId\n\nRequired. The collection ID, relative to `parent`, to list. For example: `chatrooms`\nor `messages`.\n\n### getPageSize\n\nThe maximum number of documents to return.\n\n### setPageSize\n\nThe maximum number of documents to return.\n\n### getPageToken\n\nThe `next_page_token` value returned from a previous List request, if any.\n\n### setPageToken\n\nThe `next_page_token` value returned from a previous List request, if any.\n\n### getOrderBy\n\nThe order to sort results by. For example: `priority desc, name`.\n\n### setOrderBy\n\nThe order to sort results by. For example: `priority desc, name`.\n\n### getMask\n\nThe fields to return. If not set, returns all fields.\n\nIf a document has a field that is not present in this mask, that field\nwill not be returned in the response.\n\n### setMask\n\nThe fields to return. If not set, returns all fields.\n\nIf a document has a field that is not present in this mask, that field\nwill not be returned in the response.\n\n### getTransaction\n\nReads documents in a transaction.\n\n### setTransaction\n\nReads documents in a transaction.\n\n### getReadTime\n\nReads documents as they were at the given time.\n\nThis may not be older than 60 seconds.\n\n### setReadTime\n\nReads documents as they were at the given time.\n\nThis may not be older than 60 seconds.\n\n### getShowMissing\n\nIf the list should show missing documents. A missing document is a\ndocument that does not exist but has sub-documents. These documents will\nbe returned with a key but will not have fields, [Document.create_time](/php/docs/reference/cloud-firestore/latest/V1beta1.Document#_Google_Cloud_Firestore_V1beta1_Document__getCreateTime__),\nor [Document.update_time](/php/docs/reference/cloud-firestore/latest/V1beta1.Document#_Google_Cloud_Firestore_V1beta1_Document__getUpdateTime__) set.\n\nRequests with `show_missing` may not specify `where` or\n`order_by`.\n\n### setShowMissing\n\nIf the list should show missing documents. A missing document is a\ndocument that does not exist but has sub-documents. These documents will\nbe returned with a key but will not have fields, [Document.create_time](/php/docs/reference/cloud-firestore/latest/V1beta1.Document#_Google_Cloud_Firestore_V1beta1_Document__getCreateTime__),\nor [Document.update_time](/php/docs/reference/cloud-firestore/latest/V1beta1.Document#_Google_Cloud_Firestore_V1beta1_Document__getUpdateTime__) set.\n\nRequests with `show_missing` may not specify `where` or\n`order_by`.\n\n### getConsistencySelector"]]