Skip to content

Cert Spotter Monitored Domains API

Overview

The monitored domains API allows you to add, remove, and configure the domains monitored by Cert Spotter.

Monitored Domain Object

The configuration for a monitored domain is represented as a JSON object with the URL https://sslmate.com/api/v3/monitoring/monitored_domains/NAME.

If NAME is a dot followed by a domain name (e.g. .example.com), then that domain name, and its entire sub-domain tree, is monitored. If NAME is a bare domain name with no leading dot (e.g. example.com, then no sub-domains are monitored.

The monitored domain object has the following fields:

name string Always the same as the NAME in the URL. Immutable.
enabled boolean Whether or not monitoring is enabled for this domain. Default: true

Add or Update a Monitored Domain

To add or update a monitored domain, POST a monitored domain JSON object (as specified above), to its URL. If a field is omitted, then it is set to the specified default (in the case of a new object), or the existing value is left as-is (in the case of an existing object).

Example: curl -H 'Content-Type: application/json' --data-binary '{"enabled":true}' -X POST -u 123_sampleapikey: https://sslmate.com/api/v3/monitoring/monitored_domains/.example.com

Delete a Monitored Domain

To delete a monitored domain object, send a DELETE request to its URL.

Example: curl -u 123_sampleapikey: https://sslmate.com/api/v3/monitoring/monitored_domains/.example.com

A successful deletion will result in a 204 response with an empty body.

If there is no monitored domain with the given NAME, a 404 response is returned.

Retrieve a Monitored Domain

To retrieve a monitored domain object, send a GET request to its URL.

Example: curl -u 123_sampleapikey: https://sslmate.com/api/v3/monitoring/monitored_domains/.example.com

If there is no monitored domain with the given NAME, a 404 response is returned.

List Monitored Domains

To retrieve a JSON array of all your monitored domain objects, send a GET request to https://sslmate.com/api/v3/monitoring/monitored_domains.

Example: curl -u 123_sampleapikey: https://sslmate.com/api/v3/monitoring/monitored_domains

Monitored Domain Object Matching

An endpoint is monitored if and only if there is a monitored domain object in your account whose name matches the endpoint's domain name, and that monitored domain object is enabled.

In some cases, there may be multiple monitored domain objects which could apply to an endpoint. For example, if your account contains monitored domain objects for .example.com, .sub.example.com, and sub.example.com, then sub.example.com matches all three. When this happens, the most specific monitored domain object (sub.example.com in this case) is used, and its enabled value determines whether the endpoint is monitored.

Authentication

Your API key can be found on your account page.

Authentication examples:

curl -H "Authorization: Bearer 123_sampleapikey" https://sslmate.com/api/v3/monitoring/monitored_domains

curl -u 123_sampleapikey: https://sslmate.com/api/v3/monitoring/monitored_domains