curl --request GET \
--url https://api.planetscale.com/v1/organizations/{organization}/databases \
--header 'Authorization: <api-key>'{
"current_page": 123,
"next_page": 123,
"next_page_url": "<string>",
"prev_page": 123,
"prev_page_url": "<string>",
"data": [
{
"id": "<string>",
"url": "<string>",
"branches_url": "<string>",
"branches_count": 123,
"open_schema_recommendations_count": 123,
"development_branches_count": 123,
"production_branches_count": 123,
"issues_count": 123,
"multiple_admins_required_for_deletion": true,
"ready": true,
"at_backup_restore_branches_limit": true,
"at_development_branch_usage_limit": true,
"data_import": {
"state": "<string>",
"import_check_errors": "<string>",
"started_at": "<string>",
"finished_at": "<string>",
"data_source": {
"hostname": "<string>",
"port": 123,
"database": "<string>"
}
},
"region": {
"id": "<string>",
"provider": "<string>",
"enabled": true,
"public_ip_addresses": [
"<string>"
],
"display_name": "<string>",
"location": "<string>",
"slug": "<string>",
"current_default": true
},
"html_url": "<string>",
"name": "<string>",
"state": "pending",
"sharded": true,
"default_branch_shard_count": 123,
"default_branch_read_only_regions_count": 123,
"default_branch_table_count": 123,
"default_branch": "<string>",
"require_approval_for_deploy": true,
"resizing": true,
"resize_queued": true,
"allow_data_branching": true,
"foreign_keys_enabled": true,
"automatic_migrations": true,
"restrict_branch_region": true,
"insights_raw_queries": true,
"plan": "<string>",
"insights_enabled": true,
"production_branch_web_console": true,
"migration_table_name": "<string>",
"migration_framework": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"schema_last_updated_at": "<string>",
"kind": "mysql"
}
]
}A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
Service Token Accesses
read_database, delete_database, write_database, read_branch, delete_branch, create_branch, delete_production_branch, connect_branch, connect_production_branch, delete_branch_password, delete_production_branch_password, read_deploy_request, create_deploy_request, approve_deploy_request, read_schema_recommendations, close_schema_recommendations, read_comment, create_comment, restore_backup, restore_production_branch_backup, read_backups, write_backups, delete_backups, delete_production_branch_backups, write_branch_vschema, write_production_branch_vschema
OAuth Scopes
| Resource | Scopes |
|---|---|
| Organization | read_databases |
curl --request GET \
--url https://api.planetscale.com/v1/organizations/{organization}/databases \
--header 'Authorization: <api-key>'{
"current_page": 123,
"next_page": 123,
"next_page_url": "<string>",
"prev_page": 123,
"prev_page_url": "<string>",
"data": [
{
"id": "<string>",
"url": "<string>",
"branches_url": "<string>",
"branches_count": 123,
"open_schema_recommendations_count": 123,
"development_branches_count": 123,
"production_branches_count": 123,
"issues_count": 123,
"multiple_admins_required_for_deletion": true,
"ready": true,
"at_backup_restore_branches_limit": true,
"at_development_branch_usage_limit": true,
"data_import": {
"state": "<string>",
"import_check_errors": "<string>",
"started_at": "<string>",
"finished_at": "<string>",
"data_source": {
"hostname": "<string>",
"port": 123,
"database": "<string>"
}
},
"region": {
"id": "<string>",
"provider": "<string>",
"enabled": true,
"public_ip_addresses": [
"<string>"
],
"display_name": "<string>",
"location": "<string>",
"slug": "<string>",
"current_default": true
},
"html_url": "<string>",
"name": "<string>",
"state": "pending",
"sharded": true,
"default_branch_shard_count": 123,
"default_branch_read_only_regions_count": 123,
"default_branch_table_count": 123,
"default_branch": "<string>",
"require_approval_for_deploy": true,
"resizing": true,
"resize_queued": true,
"allow_data_branching": true,
"foreign_keys_enabled": true,
"automatic_migrations": true,
"restrict_branch_region": true,
"insights_raw_queries": true,
"plan": "<string>",
"insights_enabled": true,
"production_branch_web_console": true,
"migration_table_name": "<string>",
"migration_framework": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"schema_last_updated_at": "<string>",
"kind": "mysql"
}
]
}The name of the organization the database belongs to
Search term to filter databases by name
If provided, specifies the page offset of returned results
If provided, specifies the number of returned results
Retrieves the databases for an organization
The current page number
The next page number
The next page of results
The previous page number
The previous page of results
Show child attributes
The ID of the database
The URL to the database API endpoint
The URL to retrieve this database's branches via the API
The total number of database branches
The total number of schema recommendations
The total number of database development branches
The total number of database production branches
The total number of ongoing issues within a database
If the database requires multiple admins for deletion
If the database is ready to be used
If the database has reached its backup restored branch limit
If the database has reached its development branch limit
Show child attributes
State of the data import
Errors encountered during the import check
When the import started
When the import finished
Show child attributes
The ID of the region
Provider for the region (ex. AWS)
Whether or not the region is currently active
Public IP addresses for the region
Name of the region
Location of the region
The slug of the region
True if the region is the default for new branch creation
The URL to see this database's branches in the web UI
Name of the database
State of the database
pending, importing, sleep_in_progress, sleeping, awakening, import_ready, ready If the database is sharded
Number of shards in the default branch
Number of read only regions in the default branch
Number of tables in the default branch schema
The default branch for the database
Whether an approval is required to deploy schema changes to this database
True if a branch is currently resizing
True if a branch has a queued resize request
Whether seeding branches with data is enabled for all branches
Whether foreign key constraints are enabled
Whether to automatically manage Rails migrations during deploy requests
Whether to restrict branch creation to one region
Whether raw SQL queries are collected
The database plan
True if query insights is enabled for the database
Whether web console is enabled for production branches
Table name to use for copying schema migration data
Framework used for applying migrations
When the database was created
When the database was last updated
When the default branch schema was last changed.
The kind of database
mysql, postgresql Was this page helpful?