API Endpoints
Base URL: https://url-shortener-with-csv-report.p.rapidapi.com/
POST /shortened
Generate shortened version of any URL link
JSON payload :
JSON payload example :
{
shortened_original_link : "https://www.detik.com"
}
Result :
{
"success": "Shortened link has been created successfully",
"data": {
"shortened_original_link": "https://www.apple.com",
"shortened_hash": "TYo",
"created_at": "2021-10-29T17:04:10.000+07:00",
"shortened_link": "dnut.xyz/TYo"
}
}
GET /shortened/{:shortened_hash}
Fetch the detail of the created link
Parameter :
Example :
GET /shortened/aSJJ
Result :
{
"success": "Shortened link has been fetched successfully",
"data": {
"shortened_original_link": "https://www.apple.com",
"shortened_hash": "TYo",
"created_at": "2021-10-29T17:04:10.000+07:00",
"shortened_link": "dnut.xyz/TYo"
}
}
GET /shortened/{:shortened_hash}/file
Download the CSV report file containing click date time, IP address, and client user-agent
Parameter :
Result :
2021-10-29 08:58:26|10.1.27.245|PostmanRuntime/7.28.4
2021-10-29 08:58:32|10.1.92.85|Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0
2021-10-29 12:33:54|10.1.92.85|Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0