Skip to main content
GET
/
organizations
/
{organization}
/
databases
/
{database}
/
maintenance-schedules
/
{id}
Get a maintenance schedule
curl --request GET \
  --url https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/maintenance-schedules/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "name": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "last_window_datetime": "<string>",
  "next_window_datetime": "<string>",
  "duration": 123,
  "day": 123,
  "hour": 123,
  "week": 123,
  "frequency_value": 123,
  "frequency_unit": "day",
  "enabled": true,
  "expires_at": "<string>",
  "deadline_at": "<string>",
  "required": true,
  "pending_vitess_version_update": true,
  "pending_vitess_version": "<string>"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
string
required

The ID of the maintenance schedule

organization
string
required

Organization name slug from list_organizations. Example: acme.

database
string
required

Database name slug from list_databases. Example: app-db.

Response

Returns a maintenance schedule

id
string
required

The ID of the maintenance schedule

name
string
required

The display name of the maintenance schedule

created_at
string
required

When the maintenance schedule was created

updated_at
string
required

When the maintenance schedule was last updated

last_window_datetime
string
required

When the last maintenance window started

next_window_datetime
string
required

When the next maintenance window is scheduled

duration
integer
required

The duration of the maintenance window in hours

day
integer
required

Day of the week (0 = Sunday, 6 = Saturday, 7 = every day)

hour
integer
required

Hour of the day in UTC (0-23)

week
integer
required

Week of the month for monthly schedules (0-3)

frequency_value
integer
required

The frequency value of the maintenance schedule

frequency_unit
enum<string>
required

The frequency unit of the maintenance schedule

Available options:
day,
week,
month,
once
enabled
boolean
required

Whether the maintenance schedule is enabled

expires_at
string
required

When a one-time maintenance schedule expires

deadline_at
string
required

The deadline for a required maintenance schedule

required
boolean
required

Whether the maintenance schedule is required

pending_vitess_version_update
boolean
required

Whether there is a pending Vitess version update

pending_vitess_version
string
required

The pending Vitess version, if any