API Documentation

/generate/:number

Generate allows you view a generated segment based on the number you enter. Segments are the endings of the shortened url (IE: okij.in/a). Each segment is *always* the same, unless the number causes an overflow. If an overflow occurs it will randomly select a character from the dictionary.

{"segment":"z"}

/latest

Shows the latest (25) links shortened via okij.in.

[
    { "segment":"e","url":"http://forums.bukkit.org" },
    { "segment":"d","url":"http://ultimateminecraft.net/apply" },
    { "segment":"c","url":"http://ultimateminecraft.net/" },
    { "segment":"a","url":"http://ci.bukkit.org/" }
]

/current

Shows the current segment and id generated by okij.in.

{
    "latest_id":"907",
    "segment":"oN"
}

/info/:segment

Shows segment details including id, title, segment, url, and hits.

{
    "id":"879",
    "segment":"ol",
    "url":"http://yaml-online-parser.appspot.com/","title":"Online YAML Parser",
    "hits":"6"
}

/exists/:url

Returns whether url exists in database already. If so, returns same details as information.

{
    "id":"904",
    "segment":"oK",
    "url":"http://reddit.com",
    "title":"http://reddit.com",
    "hits":"0",
    "exists":true
}