List collections
const url = 'https://your-app-domain/v1/db/example/listCollections';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"readConcern":"fresh"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-app-domain/v1/db/example/listCollections \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "readConcern": "fresh" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The database id (the last part of the connection string).
Request Bodyrequired
Section titled “Request Bodyrequired”object
“local” skips the check for changes made in the app (faster, maybe a few seconds stale)
Responses
Section titled “Responses”Success
object
object
API name
Name shown in the app
object
Example generated
{ "collections": [ { "name": "example", "displayName": "example", "count": 1, "fields": [ { "name": "example", "displayName": "example", "type": "example", "unique": true, "linkedCollection": "example", "multiple": true, "choices": [ "example" ] } ] } ]}Invalid request (BadRequest, ValidationError, BadValue, ImmutableField, InvalidName).
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": {} }}Missing, wrong, revoked or expired connection string, or Google access was removed (Unauthorized).
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": {} }}Read-only connection string (ReadOnlyKey) or a database you can only view (ReadOnly).
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": {} }}Unknown collection (NamespaceNotFound) or action (UnknownAction).
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": {} }}A unique field already has this value (DuplicateKey).
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": {} }}Request body over 1 MB (PayloadTooLarge).
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": {} }}Too many requests (RateLimited). Wait for Retry-After seconds.
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": {} }}The database file is unavailable (DatabaseUnavailable) or Google Drive is busy (DriveUnavailable, retry).
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": {} }}The owner’s Google Drive is full (DriveFull).
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": {} }}Made by Faeiz Furqan