Ephemeral
Ephemeral databases: a throwaway Postgres database created without an account, destroyed after 72 hours unless it is claimed into an organization.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Every field is optional; an empty body creates a database with a generated name in a region with capacity.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/ephemeral-databases" \ -H "Content-Type: application/json" \ -d '{}'{ "claim_token": "string", "claim_url": "http://example.com", "ephemeral_database": { "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "name": "string", "postgres_version": "string", "project_id": "string", "region": "string", "state": "provisioning" }}Path Parameters
The ephemeral database's project id, as returned by the create call.
Header Parameters
The eph_ claim token returned when the database was created.
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/ephemeral-databases/string" \ -H "X-CapyDB-Claim-Token: string"{ "connections": { "direct_url": "string", "pooled_url": "string", "username": "string" }, "ephemeral_database": { "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "name": "string", "postgres_version": "string", "project_id": "string", "region": "string", "state": "provisioning" }}Path Parameters
The ephemeral database's project id, as returned by the create call.
Header Parameters
The eph_ claim token returned when the database was created.
Response Body
application/json
curl -X DELETE "https://example.com/v1/ephemeral-databases/string" \ -H "X-CapyDB-Claim-Token: string"Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
In: header
Path Parameters
The ephemeral database's project id, as returned by the create call.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/ephemeral-databases/string/claim" \ -H "Content-Type: application/json" \ -d '{ "claim_token": "string" }'{ "project": { "primary_instance_id": "string", "created_at": "2019-08-24T14:15:22Z", "database_name": "string", "direct_port": 0, "environment": "production", "id": "string", "idle_transaction_timeout": "string", "last_error": "string", "latest_job_id": "string", "max_connections": 0, "name": "string", "organization_id": "string", "plan": "string", "pooled_port": 0, "postgres_version": "string", "public_host": "string", "region": "string", "role_name": "string", "runtime_status": "active", "slug": "string", "ssl_mode": "string", "state": "provisioning", "statement_timeout": "string", "storage_limit_bytes": 0, "updated_at": "2019-08-24T14:15:22Z", "always_on": true }}