AnswerX RKS API

AnswerX is an intelligent, recursive DNS platform and product designed to manage DNS traffic. AnswerX is subscriber-aware, which allows users to offer value-added service options such as parental controls and fast access to preferred websites while enhancing the user’s ability to deliver better, faster service to subscribers. AnswerX can process millions of DNS transactions per second and offers best-in-class total cost of ownership. There are three versions of AnswerX:

  • AnswerX Licensed runs in the carrier’s network and Akamai provides system support.

  • AnswerX Cloud is a cloud service managed and maintained using Akamai’s network. This has the advantage of requiring few resources from a customer. The configuration uses Akamai rack space, power, and other related equipment. The service will still be configured individually per customer, but it will run on shared capacity in locations where Akamai believes it is the most effective.

  • AnswerX Managed completely manages the servers in the carrier’s network and customers do not have access to the systems. This has the advantage of being dedicated capacity. Since it runs in the carrier network, it can be deployed close to the end clients to provide the best possible DNS resolution times.

The AnswerX RKS API lets you configure custom DNS behavior based on rules. These rules are stored in the Reputation Knowledge Server (RKS). RKS is a distributed database containing two types of tables, “static” and “real-time” (RTT). Certain API calls only work on one type of table or the other as indicated below.

You can call this API with two different URI schema types. The first type assumes that the caller knows their service instance ID. The second type requires only the product’s name (for example, managed or cloud) and the contract ID. Both formats have the same behavior and are documented here.

For API calls that have a key field, the key is always matched against the first column in the table (that is, the leftmost column is the key column). If the key column is of type STRING, then the key in the URI must be enclosed in URI-encoded double quotes (%22KEY%22).

Who Should Use This API

This API is for site administrators, project managers, and technical support providers who will implement AnswerX for your organization. It assumes that you have a working knowledge of AnswerX and how it uses RKS data. If you are not familiar with these topics, see the AnswerX product page.

Getting Started

The Recursive DNS DB API lets users of RKS view, modify, add, and delete data in their RKS tables. For more information about AnswerX and RKS, see here.

The RKS table system is a part of Akamai’s AnswerX Recursive Nameserver product. This API lets users make changes to their RKS tables, including viewing table contents, viewing individual rows, and, for dynamic tables, adding, modifying, and deleting rows.

The API supports XML and JSON data formats. JSON is the default. To update or add a new row in a table, your JSON or XML should contain a list of all non-key columns, with the type and new value of each column listed. You may also provide an optional Expiry field, which specifies a time-to-live for the row, in seconds. The allowed column types are INT, UINT64, STRING, or CIDR.

For all REST methods (GET, PUT/POST, and DELETE), there are two ways to access your data: instance ID or product type and contract ID. Assuming the table to be accessed is named TABLE, the URL format for these, respectively, is:

/recursive-dns-db/v1/service-instances/ID/tables/TABLE/...
/recursive-dns-db/v1/product-types/PROD/contracts/CID/recursive-db/tables/TABLE

The key column is given as part of the URL (for complete details on the JSON and XML formats, and the REST calls, see the Resources section.

For example, you have a dynamic table called IPToSubscriber. The key field for this table is an IP address in CIDR notation, and there are five other columns. To update a row for 1.2.3.4/32, for service instance ID 20 using JSON, you might submit the following:

PUT /recursive-dns-db/v1/service-instances/20/tables/IPToSubscriberTable?key=1%2E2%2E3%2E4%2F32 HTTP/1.1
Content-type: application/json
Content-length: 268

{
    "Columns": [
        {
            "Type": "STRING",
            "Value": "This is my first string"
        },
        {
            "Type": "INT",
            "Value": "100"
        },
        {
            "Type": "INT",
            "Value": "200"
        },
        {
            "Type": "INT",
            "Value": "300"
        },
        {
            "Type": "STRING",
            "Value": "AnotherStringHere"
        }
    ],
    "Expiry": 86400
}

The same row update in XML format will look like this:

PUT /recursive-dns-db/v1/service-instances/20/tables/IPToSubscriberTable?key=1%2E2%2E3%2E4%2F32 HTTP/1.1
Content-type: application/xml
Content-length: 350

<Row>
  <Columns>
    <Column>
       <Value>This is my first string</Value>
       <Type>STRING</Type>
    </Column>
    <Column>
       <Value>100</Value>
       <Type>INT</Type>
    </Column>
    <Column>
       <Value>200</Value>
       <Type>INT</Type>
    </Column>
    <Column>
       <Value>300</Value>
       <Type>INT</Type>
    </Column>
    <Column>
       <Value>AnotherStringHere</Value>
       <Type>STRING</Type>
    </Column>
  </Columns>
  <Expiry>86400</Expiry>
</Row>

You can also fetch data with a GET request or delete data with a DELETE request. For GET, indicate your preferred format (JSON or XML) in the Accept header. If you omit the header, the format defaults to JSON.