Laravel Database Restores API
The Database Restores API from Laravel — 1 operation(s) for database restores.
The Database Restores API from Laravel — 1 operation(s) for database restores.
openapi: 3.1.0
info:
title: Laravel Cloud Applications Database Restores API
version: 0.0.1
servers:
- url: https://cloud.laravel.com/api
security:
- http: []
tags:
- name: Database Restores
paths:
/databases/clusters/{database}/restore:
post:
operationId: public.databases.clusters.restore
description: Restore a database cluster from a point in time or snapshot. Returns the newly created database.
summary: Create a database restore
tags:
- Database Restores
parameters:
- name: database
in: path
required: true
description: The database identifier
schema:
type:
- string
- 'null'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/StoreDatabaseRestoreRequest'
responses:
'201':
description: '`DatabaseResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/DatabaseResource'
included:
type: array
items:
$ref: '#/components/schemas/DatabaseSchemaResource'
required:
- data
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
components:
schemas:
CloudRegion:
type: string
enum:
- us-east-2
- us-east-1
- ca-central-1
- eu-central-1
- eu-west-1
- eu-west-2
- me-central-1
- ap-southeast-1
- ap-southeast-2
- ap-northeast-1
title: CloudRegion
DatabaseResource:
type: object
properties:
id:
type: string
type:
type: string
enum:
- databases
attributes:
type: object
properties:
name:
type: string
type:
$ref: '#/components/schemas/DatabaseType'
status:
$ref: '#/components/schemas/DatabaseStatus'
region:
$ref: '#/components/schemas/CloudRegion'
created_at:
type:
- string
- 'null'
format: date-time
config:
description: Configuration object. Fields vary based on database type.
oneOf:
- title: Neon Serverless Postgres
type: object
description: Configuration for Neon Serverless Postgres databases
properties:
cu_min:
type: number
description: Minimum compute units for auto-scaling
enum:
- 0.25
- 0.5
- 1
- 2
- 4
- 8
- 10
cu_max:
type: number
description: Maximum compute units for auto-scaling
enum:
- 0.25
- 0.5
- 1
- 2
- 4
- 8
- 10
suspend_seconds:
type: integer
description: 'Seconds of inactivity before hibernation (0 = never, otherwise 60–604800) (min: 0, max: 604800)'
retention_days:
type: integer
description: 'Days to retain point-in-time recovery data (min: 0, max: 30)'
required:
- cu_min
- cu_max
- suspend_seconds
- retention_days
- title: Laravel MySQL
type: object
description: Configuration for Laravel MySQL databases
properties:
size:
type: string
description: Instance size for the database cluster
enum:
- mysql-flex-512mb
- mysql-flex-1gb
- mysql-flex-2gb
- db-flex.m-1vcpu-512mb
- db-flex.m-1vcpu-1gb
- db-flex.m-1vcpu-2gb
- db-flex.m-1vcpu-4gb
- db-pro.m-1vcpu-4gb
- db-pro.m-2vcpu-8gb
- db-pro.m-4vcpu-16gb
- db-pro.m-8vcpu-32gb
- mysql-pro-4gb
- mysql-pro-8gb
- mysql-pro-16gb
- mysql-pro-32gb
storage:
type: integer
description: 'Storage allocation in gigabytes (min: 5, max: 1000)'
is_public:
type: boolean
description: Whether the database is publicly accessible
uses_scheduled_snapshots:
type: boolean
description: Whether scheduled backups are enabled
retention_days:
type: integer
description: 'Days to retain backup data (min: 0, max: 30)'
maintenance_window:
type:
- string
- 'null'
description: UTC maintenance window for automated updates
examples:
- sun:06:00-sun:06:30
suspend_seconds:
type: integer
description: 'Seconds of inactivity before scaling to zero (0 = never). Requires an eligible size and the scale-to-zero feature. (min: 0, max: 3600)'
required:
- size
- storage
- is_public
- uses_scheduled_snapshots
- retention_days
- title: AWS RDS
type: object
description: Configuration for AWS RDS MySQL databases
properties:
size:
type: string
description: Instance size for the database cluster
enum:
- db.m8g.large
- db.m8g.xlarge
- db.m8g.2xlarge
- db.m8g.4xlarge
- db.m8g.8xlarge
- db.m8g.12xlarge
- db.m8g.16xlarge
- db.m8g.24xlarge
- db.m8g.48xlarge
- db.m7g.large
- db.m7g.xlarge
- db.m7g.2xlarge
- db.m7g.4xlarge
- db.m7g.8xlarge
- db.m7g.12xlarge
- db.m7g.16xlarge
- db.t4g.micro
- db.t4g.small
- db.t4g.medium
- db.t4g.large
- db.t4g.xlarge
- db.t4g.2xlarge
- db.r8g.large
- db.r8g.xlarge
- db.r8g.2xlarge
- db.r8g.4xlarge
- db.r8g.8xlarge
- db.r8g.12xlarge
- db.r8g.16xlarge
storage:
type: integer
description: 'Storage allocation in gigabytes (min: 5, max: 1000)'
is_public:
type: boolean
description: Whether the database is publicly accessible
uses_pitr:
type: boolean
description: Whether point-in-time recovery is enabled
retention_days:
type: integer
description: 'Days to retain backup data (min: 0, max: 30)'
maintenance_window:
type:
- string
- 'null'
description: UTC maintenance window for automated updates
examples:
- sun:06:00-sun:06:30
deployment_option:
type: string
description: Deployment configuration (single-az or multi-az)
enum:
- single-az
- single-az-with-read-replicas
- multi-az
read_replicas:
type:
- integer
- 'null'
description: The number of configured read replicas
required:
- size
- storage
- is_public
- uses_pitr
- retention_days
- deployment_option
discriminator:
propertyName: type
mapping:
laravel_mysql_84: '#/components/schemas/LaravelMysqlConfig'
laravel_mysql_8: '#/components/schemas/LaravelMysqlConfig'
aws_rds_mysql_8: '#/components/schemas/AwsRdsConfig'
aws_rds_postgres_18: '#/components/schemas/AwsRdsConfig'
neon_serverless_postgres_18: '#/components/schemas/NeonServerlessConfig'
neon_serverless_postgres_17: '#/components/schemas/NeonServerlessConfig'
neon_serverless_postgres_16: '#/components/schemas/NeonServerlessConfig'
connection:
type: object
properties:
hostname:
type: string
port:
type: integer
enum:
- 3306
- 5432
protocol:
type: string
enum:
- mysql
- postgres
driver:
type: string
enum:
- mysql
- pgsql
? ''
: anyOf:
- type: object
properties:
username:
type: string
password:
type: string
required:
- username
- password
- type: array
items:
type: string
minItems: 0
maxItems: 0
additionalItems: false
required:
- hostname
- port
- protocol
- driver
- null
required:
- name
- type
- status
- region
- created_at
- config
- connection
relationships:
type: object
properties:
schemas:
type: object
description: 'TODO: Remove the schemas relationship by March 2026.'
properties:
data:
type: array
items:
$ref: '#/components/schemas/DatabaseSchemaResourceIdentifier'
required:
- data
databases:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/DatabaseSchemaResourceIdentifier'
required:
- data
required:
- id
- type
title: DatabaseResource
StoreDatabaseRestoreRequest:
type: object
properties:
name:
type: string
description: The name of the new database created from the restore.
pattern: ^[a-z0-9_-]+$
minLength: 3
maxLength: 40
restore_time:
type:
- string
- 'null'
format: date-time
description: The point in time to restore the database to. Must not be used with database_snapshot_id.
database_snapshot_id:
type:
- string
- 'null'
required:
- name
title: StoreDatabaseRestoreRequest
DatabaseResourceIdentifier:
type: object
properties:
type:
type: string
enum:
- databases
id:
type: string
required:
- type
- id
title: DatabaseResourceIdentifier
DatabaseType:
type: string
enum:
- laravel_mysql_84
- laravel_mysql_8
- aws_rds_mysql_8
- aws_rds_postgres_18
- neon_serverless_postgres_18
- neon_serverless_postgres_17
- neon_serverless_postgres_16
title: DatabaseType
DatabaseSchemaResource:
type: object
properties:
id:
type: string
type:
type: string
enum:
- databaseSchemas
attributes:
type: object
properties:
name:
type: string
status:
type: string
created_at:
type:
- string
- 'null'
format: date-time
required:
- name
- status
- created_at
relationships:
type: object
properties:
database:
type: object
properties:
data:
anyOf:
- $ref: '#/components/schemas/DatabaseResourceIdentifier'
- type: 'null'
required:
- data
environments:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/EnvironmentResourceIdentifier'
required:
- data
required:
- id
- type
title: DatabaseSchemaResource
DatabaseSchemaResourceIdentifier:
type: object
properties:
type:
type: string
enum:
- databaseSchemas
id:
type: string
required:
- type
- id
title: DatabaseSchemaResourceIdentifier
EnvironmentResourceIdentifier:
type: object
properties:
type:
type: string
enum:
- environments
id:
type: string
required:
- type
- id
title: EnvironmentResourceIdentifier
DatabaseStatus:
type: string
enum:
- creating
- updating
- restarting
- upgrading
- moving
- available
- stopped
- restoring
- restore_failed
- disabled
- snapshotting_before_archiving
- archiving
- archived
- deleting
- deleted
- unknown
title: DatabaseStatus
responses:
AuthorizationException:
description: Authorization error
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: Error overview.
required:
- message
ModelNotFoundException:
description: Not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: Error overview.
required:
- message
ValidationException:
description: Validation error
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: Errors overview.
errors:
type: object
description: A detailed description of each field that failed validation.
additionalProperties:
type: array
items:
type: string
required:
- message
- errors
securitySchemes:
http:
type: http
description: The Bearer Token generated on the Cloud UI.
scheme: bearer
bearerFormat: bearer