API Docs

Get URLs

Get a complete list of your URLs using REST API endpoint: /api/v1/urls

Request

Parameter Type Position # Description
apikey string Header Required Enter your 20-characters unique api key.
apisecret string Header Required Enter your 12-characters unique api secret.
page integer Query Optional This param defines which page of the pagination to load.
Default: 1
pagesize integer Query Optional This param defines how many URLs to load on a single page.
Default: 50
Maximum value: 500
orderby string Query Optional This param defines the sorting order of the resulting URLs. Allowed values for this parameter are:
  • date => sort in ascending order by creation date (chronological order)
  • -date => sort in descending order by creation date (latest first)
Default: sort as latest first

Sample GET request


1. https://t2mio.com/api/v1/urls
2. https://t2mio.com/api/v1/urls?page=1&pagesize=50&orderby=date
3. https://t2mio.com/api/v1/urls?page=1&pagesize=50&orderby=-date

Response

{
    "status": 200,
    "message": "ok",
    "data": {
        "page": 1,
        "pageSize": 50,
        "items": [
            {
                "id": 101,
                "destination": "http://google.ca?q=your+lengthy+destination+url",
                "hits": 100,
                "redirectCode": "301",
                "shortUrl": "https://YourBrand.com/qwerty",
                "slashtag": "qwerty",
                "createdAt": "2018-05-12 23:23:15",
                "updatedAt": "2018-05-12 23:23:15"
            },
            ...
        ]
    }
}

											
{
    "status": 401,
    "message": "Api key and secret is not valid or missing."
}