Oh ... wtf

API Documentation


Status Codes
enum StatusCodes {
   Success = 0,
   NotFound = 1,
   Existing = 2,
   NoPermissions = 3,
   InvalidUrl = 4,
   NoFile = 5
}


Url Shortener

Create or get existing ShortUrl /api/shortlink
HTTP Method POST
Request
{
    "longUrl": "https://your-url.here"
}
Response
{
    "statusCode": 0,
    "statusMessage": "Success",
    "data": {
        "deletionToken": "BaCElazAK0u7YYM5GPJQwHa6ZY5dqnyR",
        "createdOn": "2018-06-26T18:01:59.5767786Z",
        "alias": "vZ7dV",
        "longUrl": "https://your-url.here",
        "viewCount": 7
    }
}
Possible Status Codes
[
    Success,
    Existing, // No deletionToken in response
    InvalidUrl
]


Get ShortUrl Information /api/shortlink/{alias}
HTTP Method GET
Response
{
    "statusCode": 0,
    "statusMessage": "Success",
    "data": {
        "createdOn": "2018-06-26T18:01:59.5767786Z",
        "alias": "vZ7dV",
        "longUrl": "https://your-url.here",
        "viewCount": 7
    }
}
Possible Status Codes
[
    Success,
    NotFound
]


Delete ShortUrl /api/shortlink/{alias}?token={token}
HTTP Method DELETE
Query
?token=BaCElazAK0u7YYM5GPJQwHa6ZY5dqnyR
Response
{
    "statusCode": 0,
    "statusMessage": "Success",
    "data": null
}
Possible Status Codes
[
    Success,
    NotFound,
    NoPermissions
]