Get a database
curl --request GET \
--url https://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema} \
--header 'Authorization: Bearer <token>'import requests
url = "https://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}', 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://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}",
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://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}"
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://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}")
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{
"data": {
"id": "<string>",
"type": "databaseSchemas",
"attributes": {
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"database": {
"data": {
"type": "databases",
"id": "<string>"
}
},
"environments": {
"data": [
{
"type": "environments",
"id": "<string>"
}
]
}
}
},
"included": [
{
"id": "<string>",
"type": "databases",
"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": [
{
"type": "databaseSchemas",
"id": "<string>"
}
]
},
"databases": {
"data": [
{
"type": "databaseSchemas",
"id": "<string>"
}
]
}
}
}
]
}{
"message": "<string>"
}Databases
Get a database
Get a specific database.
GET
/
databases
/
clusters
/
{database}
/
databases
/
{schema}
Get a database
curl --request GET \
--url https://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema} \
--header 'Authorization: Bearer <token>'import requests
url = "https://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}', 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://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}",
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://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}"
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://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.laravel.com/api/databases/clusters/{database}/databases/{schema}")
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{
"data": {
"id": "<string>",
"type": "databaseSchemas",
"attributes": {
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"database": {
"data": {
"type": "databases",
"id": "<string>"
}
},
"environments": {
"data": [
{
"type": "environments",
"id": "<string>"
}
]
}
}
},
"included": [
{
"id": "<string>",
"type": "databases",
"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": [
{
"type": "databaseSchemas",
"id": "<string>"
}
]
},
"databases": {
"data": [
{
"type": "databaseSchemas",
"id": "<string>"
}
]
}
}
}
]
}{
"message": "<string>"
}Authorizations
The Bearer Token generated on the Cloud UI.
Path Parameters
The database identifier
The schema identifier
Query Parameters
Available options:
database, environments Was this page helpful?
⌘I

