Useful Traffic Steering Links Rules
Answers Policies
Getting Started Guide

REST Methods

VERB RESOURCE PARAMETERS (TYPE) DESCRIPTION
GET dynamic_steering/policies None Retrieve all policy objects for your account.
GET dynamic_steering/policies{policy_slug}
  • policy_slug (path)
Retrieve details about a specific policy.
PUT dynamic_steering/policies/{policy_slug}
  • policy_slug (path)
  • policy (body)
Create or update a policy.
DELETE dynamic_steering/policies/{policy_slug}
  • policy_slug (path)
Delete a policy.

 


GET dynamic_steering/policies

Retrieve all policy objects for your account.

SAMPLE URI: GET https://dns.dynapis.com/dynamic_steering/policies/

Parameters

    None

Example Request/Response (JSON)

    "_self": "https://dns.dynapis.com/dynamic_steering/policies/",
    "_items": [
        {
            "_self": "https://dns.dynapis.com/dynamic_steering/policies/example-policy-1”,
            "name": "example-policy-1“,
            "is_enabled": true,
            "ttl": 25
        },
        {
            "_self": "https://dns.dynapis.com/dynamic_steering/policies/example-policy-2”,
            "name": "example-policy-2",
            "is_enabled": true,
            "ttl": 10
        },
        {
            "_self": "https://dns.dynapis.com/dynamic_steering/policies/example-policy-3”,
            "name": "example-policy-3”,
            "is_enabled": true,
            "ttl": 30
        }
    ]
}

GET dynamic_steering/policies/{policy_slug}

Retrieve details about a specific policy.

SAMPLE URI: GET https://dns.dynapis.com/dynamic_steering/policies/{policy_slug}

Parameters

  • policy_slug – (path) The unique name of the policy requested.

Example Request/Response (JSON)

{
    "_self": "https://dns.dynapis.com/dynamic_steering/policies/example-policy-1",
    "name": "FooTest",
    "is_enabled": true,
    "ttl": 30,
    "answers": {
        "_items": []
    },
    "rules": {
        "_items": [
            {
                "type": "common_filter",
                "common_filter": "available"
            },
            {
                "type": "common_filter",
                "config": {
                    "count": 1
                },
                "common_filter": "lowest_latency",
                "description": "sufficiently fast"
            },
            {
                "type": "common_filter",
                "config": {
                    "count": 1
                },
                "common_filter": "max_count",
                "description": "max count"
            }
        ]
    },
    "attachments": {
        "_self": "https://dns.dynapis.com/attachments/policies/example-policy-1"
    }
}

PUT /dynamic_steering/policies/{policy_slug}

Create or update a policy. Adding a new policy name to the URI will create a new policy. Using an existing policy name will update that policy with the new input.

SAMPLE URI: PUT https://dns.dynapis.com/dynamic_steering/policies/{policy_slug}

Parameters

  • policy_slug – (path) The unique name of the policy requested.
  • policy – (body) Policy details.

Policy Properties

    • name – name of policy
    • is_enabled – Identifies if the the policy is in use. true = policy is in use. false = policy is not in use.
    • ttl – Time to live for the policy.
    • answers – Answers to be included in a DNS query.
    • answer – Data to be included in the response to a DNS query.
      • nameRequired. A customer-provided name, unique within this policy.
      • rtypeRequired. Type of record.
      • rdataRequired. Resource data within the record.
      • asset – A network asset that is strongly associated with the answer data (e.g., a server identified by it).
      • transport asset – A network asset that is associated with routes connecting to the answer data (e.g., a containing cloud data center). In the future, this will be implied from asset.
    • rules – Define the filters that Answers must meet to be included in a DNS query response.
      • preference – Serves Answers based on the order of importance you designate. Associate predetermined preference numbers with answers. Answers with lower values are preferred over those with higher values.
      • available – Determines answers based on whether an answer can be reached. Availability rules can only eliminate Answers associated with monitored assets.
      • lowest_latency – Match this count of the fastest assets.
        • count – Match this count of the fastest assets.
        • absolute_window – Match all assets having latency within this integer number of milliseconds of the fastest.
        • relative_window – Match all assets having latency within this integer percentage of the fastest.
      • max_count – Determines the maximum number of answers to return.
      • cases – Rules may have cases instead of a single configuration. When they do, the first case with a matching condition (or with no condition defined) applies, and all subsequent cases are ignored. If no case matches, then the rule has no effect.
        • case – A rule configuration, optionally with a condition. If no condition is defined, then the case always matches.
        • condition – Determines when to apply a rule configuration based on if a query’s origin matches a defined IP prefix, ASN, or geographic region.
    • attachments – a listing of attachments for this policy.
      • policy – Name of policy.
      • zone – Name of zone.
      • domain – URL of domain.
      • rtypes – Record types allowed.

Example Request/Response (JSON)

{
    "_self": "https://dns.dynapis.com/dynamic_steering/policies/example-policy-1",
    "name": "example-policy-1",
    "is_enabled": true,
    "ttl": 35,
    "answers": {
        "_items": []
    },
    "rules": {
        "_items": [
            {
                "type": "common_filter",
                "common_filter": "available"
            },
            {
                "type": "common_filter",
                "config": {
                    "count": 1
                },
                "description": "sufficiently fast",
                "common_filter": "lowest_latency"
            },
            {
                "type": "common_filter",
                "config": {
                    "count": 1
                },
                "description": "max count",
                "common_filter": "max_count"
            }
        ]
    },
    "attachments": {
        "_self": "https://dns.dynapis.com/attachments/policies/example-policy-1"
    }
}

DELETE /dynamic_steering/policies/{policy_slug}

Delete the identified policy.

SAMPLE URI: DELETE https://dns.dynapis.com/dynamic_steering/policies/{policy_slug}

Parameters

  • policy_slug – (path) The unique name of the policy requested.