DNS API

From CMU ITSC Network
Revision as of 09:26, 6 May 2018 by Supawit (talk | contribs)

Authentication

Authenticate with CMU Oauth to get authorization key then use as "bearer token" in "Authorization" Header on every request.

End Point

List domain

List domain that authenticated user has permission.
Request

GET /domains HTTP/1.1
Host: dns-api.cmu.ac.th
Authorization: Bearer hKm1BTuXj4U7rGChx1eWKSb8bc6Wx1uz

Response

[
    {
        "domain": "cnoc.cmu.ac.th"
    },
    {
        "domain": "eng.cmu.ac.th"
    },
    {
        "domain": "reg.cmu.ac.th"
    }
]