SiteDash API

SiteDash now has a simple JSON API.

Authentication

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}.

Rate limits

96 requests per day (once every 15 minutes on average), 1 per second.

Resources

The API is available at https://sitedash.app/api/, with the resource URI listed below.

  • GET modx-releases
  • GET modx-release/{signature}
  • GET packages
  • GET package/{name}
  • GET sites
  • POST sites - creates a new site record. Expects a `url` parameter in the POST form data.
  • GET site/{identifier}
  • GET site/{identifier}/packages
  • GET site/{identifier}/alerts
  • GET alerts

Collection responses

All collections return an array with the following keys:

  • total: the total number of items matching your request
  • page: the current page
  • limit: the amount of results that will be returned per page
  • pages: the total amount of pages with results
  • data: the actual resulting data

You can use the following URL parameters on any collection endpoint to navigate different pages:

  • page: an integer representing the current page
  • limit: 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..

Single Item Responses

The data is located in a data array.

Error messages

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.