Create a database
curl --request POST \
--url https://cloud.laravel.com/api/databases/clusters/{database}/databases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"data": {
"id": "<string>",
"attributes": {
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"database": {
"data": {
"id": "<string>"
}
},
"environments": {
"data": [
{
"id": "<string>"
}
]
}
}
},
"included": [
{
"id": "<string>",
"attributes": {
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"config": {
"suspend_seconds": 123,
"retention_days": 123
},
"connection": {
"hostname": "<string>",
"username": "<string>",
"password": "<string>"
}
},
"relationships": {
"schemas": {
"data": [
{
"id": "<string>"
}
]
},
"databases": {
"data": [
{
"id": "<string>"
}
]
}
}
}
]
}Databases
Create a database
Create a new database in a database cluster.
POST
/
databases
/
clusters
/
{database}
/
databases
Create a database
curl --request POST \
--url https://cloud.laravel.com/api/databases/clusters/{database}/databases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"data": {
"id": "<string>",
"attributes": {
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"database": {
"data": {
"id": "<string>"
}
},
"environments": {
"data": [
{
"id": "<string>"
}
]
}
}
},
"included": [
{
"id": "<string>",
"attributes": {
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"config": {
"suspend_seconds": 123,
"retention_days": 123
},
"connection": {
"hostname": "<string>",
"username": "<string>",
"password": "<string>"
}
},
"relationships": {
"schemas": {
"data": [
{
"id": "<string>"
}
]
},
"databases": {
"data": [
{
"id": "<string>"
}
]
}
}
}
]
}Authorizations
The Bearer Token generated on the Cloud UI.
Path Parameters
The database identifier
Body
application/json
Required string length:
3 - 40Pattern:
^[a-z0-9_-]+$Was this page helpful?
⌘I

