Deployment facts for clients.
const url = 'https://api.opdns.io/v1/meta';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/metaEnvironment, binary version, resolver name and dashboard origin. Cacheable for
five minutes (Cache-Control: public, max-age=300); changes only on deploy.
Responses
Section titled “Responses”Meta.
object
Resolver name; profiles are <id>.<dns_domain> and https://<dns_domain>/<id>.
Dashboard origin, empty when not configured.
info.version of the API document this server implements (also the X-Opdns-Api-Version header).
Notice the GeoIP database’s licence asks to show next to country data (destinations); empty when none.
Current terms of service version; the signup page sends it as accept_terms_version.
Where the terms of service are published.
Example
{ "env": "dev", "dns_domain": "dns.opdns.net"}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.