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. Clients can
cache it for five minutes (Cache-Control: public, max-age=300). It changes only
on a 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 that this server implements (also the X-Opdns-Api-Version header).
The notice that the license of the GeoIP database asks to show next to country data (destinations). Empty when none.
The 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 organization used all of the rate of its plan until RateLimit-Reset.
object
Stable machine code.
object
Seconds, the same value as the Retry-After header (rate limits, offline nodes).
The plan limit that a plan_limit problem reached.
object
The value of the limit in the plan.
Where to change to a larger plan.
The scope that the API token did not have (insufficient_scope).
Example
{ "type": "https://opdns.io/problems/rate_limited", "title": "Too Many Requests", "status": 429, "code": "rate_limited", "detail": "You sent too many requests in a short time. Wait a moment, then try again.", "request_id": "5f2c9a0e7b1d4c38", "retry_after": 6}Headers
Section titled “Headers”On every response to an API token: the rate of the plan of the organization, in requests per one-minute window (api_requests_per_minute).
On every response to an API token: the requests left to the organization in the current window.
On every response to an API token: the seconds until the current window ends and the count resets.
On every response to an API token: the quota policy, <limit>;w=60.