Create Critical Backup
Create a new critical backup job.
curl -X POST "https://api.5centscdn.com/v2/cb" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"_METHOD": "PUT",
"name": "Daily S3 Backup",
"meta": {
"prefix": "s3",
"description": "",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}
}'
import requests
import json
url = "https://api.5centscdn.com/v2/cb"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"_METHOD": "PUT",
"name": "Daily S3 Backup",
"meta": {
"prefix": "s3",
"description": "",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/cb", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"_METHOD": "PUT",
"name": "Daily S3 Backup",
"meta": {
"prefix": "s3",
"description": "",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"_METHOD": "PUT",
"name": "Daily S3 Backup",
"meta": {
"prefix": "s3",
"description": "",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/cb", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/cb')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"_METHOD": "PUT",
"name": "Daily S3 Backup",
"meta": {
"prefix": "s3",
"description": "",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "CriticalBackup added. Please link Push Zones & configure for periodic backups",
"backupid": 129017
}
/cb
Target server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
HTTP method override for this request. Always set to PUT to create a new backup.
Display name for the backup job. Required.
Provider configuration for the backup destination. prefix selects the storage provider and determines which other keys apply; description is an optional free-text note. All other keys are provider-specific credential and connection fields defined by the selected provider - for example ftp requires host (and accepts user, port, pass, tls, and other connection settings), http requires url, sftp requires host, s3 requires access_key_id and secret_access_key, and b2 requires account and key. Only ftp, http, sftp, s3, b2, storj, and koofr can be selected when creating a new backup; other supported providers can be assigned afterwards via the update endpoint. Depending on the provider field's type, some of these keys are validated before submission: size-suffix fields must be a number optionally followed by B, K, M, G, T, or P, or the literal value off; duration fields must be a sequence of optional numeric components for years (y), months (M), weeks (w), days (d), hours (h), minutes (m), seconds (s), and milliseconds (ms), for example 1h30m; URL fields must be a valid URL; JSON fields must contain valid JSON; and CSV fields must contain an even number of comma-separated values.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Body
HTTP method override for this request. Always set to PUT to create a new backup.
PUTProvider configuration for the backup destination. prefix selects the storage provider and determines which other keys apply; description is an optional free-text note. All other keys are provider-specific credential and connection fields defined by the selected provider - for example ftp requires host (and accepts user, port, pass, tls, and other connection settings), http requires url, sftp requires host, s3 requires access_key_id and secret_access_key, and b2 requires account and key. Only ftp, http, sftp, s3, b2, storj, and koofr can be selected when creating a new backup; other supported providers can be assigned afterwards via the update endpoint. Depending on the provider field's type, some of these keys are validated before submission: size-suffix fields must be a number optionally followed by B, K, M, G, T, or P, or the literal value off; duration fields must be a sequence of optional numeric components for years (y), months (M), weeks (w), days (d), hours (h), minutes (m), seconds (s), and milliseconds (ms), for example 1h30m; URL fields must be a valid URL; JSON fields must contain valid JSON; and CSV fields must contain an even number of comma-separated values.
{"prefix":"s3","description":"","access_key_id":"AKIAIOSFODNN7EXAMPLE","secret_access_key":"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}Responses
Status of the API response.
Human-readable status or result message.
The ID of the newly created backup job.