API : View Short URL Details
Check the Polls App.
End Point (Basic)
METHOD : GET
https://mocker.in/api/urls/SHORT_ID/EDIT_TOKEN
SHORT_ID
and EDIT_TOKEN
should be replaced with your actual data. No parameters are required.
Response
{
"status": "success",
"message": "Your URL/Clip data.",
"data": {
"slug": "test3",
"long_url": "http://google.com",
"metadata": "\n <title>Google</title>\n <meta name=\"description\" content=\"\" />\n ",
"clip": null,
"edit_token": "0u92sQPm66",
"password": null,
"active_from": null,
"active_till": null,
"is_onetime": false,
"created_at": "28-05-2020 12:53 PM",
"updated_at": "28-05-2020 12:53 PM"
},
"stats": {
"hits": 0,
"unique_hits": 0
}
}
The reponse will always return two parameters, status
and message
. If status is success
then the action is complete. and if it is error
then that means some problem has occured. The problem details can be found in the message
parameter. The data
parameter will have the url details. A seperate stats
field will provide you the total times the url was visited as well as total unique visitors.