The OpenDNS Network Devices API Developer Hub

Welcome to the OpenDNS Network Devices API developer hub. You'll find comprehensive guides and documentation to help you start working with OpenDNS Network Devices API as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Get a list of policies for an organization

GET /v1/organizations/{organizationId}/policies

The Policy Management endpoints retrieve a list of DNS policies for an organization, assign a policy to a particular identity (like a Network Device), or delete a policy. The first step is to list the available policies for your organization.

Every organization has at least one DNS policy, the baseline “default” policy. The default DNS policy can be changed but cannot be deleted. Any identity in the dashboard will always have the default policy applied to it, and additional DNS policies can also be applied. The priority order shown in the response for this query indicates which policy takes priority if two or more are applied.

Unless specific filters are applied, all DNS policies are returned.

Try it.

Request Parameters

The organization's "organizationID" must be specified in the url. You can optionally specify the page start and limit of results to return.

Sample query

In this example, 100 policies (limit=100) are returned starting with the first policy (page=1)

curl -i -X GET --url "{organizationId}/policies?page=1&limit=100" --header 'Authorization: Basic %base64string%'



Example return for policy list success – HTTP 200

curl --include \
     --header "Authorization: Basic %base64string%" \{organizationId}/policies/
RESPONSE (HTTP 200, Content-Type: application/json)
    "policyId": 0,
    "organizationId": 1234,
    "name": "Default Policy",
    "priority": 0,
    "createdAt": "2017-09-22T04:18:51.000Z",
    "isDefault": true
    "policyId": 1,
    "organizationId": 1234,
    "name": "Your Second Policy",
    "priority": 1,
    "createdAt": "2017-09-23T04:18:51.000Z",
    "isDefault": false

The results returned from each policy 'bundle" has the following fields:




policyId of policy to be acted on. Required for later queries to add or remove a policy from an identity.



The organizationId associated with these policies.



The name of the policy as it appears in the dashboard to the administrator.



The priority order of this policy in the list of policies. If an identity has been applied to multiple policies, the one with the highest priority order takes precedence.



ISO8601 formatted timestamp for when policy was created.



True if this is the default policy, otherwise always false.

Updated 6 months ago

Get a list of policies for an organization

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.