What this deployment supports.
const url = 'https://api.opdns.io/v1/capabilities';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.opdns.io/v1/capabilitiesComputed from the server’s configuration, the same for every caller, so the
dashboard can hide or explain what this deployment cannot offer. settings
is keyed by the profile Settings field names: supported, an optional
reason (why the setting is unavailable) and, for enumerated settings,
values: every value with its own supported and reason (block_mode
block-page is supported only where the block page host runs;
node_queue_hours lists 0, 1, 12 and 24, keyed as strings;
log_region lists ca, supported, and eu, unsupported with the reason
that it is coming soon). A setting
missing from settings is not offered. features:
destinations_map when destinations rows carry countries (a GeoIP database
is configured), list_reports when list reports are accepted,
apple_profile_signature how the GET /v1/setup/apple profile is signed now
(unsigned, untrusted or verified). Anything that depends on a profile
(its node, its plan) is not here.
Responses
Section titled “Responses”Capabilities.
object
Keyed by the profile Settings field names, and by security.<field> for
the Security toggles. security.idn_homograph, security.typosquat and
security.dga are unsupported until the resolvers implement them: new profiles have them off and a stored true has no effect.
object
object
Why the setting is not available here.
Enumerated settings only, keyed by value.
object
object
Why the value is not available, or a caveat.
object
destinations rows carry country (a GeoIP database is configured).
POST /v1/profiles/{id}/list-reports is available.
How the configuration profile of GET /v1/setup/apple is signed now:
unsigned (no signing certificate: iOS and macOS label it “Unverified”),
untrusted (signed with a certificate that does not chain to a public root,
as in a local test deployment: still “Unverified”) or verified (signed
with a publicly trusted certificate: “Verified”).
Example
{ "features": { "apple_profile_signature": "unsigned" }}Rate limited (rate_limited). For an API token, the organisation’s plan rate is spent until RateLimit-Reset.
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
The plan limit a plan_limit problem hit.
object
The plan’s value of the limit.
Where to move to a larger plan.
The scope the API token lacked (insufficient_scope).
Example
{ "type": "https://opdns.io/problems/rate_limited", "title": "Too Many Requests", "status": 429, "code": "rate_limited", "detail": "Too many requests in a short time. Please wait a moment, then try again.", "request_id": "5f2c9a0e7b1d4c38", "retry_after": 6}Headers
Section titled “Headers”On every response to an API token: the organisation’s plan rate, requests per one-minute window (api_requests_per_minute).
On every response to an API token: the requests left to the organisation in the current window.
On every response to an API token: seconds until the current window ends and the count resets.
On every response to an API token: the quota policy, <limit>;w=60.