curl --request GET \
--url https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-requests \
--header 'Authorization: <api-key>'{
"current_page": 123,
"next_page": 123,
"next_page_url": "<string>",
"prev_page": 123,
"prev_page_url": "<string>",
"data": [
{
"id": "<string>",
"number": 123,
"actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"closed_by": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"branch": "<string>",
"branch_id": "<string>",
"branch_deleted": true,
"branch_deleted_by": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"branch_deleted_at": "<string>",
"into_branch": "<string>",
"into_branch_sharded": true,
"into_branch_shard_count": 123,
"approved": true,
"state": "open",
"deployment_state": "pending",
"deployment": {
"id": "<string>",
"auto_cutover": true,
"auto_delete_branch": true,
"created_at": "<string>",
"cutover_at": "<string>",
"cutover_expiring": true,
"deploy_check_errors": "<string>",
"finished_at": "<string>",
"queued_at": "<string>",
"ready_to_cutover_at": "<string>",
"started_at": "<string>",
"state": "pending",
"submitted_at": "<string>",
"updated_at": "<string>",
"into_branch": "<string>",
"deploy_request_number": 123,
"deployable": true,
"preceding_deployments": [
{}
],
"deploy_operations": [
{
"id": "<string>",
"state": "pending",
"keyspace_name": "<string>",
"table_name": "<string>",
"operation_name": "<string>",
"eta_seconds": 123,
"progress_percentage": 123,
"deploy_error_docs_url": "<string>",
"ddl_statement": "<string>",
"syntax_highlighted_ddl": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"throttled_at": "<string>",
"can_drop_data": true,
"table_locked": true,
"table_recently_used": true,
"table_recently_used_at": "<string>",
"removed_foreign_key_names": [
"<string>"
],
"deploy_errors": "<string>"
}
],
"deploy_operation_summaries": [
{
"id": "<string>",
"created_at": "<string>",
"deploy_errors": "<string>",
"ddl_statement": "<string>",
"eta_seconds": 123,
"keyspace_name": "<string>",
"operation_name": "<string>",
"progress_percentage": 123,
"state": "pending",
"syntax_highlighted_ddl": "<string>",
"table_name": "<string>",
"table_recently_used_at": "<string>",
"throttled_at": "<string>",
"removed_foreign_key_names": [
"<string>"
],
"shard_count": 123,
"shard_names": [
"<string>"
],
"can_drop_data": true,
"table_recently_used": true,
"sharded": true,
"operations": [
{
"id": "<string>",
"shard": "<string>",
"state": "pending",
"progress_percentage": 123,
"eta_seconds": 123
}
]
}
],
"lint_errors": [
{}
],
"sequential_diff_dependencies": [
{}
],
"lookup_vindex_operations": [
{}
],
"throttler_configurations": [
{}
],
"deployment_revert_request": {},
"actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"cutover_actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"cancelled_actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"schema_last_updated_at": "<string>",
"table_locked": true,
"locked_table_name": "<string>",
"instant_ddl": true,
"instant_ddl_eligible": true
},
"num_comments": 123,
"html_url": "<string>",
"notes": "<string>",
"html_body": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"closed_at": "<string>",
"deployed_at": "<string>"
}
]
}List deploy requests for a database
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_deploy_request
OAuth Scopes
| Resource | Scopes |
|---|---|
| Organization | read_deploy_requests |
| Database | read_deploy_requests |
curl --request GET \
--url https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-requests \
--header 'Authorization: <api-key>'{
"current_page": 123,
"next_page": 123,
"next_page_url": "<string>",
"prev_page": 123,
"prev_page_url": "<string>",
"data": [
{
"id": "<string>",
"number": 123,
"actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"closed_by": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"branch": "<string>",
"branch_id": "<string>",
"branch_deleted": true,
"branch_deleted_by": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"branch_deleted_at": "<string>",
"into_branch": "<string>",
"into_branch_sharded": true,
"into_branch_shard_count": 123,
"approved": true,
"state": "open",
"deployment_state": "pending",
"deployment": {
"id": "<string>",
"auto_cutover": true,
"auto_delete_branch": true,
"created_at": "<string>",
"cutover_at": "<string>",
"cutover_expiring": true,
"deploy_check_errors": "<string>",
"finished_at": "<string>",
"queued_at": "<string>",
"ready_to_cutover_at": "<string>",
"started_at": "<string>",
"state": "pending",
"submitted_at": "<string>",
"updated_at": "<string>",
"into_branch": "<string>",
"deploy_request_number": 123,
"deployable": true,
"preceding_deployments": [
{}
],
"deploy_operations": [
{
"id": "<string>",
"state": "pending",
"keyspace_name": "<string>",
"table_name": "<string>",
"operation_name": "<string>",
"eta_seconds": 123,
"progress_percentage": 123,
"deploy_error_docs_url": "<string>",
"ddl_statement": "<string>",
"syntax_highlighted_ddl": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"throttled_at": "<string>",
"can_drop_data": true,
"table_locked": true,
"table_recently_used": true,
"table_recently_used_at": "<string>",
"removed_foreign_key_names": [
"<string>"
],
"deploy_errors": "<string>"
}
],
"deploy_operation_summaries": [
{
"id": "<string>",
"created_at": "<string>",
"deploy_errors": "<string>",
"ddl_statement": "<string>",
"eta_seconds": 123,
"keyspace_name": "<string>",
"operation_name": "<string>",
"progress_percentage": 123,
"state": "pending",
"syntax_highlighted_ddl": "<string>",
"table_name": "<string>",
"table_recently_used_at": "<string>",
"throttled_at": "<string>",
"removed_foreign_key_names": [
"<string>"
],
"shard_count": 123,
"shard_names": [
"<string>"
],
"can_drop_data": true,
"table_recently_used": true,
"sharded": true,
"operations": [
{
"id": "<string>",
"shard": "<string>",
"state": "pending",
"progress_percentage": 123,
"eta_seconds": 123
}
]
}
],
"lint_errors": [
{}
],
"sequential_diff_dependencies": [
{}
],
"lookup_vindex_operations": [
{}
],
"throttler_configurations": [
{}
],
"deployment_revert_request": {},
"actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"cutover_actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"cancelled_actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"schema_last_updated_at": "<string>",
"table_locked": true,
"locked_table_name": "<string>",
"instant_ddl": true,
"instant_ddl_eligible": true
},
"num_comments": 123,
"html_url": "<string>",
"notes": "<string>",
"html_body": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"closed_at": "<string>",
"deployed_at": "<string>"
}
]
}The name of the deploy request's organization
The name of the deploy request's database
Filter by state of the deploy request (open, closed, deployed)
Filter by the name of the branch the deploy request is created from
Filter by the name of the branch the deploy request will be merged into
Filter deploy requests by the date they were deployed. (e.g. 2023-01-01T00:00:00Z..2023-01-31T23:59:59Z)
Filter deploy requests by the date they were running. (e.g. 2023-01-01T00:00:00Z..2023-01-31T23:59:59Z)
If provided, specifies the page offset of returned results
If provided, specifies the number of returned results
Returns a list of deploy requests
Was this page helpful?