Get the deploy queue
curl --request GET \
--url https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"type": "<string>",
"current_page": 123,
"per_page": 123,
"next_page": 123,
"next_page_url": "<string>",
"prev_page": 123,
"prev_page_url": "<string>",
"data": [
{
"id": "<string>",
"auto_cutover": true,
"auto_delete_branch": true,
"aggressive_cutover": true,
"created_at": "<string>",
"cutover_at": "<string>",
"cutover_expiring": true,
"finished_at": "<string>",
"force_cutover_requested_at": "<string>",
"retry_requested": true,
"retry_requested_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": [
{}
],
"deployment_revert_request": {},
"schema_last_updated_at": "<string>",
"table_locked": true,
"instant_ddl": true,
"instant_ddl_eligible": true,
"queue_paused": true,
"queue_pause_reason": "<string>",
"deploy_check_errors": "<string>",
"throttler_configurations": {},
"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>"
},
"locked_table_name": "<string>"
}
]
}Deploy requests
Get the deploy queue
The deploy queue returns the current list of deploy requests in the order they will be deployed.
GET
/
organizations
/
{organization}
/
databases
/
{database}
/
deploy-queue
Get the deploy queue
curl --request GET \
--url https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/deploy-queue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"type": "<string>",
"current_page": 123,
"per_page": 123,
"next_page": 123,
"next_page_url": "<string>",
"prev_page": 123,
"prev_page_url": "<string>",
"data": [
{
"id": "<string>",
"auto_cutover": true,
"auto_delete_branch": true,
"aggressive_cutover": true,
"created_at": "<string>",
"cutover_at": "<string>",
"cutover_expiring": true,
"finished_at": "<string>",
"force_cutover_requested_at": "<string>",
"retry_requested": true,
"retry_requested_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": [
{}
],
"deployment_revert_request": {},
"schema_last_updated_at": "<string>",
"table_locked": true,
"instant_ddl": true,
"instant_ddl_eligible": true,
"queue_paused": true,
"queue_pause_reason": "<string>",
"deploy_check_errors": "<string>",
"throttler_configurations": {},
"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>"
},
"locked_table_name": "<string>"
}
]
}Authorizations
oauth2service_token
Path Parameters
Query Parameters
Response
Returns the deploy queue for a database

