v5
latestOpenAPI 3.1.02026-08-08341215300.9 KBSet Firestore Credentials
Set Firestore credentials for authenticated user using GCP Service Account.
This endpoint configures Firestore access using a GCP Service Account. Collection-level access is controlled programmatically via allowed_collections.
Payload: { "project_id": "your-gcp-project", # GCP project ID (required) "service_account_key": {...}, # Service account JSON key (required) "allowed_collections": ["users", "orders", "products/*/reviews"] # Optional }
Setup steps for the customer:
- Create a GCP Service Account with Firestore Viewer role (roles/datastore.viewer)
- Generate a JSON key for the service account
- Provide the JSON key and optionally specify which collections to allow access to
Security notes:
- Service account has IAM-level access to Firestore (database-wide)
- Collection-level restrictions are enforced programmatically by Deeptrace
- Credentials are encrypted at rest
- Wildcards supported in allowed_collections (e.g., "users/*/orders")
post/api/set_firestore_credentials
Response
Successful Response
{"stackTrail":"paths:/api/set_firestore_credentials:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}