User API

The User API can be used to read and update user accounts.

End-users wishing to create an account can do so via the front page here. Reading and updating of accounts can be performed by all MetaCDN users after account creation.

Get user

HTTP Operation: GET
URL: GET https://secure.metacdn.com/api/users/{username}
Auth: HTTP digest authentication (User)
"Accept" header: application/json
Expected HTTP response: HTTP/1.1 200 OK
Expected Format (mandatory, optional):
GET /api/users/{username} HTTP/1.1
Content-Type: application/json
Example Call #1:
GET /api/users/mcdnuser HTTP/1.1
Content-Type: application/json
Expected Response #1:
HTTP/1.1 200 Ok
Content-Type: application/json {
    "username": "mcdnuser",
    "planType": "PAYG",
    "qosPreset": "NONE",
    "mediaCount": 0,
    "secretKey": "128c5fb9-77e7-4594-b2fd-453fb512f343",
    "email": "mcdnuser@metacdn.com",
    "contentCount": 0,
    "lastname": "User",
    "firstname": "Test"
}

Update user

HTTP Operation: PUT
URL: PUT https://secure.metacdn.com/api/users/{username}
Auth: HTTP digest authentication (User)
"Content-Type" header: application/json
Expected HTTP response: HTTP/1.1 202 Accepted
Expected Format (mandatory, optional):
PUT /api/users/{username} HTTP/1.1
Content-Type: application/json {
    "firstname": "",
    "lastname": ""
}
Example Call #1:
PUT /api/users/mcdnuser HTTP/1.1
Content-Type: application/json {
    "firstname": "Joe",
    "lastname": "Bloggs"
}
Expected Response #1:
HTTP/1.1 202 Accepted
Content-Type: text/plain; charset=UTF-8
Content-Location: https://secure.metacdn.com/api/users/mcdnuser
Date: Tue, 05 Jan 2010 02:33:46 GMT
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Accept-Ranges: bytes
Server: Restlet-Framework/2.0m5
Content-Length: 12
Connection: close
User updated