v17

latestOpenAPI 3.0.1raw.githubusercontent.com2026-07-08165682.0 MB
Deploy requests

Complete a revert

Authorization

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, create_deploy_request

OAuth Scopes

ResourceScopes
Organizationdeploy_deploy_requests
Databasedeploy_deploy_requests
post/organizations/{organization}/databases/{database}/deploy-requests/{number}/revert

Path parameters

organizationstring required

The name of the deploy request's organization

databasestring required

The name of the deploy request's database

numberinteger required

The number of the deploy request

Response

Returns the deploy request that was reverted

idstring required

The ID of the deploy request

numberinteger required

The number of the deploy request

branchstring required

The name of the branch the deploy request was created from

branch_idstring required

The ID of the branch the deploy request was created from

branch_deletedboolean required

Whether or not the deploy request branch was deleted

branch_deleted_atstring nullable required

When the deploy request branch was deleted

into_branchstring required

The name of the branch the deploy request will be merged into

into_branch_shardedboolean required

Whether or not the branch the deploy request will be merged into is sharded

into_branch_shard_countinteger required

The number of shards the branch the deploy request will be merged into has

into_branch_keyspace_countinteger required

The number of keyspaces the branch the deploy request will be merged into has

approvedboolean required

Whether or not the deploy request is approved

state'open' | 'closed' required

Whether the deploy request is open or closed

deployment_state'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' required

The deployment state of the deploy request

num_commentsinteger required

The number of comments on the deploy request

html_urlstring required

The PlanetScale app address for the deploy request

notesstring required

Notes on the deploy request

html_bodystring required

The HTML body of the deploy request

created_atstring required

When the deploy request was created

updated_atstring required

When the deploy request was last updated

closed_atstring nullable required

When the deploy request was closed

deployed_atstring nullable required

When the deploy request was deployed