It's easy to integrate your applications with the Dragon Metrics API, and this page will provide everything you need to get started making your first request.

In addition to the documention available here on the Help Center, we highly recommend checking out the Dragon Metrics API Documentation and Testing Sandbox, where you'll find a detailed description of each API endpoint, and be able to make test calls right from the page without any programming required.

Get Access to the API

Your first step to start using the Dragon Metrics API is to write support@dragonmetrics.com to obtain credentials.

Once we receive your request, you'll receive a username and password for the Dragon Metrics API. Please note that this username and password will be different than the username and password you use to log into the Dragon Metrics interface.

Authenticate Your Requests

Now that you have your API credentials, you'll need to authenticate your first call. The Dragon Metrics API uses HTTP Basic Authentication to authenticate each request. As the name implies, this protocol is quite simple.

All requests must include the following HTTP request header:

Authorization: Basic {CREDENTIALS}

Where {CREDENTIALS} is a Base64 encoding of the string {username}:{password}.

For example:

Username: johdoe
Password: Lh78B30#grCgo%
Before Base64: johndoe:Lh78B30#grCgo%
After Base64: am9obmRvZTpMaDc4QjMwI2dyQ2dvJQ==
Full HTTP Request Header: Authorization: Basic am9obmRvZTpMaDc4QjMwI2dyQ2dvJQ==

Now you can make calls to the API, including this header in every request. If there is an issue with your authorization you'll receive a 401 (Unauthorized) error message.

IMPORTANT REMINDER: Although your username and password are encoded using Basic Authentication, they are not encrypted. Therefore, it's important to always send requests over HTTPS. All requests made over HTTP will be sending your username and password in plain text, and will result in a 403 (Forbidden) error response.

Make Your First Call

With our authentication all ready to go, let's make our first call.

The base URL of the Dragon Metrics API is http://api.dragonmetrics.com/v1.0/. All endpoints begin with this base.

The "Campaigns" endpoint is perhaps one of the simplest calls, so let's begin here. It's located at https://api.dragonmetrics.com/v1.0/campaigns and requires no parameters. So simply make a call to this URL with the authorization header, and you'll receive a list of all campaigns in your account.

Curl example:

curl -X GET --header "Accept: application/json" --header "Authorization: Basic {CREDENTIALS}" "https://api.dragonmetrics.com/v1.0/campaigns"

Sample Response:

{
    "results": [
        {
            "id": 84684,
            "name": "Example Campaign",
            "site": "www.example.com",
            "status": "active",
            "keyword_credit_usage": 848,
            "keyword_limit": 1000,
            "crawl_limit": 10000,
            "alternate_seed_url": "www.example.com/alternate",
            "domain_authority": 75
        }
    ],
    "paging": {
        "total": 1,
        "limit": 50,
        "start": 0,
        "prev": null,
        "self": "https://api.dragonmetrics.com/v1.0/campaigns?start=0&limit=50",
        "next": null
    }
}


Next Steps

You've successfully made your first call! From here, let's start learning about all endpoints available, and common elements found in all API calls.

Did this answer your question?