Update backup configuration
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://forge.laravel.com/api/orgs/{organization}/servers/{server}/database/backups/{backupConfiguration}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'storage_provider_id' => 123,
'database_ids' => [
123
],
'retention' => 4380,
'name' => '<string>',
'bucket' => '<string>',
'directory' => '<string>',
'cron' => '<string>',
'include_new_databases' => true,
'notification_email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request PUT \
--url https://forge.laravel.com/api/orgs/{organization}/servers/{server}/database/backups/{backupConfiguration} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storage_provider_id": 123,
"database_ids": [
123
],
"retention": 4380,
"name": "<string>",
"bucket": "<string>",
"directory": "<string>",
"cron": "<string>",
"include_new_databases": true,
"notification_email": "jsmith@example.com"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
storage_provider_id: 123,
database_ids: [123],
retention: 4380,
name: '<string>',
bucket: '<string>',
directory: '<string>',
cron: '<string>',
include_new_databases: true,
notification_email: 'jsmith@example.com'
})
};
fetch('https://forge.laravel.com/api/orgs/{organization}/servers/{server}/database/backups/{backupConfiguration}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://forge.laravel.com/api/orgs/{organization}/servers/{server}/database/backups/{backupConfiguration}"
payload := strings.NewReader("{\n \"storage_provider_id\": 123,\n \"database_ids\": [\n 123\n ],\n \"retention\": 4380,\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"directory\": \"<string>\",\n \"cron\": \"<string>\",\n \"include_new_databases\": true,\n \"notification_email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Backups
Update backup configuration
Update an existing backup configuration for the server.
Processing mode: async
PUT
/
orgs
/
{organization}
/
servers
/
{server}
/
database
/
backups
/
{backupConfiguration}
Update backup configuration
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://forge.laravel.com/api/orgs/{organization}/servers/{server}/database/backups/{backupConfiguration}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'storage_provider_id' => 123,
'database_ids' => [
123
],
'retention' => 4380,
'name' => '<string>',
'bucket' => '<string>',
'directory' => '<string>',
'cron' => '<string>',
'include_new_databases' => true,
'notification_email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request PUT \
--url https://forge.laravel.com/api/orgs/{organization}/servers/{server}/database/backups/{backupConfiguration} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storage_provider_id": 123,
"database_ids": [
123
],
"retention": 4380,
"name": "<string>",
"bucket": "<string>",
"directory": "<string>",
"cron": "<string>",
"include_new_databases": true,
"notification_email": "jsmith@example.com"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
storage_provider_id: 123,
database_ids: [123],
retention: 4380,
name: '<string>',
bucket: '<string>',
directory: '<string>',
cron: '<string>',
include_new_databases: true,
notification_email: 'jsmith@example.com'
})
};
fetch('https://forge.laravel.com/api/orgs/{organization}/servers/{server}/database/backups/{backupConfiguration}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://forge.laravel.com/api/orgs/{organization}/servers/{server}/database/backups/{backupConfiguration}"
payload := strings.NewReader("{\n \"storage_provider_id\": 123,\n \"database_ids\": [\n 123\n ],\n \"retention\": 4380,\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"directory\": \"<string>\",\n \"cron\": \"<string>\",\n \"include_new_databases\": true,\n \"notification_email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The organization slug
The server ID
The backup configuration ID
Body
application/json
Available options:
hourly, daily, weekly, custom Minimum array length:
1Required range:
1 <= x <= 8760Maximum string length:
255Available options:
0, 1, 2, 3, 4, 5, 6 Available options:
00:00, 00:30, 01:00, 01:30, 02:00, 02:30, 03:00, 03:30, 04:00, 04:30, 05:00, 05:30, 06:00, 06:30, 07:00, 07:30, 08:00, 08:30, 09:00, 09:30, 10:00, 10:30, 11:00, 11:30, 12:00, 12:30, 13:00, 13:30, 14:00, 14:30, 15:00, 15:30, 16:00, 16:30, 17:00, 17:30, 18:00, 18:30, 19:00, 19:30, 20:00, 20:30, 21:00, 21:30, 22:00, 22:30, 23:00, 23:30 Response
Was this page helpful?