SiteDash now has a simple JSON API.
All endpoints require Bearer authentication. Create a new token here, and then send it along to all requests in the Authorization
header as Bearer {TOKEN}
.
96 requests per day (once every 15 minutes on average), 1 per second.
The API is available at https://sitedash.app/api/
, with the resource URI listed below.
modx-releases
modx-release/{signature}
packages
package/{name}
sites
sites
- creates a new site record. Expects a `url` parameter in the POST form data.site/{identifier}
site/{identifier}/packages
site/{identifier}/alerts
alerts
All collections return an array with the following keys:
total
: the total number of items matching your requestpage
: the current pagelimit
: the amount of results that will be returned per pagepages
: the total amount of pages with resultsdata
: the actual resulting dataYou can use the following URL parameters on any collection endpoint to navigate different pages:
page
: an integer representing the current pagelimit
: an integer representing how many results should be returned per page. Can be set to any number between 1 and 100.To change the sort on the collection, use the following URL parameters:
sortby
: set to the name of a field to sort by. See the specific resource documentation for sortable fields.sortdir
: either ASC
or DESC
to change the sort direction..The data is located in a data
array.
When an error occured, the API will return a an error
key in the root object. That error object contains a code
and message
. The HTTP code will also be set to an appropriate status code.
401
, with code PERMISSION-DENIED
: returned when your API key lacks a certain permission that is needed to perform the action. The premission that is required is provided in a required_permission
key.403
, with code SITE-LIMIT-REACHED
: returned when trying to create a site, which required_permission
key.404
, with code NOT-FOUND
: returned when the endpoint or object you requested could not be found.