Server-level API

Use the Server-level API to interact with your SetSeed installation on the same level as the SetSeed Hub. The API will continue to grow with future versions.

Getting Started

To use the Server-level API you need to first get an auth key from the SetSeed Hub. Click the 'API' icon in the top right of the SetSeed Hub to get/regenerate an auth key.

Example GET request using cURL in PHP:
Replace YOUR_AUTH_KEY with your Hub API Key value and www.example.com with the domain of your server.

<?php
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_HTTPHEADER, array(
'SetSeed-Hub-API-Key: YOUR_AUTH_KEY'
));
curl_setopt($curlHandle, CURLOPT_TIMEOUT, 10);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlHandle, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curlHandle, CURLOPT_URL, "http://www.example.com/setseed-hub/api/sites");
$responseBody = curl_exec($curlHandle);
$responseInfo = curl_getinfo($curlHandle);
print_r($responseInfo);
curl_close($curlHandle);
?>

/setseed-hub/api/sites

POST /setseed-hub/api/sites

Use this endpoint to create a new website in your Hub.

Returns:
HTTP Status code: 201

Paramters Description
domain (required) The domain of the site you want to create.
branding_logo_dark (legacy) string obtained from licensing API
branding_logo_light (legacy) string obtained from licensing API
branding_favicon (legacy) string obtained from licensing API
branding_name (legacy) string obtained from licensing API
branding_key (legacy) string obtained from licensing API
trial_key (legacy) string obtained from licensing API if license is a trial license
redirect_on_expire (legacy) domain name (without http://) to send trial sites to after trial expires
theme (string) default="default", name of the theme you want to apply to this site. Can be a global theme or a theme folder that exists in the source folder (sites/default by default unless specified specifcially with 'import_data'.)
import_data (string) default="default", the name of a folder that exists in your sites folder to duplicate when creating this site. db.sql found in this folder will be used for content data.
limit_storage (numeric) default=0. Optional value to specify a storage space limit for this site.
limit_pages (numeric) default=0. Optional value to specify a page limit for this site.
limit_products (numeric) default=0. Optional value to specify a product limit for this site.
limit_blogs (numeric) default=0. Optional value to specify a product limit for this site.

PUT /setseed-hub/api/sites/<id>

Updates values for a website with <id>.

Returns:
HTTP Status code: 200

Parameters Description
domain (string) Enter a new domain name if you want to change the domain for a site.
limit_storage (numeric) default=0. Optional value to specify a storage space limit for this site.
limit_pages (numeric) default=0. Optional value to specify a page limit for this site.
limit_products (numeric) default=0. Optional value to specify a product limit for this site.
limit_blogs (numeric) default=0. Optional value to specify a product limit for this site.
disabled_frontend (bool) default=false. Set to true if you want to disable the front-end of the website.
disabled_backend (bool) default=false. Set to true if you want to disable the back-end of the website.
disabled_frontend_redirect (string) Enter a website address to redirect the front-end to if 'disabled_frontend' is set to true.
disabled_backend_redirect (string) Enter a website address to redirect the back-end to if 'disabled_backend' is set to true.

/setseed-hub/api/global_themes

This API request can be used to get a list of all global themes on your server. You can then choose one to apply to new sites created with POST /setseed-hub/api/sites

GET /setseed-hub/api/global_themes

Returns:
HTTP Status code: 200 and array of global theme names

Search