Connections
Connection strings and credential rotation.
AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
Connection info.
application/json- response
connections*curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/connections'{ "connections": { "app": { "direct_url": "string", "pooled_url": "string", "username": "string" }, "direct_url": "string", "pooled_url": "string", "username": "string" }}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
previewID*stringPreview database id.
Connection info.
application/json- response
connections*curl -X GET 'https://capydb.dev/api/capydb/v1/preview-databases/string/connections'{ "connections": { "app": { "direct_url": "string", "pooled_url": "string", "username": "string" }, "direct_url": "string", "pooled_url": "string", "username": "string" }}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
application/json- body
grace_hours?integerHours the outgoing credential stays valid after rotation (0 = immediate cutover, max 720). When > 0 the rotation issues a new database username; update every consumer with the new connection string before the window ends.
0 <= value <= 7200Rotation job enqueued.
application/json- response
job*curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/credentials/rotate' \ -H 'Content-Type: application/json' \ -d '{}'{ "job": { "attempts": 0, "claimed_at": "2019-08-24T14:15:22Z", "claimed_by": "string", "host_id": "string", "instance_id": "string", "completed_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "error": "string", "id": "string", "last_exit_code": 0, "last_stderr": "string", "last_stdout": "string", "locked_resource": "string", "max_attempts": 0, "organization_id": "string", "preview_database_id": "string", "project_id": "string", "result": null, "retry_classification": "string", "started_at": "2019-08-24T14:15:22Z", "state": "pending", "type": "project.apply_plan", "updated_at": "2019-08-24T14:15:22Z" }}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
App role status.
application/json- response
app_role*curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/roles/app'{ "app_role": { "available": true, "created_at": "2019-08-24T14:15:22Z", "enabled": true, "rotated_at": "2019-08-24T14:15:22Z", "username": "string" }}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
Job enqueued.
application/json- response
job*curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/roles/app'{ "job": { "attempts": 0, "claimed_at": "2019-08-24T14:15:22Z", "claimed_by": "string", "host_id": "string", "instance_id": "string", "completed_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "error": "string", "id": "string", "last_exit_code": 0, "last_stderr": "string", "last_stdout": "string", "locked_resource": "string", "max_attempts": 0, "organization_id": "string", "preview_database_id": "string", "project_id": "string", "result": null, "retry_classification": "string", "started_at": "2019-08-24T14:15:22Z", "state": "pending", "type": "project.apply_plan", "updated_at": "2019-08-24T14:15:22Z" }}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
Job enqueued.
application/json- response
job*curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/roles/app/rotate'{ "job": { "attempts": 0, "claimed_at": "2019-08-24T14:15:22Z", "claimed_by": "string", "host_id": "string", "instance_id": "string", "completed_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "error": "string", "id": "string", "last_exit_code": 0, "last_stderr": "string", "last_stdout": "string", "locked_resource": "string", "max_attempts": 0, "organization_id": "string", "preview_database_id": "string", "project_id": "string", "result": null, "retry_classification": "string", "started_at": "2019-08-24T14:15:22Z", "state": "pending", "type": "project.apply_plan", "updated_at": "2019-08-24T14:15:22Z" }}