API Docs

List URLs GET

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"
            },
            ...
        ]
    }
}

											

With conditional tagId param. Tag ID param will be included in the response only if the URL has a tag.

{
    "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",
                "tagId": 110
            },
            ...
        ]
    }
}

											
{
    "status": 400,
    "message": "Bad request. <detailed-error-message-will-go-here>.",
    "data": null
}
											
{
    "status": 401,
    "message": "Api key and secret is not valid or missing."
}