Method: projects.databases.documents.listCollectionIds

Lists all the collection IDs underneath a document.

HTTP request

POST https://firestore.googleapis.com/v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
parent

string

The parent document. In the format: projects/{projectId}/databases/{databaseId}/documents/{document_path}. For example: projects/my-project/databases/my-database/documents/chatrooms/my-chatroom

Request body

The request body contains data with the following structure:

JSON representation
{
  "pageSize": number,
  "pageToken": string
}
Fields
pageSize

number

The maximum number of results to return.

pageToken

string

A page token. Must be a value from ListCollectionIdsResponse.

Response body

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

The response from Firestore.ListCollectionIds.

JSON representation
{
  "collectionIds": [
    string
  ],
  "nextPageToken": string
}
Fields
collectionIds[]

string

The collection ids.

nextPageToken

string

A page token that may be used to continue the list.

Authorization Scopes

Requires one of the following OAuth scopes:

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

For more information, see the Auth Guide.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Firestore