Reblaze REST API
Reblaze REST API operations v2.x
Below are listed the available operations under Reblaze's API. The listings include descriptions, and examples using curl over Bash under Ubuntu 18.
In the commands below, the parameter $API_URL is https://$HOST/api/$KEY
, where $HOST refers to the console FQDN and $KEY refers to the API key.
Sites
List Sites
Lists all sites that are currently set up on the management console.
Duplicate Site
Duplicates/creates new site based on an existing site. You can choose to overwrite the upstream, or use the one that is currently set on the source site. The duplicate site will also create a referring CNAME based on the source site DNS settings.
Create Site
Creates a new site based on passed parameters and the selected template.
Remove Site
Removes the site from the sites list. This operation also removes the referring CNAME.
Set Names (domain aliases)
Sets the list of domains that a site supports, and replaces any that existed previously. You can add up to 100 domains per site. A domain can also contain wildcards (e.g, *.domain.name).
Add Names (domain aliases)
Adds to the list of domains that a site supports, without replacing any that existed previously. You can have up to 100 domains per site. A domain can also contain wildcards (e.g, *.domain.name).
Get Names (domain aliases)
Returns the list of domains that a site supports.
List Upstream
Lists the upstream settings of a site.
Set Upstream
Modifies upstream settings. You can add an upstream, change its state, or modify the upstream address. The upstream is a one-line JSON encoded in base64, as shown below. Parameters are described below the code example.
Encode the json with base64:
And set the upstreams:
SSL
List Certificates
Lists the certificates in SSL Management.
curl $API_URL/ssl/list
Add Certificate
Remove Certificate
curl $API_URL/ssl/remove
Replace Certificate
Replace one certificate with another on a passed list of sites and all load balancers.
Attach Certificate
Attaches a domain to a SSL certificate.
Detach Certificate
Removes an attached domain from SSL.
System
Publish Changes
Trusted Sources
Get, Add, Delete, Edit trusted sources (nets) for a planet.