API Docs
List URLs GET
This endpoint allows you to get a list of all the short URLs.
https://t2mio.com/api/v1/urls
Request
| Parameter | Type | Position | Constraint | Description |
|---|---|---|---|---|
| apikey | string |
Header |
Required |
Your 20-30 characters unique api key. |
| apisecret | string |
Header |
Required |
Your 12-20 characters unique api secret. |
| domain_id | integer |
Query |
Optional |
Filter results by given domain id |
| slashtag | string |
Query |
Optional |
Filter results by given slashtag |
| 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:
|
Sample GET requests
1. https://t2mio.com/api/v1/urls 2. https://t2mio.com/api/v1/urls?domain_id=101&slashtag=De5rgX&orderby=date 3. https://t2mio.com/api/v1/urls?page=1&pagesize=50&orderby=date 4. 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
},
...
]
}
}