2016-10-22 16:44:14 -05:00
{
"get" : {
2016-10-22 17:07:31 -05:00
"tags" : [
"ShortCodes" ,
"Visits"
] ,
"summary" : "List visits for short URL" ,
2016-10-22 16:44:14 -05:00
"description" : "Get the list of visits on provided short code." ,
"parameters" : [
{
"name" : "shortCode" ,
"in" : "path" ,
"description" : "The shortCode from which we want to get the visits." ,
2018-02-03 02:53:40 -06:00
"required" : true ,
"schema" : {
"type" : "string"
}
}
] ,
"security" : [
2016-10-22 16:44:14 -05:00
{
2018-02-03 02:53:40 -06:00
"Bearer" : [ ]
2016-10-22 16:44:14 -05:00
}
] ,
"responses" : {
"200" : {
"description" : "List of visits." ,
2018-02-03 02:53:40 -06:00
"content" : {
"application/json" : {
"schema" : {
2016-10-22 16:44:14 -05:00
"type" : "object" ,
"properties" : {
2018-02-03 02:53:40 -06:00
"visits" : {
"type" : "object" ,
"properties" : {
"data" : {
"type" : "array" ,
"items" : {
"$ref" : "../definitions/Visit.json"
}
}
2016-10-22 16:44:14 -05:00
}
}
}
}
}
2017-04-16 03:45:52 -05:00
} ,
"examples" : {
"application/json" : {
"visits" : {
"data" : [
{
"referer" : "https://twitter.com" ,
"date" : "2015-08-20T05:05:03+04:00" ,
"remoteAddr" : "10.20.30.40" ,
"userAgent" : "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0"
} ,
{
"referer" : "https://t.co" ,
"date" : "2015-08-20T05:05:03+04:00" ,
"remoteAddr" : "11.22.33.44" ,
"userAgent" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
} ,
{
"referer" : null ,
"date" : "2015-08-20T05:05:03+04:00" ,
"remoteAddr" : "110.220.5.6" ,
"userAgent" : "some_web_crawler/1.4"
}
]
}
}
2016-10-22 16:44:14 -05:00
}
} ,
"404" : {
"description" : "The short code does not belong to any short URL." ,
2018-02-03 02:53:40 -06:00
"content" : {
"application/json" : {
"schema" : {
"$ref" : "../definitions/Error.json"
}
}
2016-10-22 16:44:14 -05:00
}
} ,
"500" : {
"description" : "Unexpected error." ,
2018-02-03 02:53:40 -06:00
"content" : {
"application/json" : {
"schema" : {
"$ref" : "../definitions/Error.json"
}
}
2016-10-22 16:44:14 -05:00
}
}
}
}
}