curl --request GET \
--url https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-requests/{number} \
--header 'Authorization: <api-key>'{
"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>"
}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/{number} \
--header 'Authorization: <api-key>'{
"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
The number of the deploy request
Returns information about a deploy request
The ID of the deploy request
The number of the deploy request
The name of the branch the deploy request was created from
The ID of the branch the deploy request was created from
Whether or not the deploy request branch was deleted
When the deploy request branch was deleted
The name of the branch the deploy request will be merged into
Whether or not the branch the deploy request will be merged into is sharded
The number of shards the branch the deploy request will be merged into has
Whether or not the deploy request is approved
Whether the deploy request is open or closed
open, closed The deployment state of the deploy request
pending, ready, no_changes, queued, submitting, in_progress, pending_cutover, in_progress_vschema, in_progress_cancel, in_progress_cutover, complete, complete_cancel, complete_error, complete_pending_revert, in_progress_revert, in_progress_revert_vschema, complete_revert, complete_revert_error, cancelled, error Show child attributes
The ID of the deployment
Whether or not to automatically cutover once deployment is finished
Whether or not to automatically delete the head branch once deployment is finished
When the deployment was created
When the cutover for the deployment was initiated
Whether or not the deployment cutover will expire soon
Deploy check errors for the deployment
When the deployment was finished
When the deployment was queued
When the deployment was ready for cutover
When the deployment was started
The state the deployment is in
pending, ready, no_changes, queued, submitting, in_progress, pending_cutover, in_progress_vschema, in_progress_cancel, in_progress_cutover, complete, complete_cancel, complete_error, complete_pending_revert, in_progress_revert, in_progress_revert_vschema, complete_revert, complete_revert_error, cancelled, error When the deployment was submitted
When the deployment was last updated
The name of the base branch the deployment will be merged into
The number of the deploy request associated with this deployment
Whether the deployment is deployable
The deployments ahead of this one in the queue
Show child attributes
The ID for the deploy operation
The state of the deploy operation
pending, queued, in_progress, complete, cancelled, error The keyspace modified by the deploy operation
The name of the table modifed by the deploy operation
The operation name of the deploy operation
The estimated seconds until completion for the deploy operation
The percent completion for the deploy operation
A link to documentation explaining the deploy error, if present
The DDL statement for the deploy operation
A syntax-highlighted DDL statement for the deploy operation
When the deploy operation was created
When the deploy operation was last updated
When the deploy operation was last throttled
Whether or not the deploy operation is capable of dropping data
Whether or not the table modified by the deploy operation is currently locked
Whether or not the table modified by the deploy operation was recently used
When the table modified by the deploy operation was last used
Names of foreign keys removed by this operation
Deploy errors for the deploy operation
Show child attributes
The ID for the deploy operation summary
When the deploy operation summary was created
Deploy errors for the deploy operation summary
The DDL statement for the deploy operation summary
The estimated seconds until completion for the deploy operation summary
The keyspace modified by the deploy operation summary
The operation name of the deploy operation summary
The percent completion for the deploy operation summary
The state of the deploy operation summary
pending, in_progress, complete, cancelled, error A syntax-highlighted DDL statement for the deploy operation summary
The name of the table modifed by the deploy operation summary
When the table modified by the deploy operation summary was last used
When the deploy operation summary was last throttled
Names of foreign keys removed by this operation summary
The number of shards in the keyspace modified by the deploy operation summary
Names of shards in the keyspace modified by the deploy operation summary
Whether or not the deploy operation summary is capable of dropping data
Whether or not the table modified by the deploy operation summary was recently used
Whether or not the keyspace modified by the deploy operation summary is sharded
Show child attributes
The ID for the deploy operation
The shard the deploy operation is being performed on
The state of the deploy operation
pending, queued, in_progress, complete, cancelled, error The percent completion for the deploy operation
The estimated seconds until completion for the deploy operation
Schema lint errors preventing the deployment from completing
The schema dependencies that must be satisfied
Lookup Vitess index operations
Deployment throttling configurations
The request to revert the schema operations in this deployment
When the schema was last updated for the deployment
Whether or not the deployment has a table locked
The name of he table that is locked by the deployment
Whether or not the deployment is an instant DDL deployment
Whether or not the deployment is eligible for instant DDL
The number of comments on the deploy request
The PlanetScale app address for the deploy request
Notes on the deploy request
The HTML body of the deploy request
When the deploy request was created
When the deploy request was last updated
When the deploy request was closed
When the deploy request was deployed
Was this page helpful?