API Overview
We're happy to help you build whatever functionality you need with the API.
Please don't hesitate to :
- Contact us at support@expeditedsecurity.com
- Book a Call at https://app.harmonizely.com/expedited/30-min
We're a team of developers and sysadmins who can troubleshoot and debug whatever API interactions you need to create.
API Key
Your API key can be found on the API Access page accessed from the side navigation menu after logging into your WAF dashboard.
- Each API Key is specific to a single WAF instance
- The API Key is required for all API endpoints
General API Usage
Requests
API endpoints are "RESTish" in that:
- Endpoints are organized around objects and their representation
- Different HTTP verbs applied to the same API endpoint have different effects
- Requests are standard HTTP parameters (not full objects)
- All endpoints are referenced to https://api.expeditedsecurity.com
Send your API key in an X-Api-Key request header (or as
Authorization: Bearer YOUR-API-KEY):
curl -H "X-Api-Key: YOUR-API-KEY" https://api.expeditedsecurity.com/api/origins
Use the header for every request, especially GET requests. A key in
the URL (?api_key=...) is recorded in web server and hosting access
logs, where anyone who can read those logs can copy it. Older
integrations that send an api_key URL or form parameter keep working,
and a form parameter in a POST or DELETE body is not logged, but we
recommend moving to the header. If you have put your key in a URL and
want a new one, contact support@expeditedsecurity.com.
Responses
Most API endpoints return a JSON object with success and domain keys, as described below. The exception is the IP list endpoints (GET /api/blocklist_ips and GET /api/allowlist_ips), which return a bare JSON array of IP addresses.
Successful Responses
Successfully calling an API endpoint will:
- Return a HTTP Status code of 200
- Have a 'success' value of true
- Have a 'domain' value corresponding to the WAF instance associated with the API key (useful for differentiating staging from production applications)
- May have an additional 'message' value with more information on the request
Example
GET /api/origins with header X-Api-Key: example-api-key
HTTP 200 - application/json
{
domain: "example.com",
success: true,
origin: "example-app.herokuapp.com"
}
Failed Responses
Requests may fail for a variety of reasons, most often that:
- The API Key was not sent (in the
X-Api-Keyheader or an 'api_key' parameter) - A required parameter is missing
- The wrong HTTP verb was used than intended
Bad API Key Example
GET /api/origins with header X-Api-Key: BAD-API-KEY
HTTP 403 - application/json
{
success: false,
message: "Bad API Key Value"
}
Missing API Key Example
GET /api/origins
HTTP 403 - application/json
{
success: false,
message: "Missing API key (send an X-Api-Key header)"
}