2016-10-22 16:44:14 -05:00
{
"get" : {
2018-09-20 13:52:27 -05:00
"operationId" : "getShortUrlVisits" ,
2016-10-22 17:07:31 -05:00
"tags" : [
"Visits"
] ,
"summary" : "List visits for short URL" ,
2019-12-31 09:05:02 -06:00
"description" : "Get the list of visits on the short URL behind provided short code." ,
2016-10-22 16:44:14 -05:00
"parameters" : [
2019-11-29 12:09:03 -06:00
{
"$ref" : "../parameters/version.json"
} ,
2016-10-22 16:44:14 -05:00
{
"name" : "shortCode" ,
"in" : "path" ,
2018-09-20 13:53:57 -05:00
"description" : "The short code for the short URL from which we want to get the visits." ,
2018-02-03 02:53:40 -06:00
"required" : true ,
"schema" : {
"type" : "string"
}
2018-07-30 13:28:41 -05:00
} ,
2020-02-02 02:15:43 -06:00
{
"$ref" : "../parameters/domain.json"
} ,
2018-07-30 13:28:41 -05:00
{
"name" : "startDate" ,
"in" : "query" ,
"description" : "The date (in ISO-8601 format) from which we want to get visits." ,
"required" : false ,
"schema" : {
"type" : "string"
}
} ,
{
"name" : "endDate" ,
"in" : "query" ,
"description" : "The date (in ISO-8601 format) until which we want to get visits." ,
"required" : false ,
"schema" : {
"type" : "string"
}
2018-11-28 13:46:52 -06:00
} ,
{
"name" : "page" ,
"in" : "query" ,
"description" : "The page to display. Defaults to 1" ,
"required" : false ,
"schema" : {
"type" : "number"
}
} ,
{
"name" : "itemsPerPage" ,
"in" : "query" ,
"description" : "The amount of items to return on every page. Defaults to all the items" ,
"required" : false ,
"schema" : {
"type" : "number"
}
2021-05-22 14:14:15 -05:00
} ,
{
"name" : "excludeBots" ,
"in" : "query" ,
"description" : "Tells if visits from potential bots should be excluded from the result set" ,
"required" : false ,
"schema" : {
"type" : "string" ,
"enum" : [ "true" ]
}
2018-02-03 02:53:40 -06:00
}
] ,
"security" : [
2018-09-20 14:15:17 -05:00
{
"ApiKey" : [ ]
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"
}
2018-11-28 13:46:52 -06:00
} ,
"pagination" : {
"$ref" : "../definitions/Pagination.json"
2018-02-03 02:53:40 -06:00
}
2016-10-22 16:44:14 -05:00
}
}
}
2021-12-09 08:27:18 -06:00
} ,
"example" : {
"visits" : {
"data" : [
{
"referer" : "https://twitter.com" ,
"date" : "2015-08-20T05:05:03+04:00" ,
"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" ,
"visitLocation" : null ,
"potentialBot" : false
2021-05-22 08:09:14 -05:00
} ,
2021-12-09 08:27:18 -06:00
{
"referer" : "https://t.co" ,
"date" : "2015-08-20T05:05:03+04:00" ,
"userAgent" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" ,
"visitLocation" : {
"cityName" : "Cupertino" ,
"countryCode" : "US" ,
"countryName" : "United States" ,
"latitude" : 37.3042 ,
"longitude" : -122.0946 ,
"regionName" : "California" ,
"timezone" : "America/Los_Angeles"
} ,
"potentialBot" : false
} ,
{
"referer" : null ,
"date" : "2015-08-20T05:05:03+04:00" ,
"userAgent" : "some_web_crawler/1.4" ,
"visitLocation" : null ,
"potentialBot" : true
}
] ,
"pagination" : {
"currentPage" : 5 ,
"pagesCount" : 12 ,
"itemsPerPage" : 10 ,
"itemsInCurrentPage" : 10 ,
"totalItems" : 115
2017-04-16 03:45:52 -05:00
}
2018-11-28 13:46:52 -06:00
}
2017-04-16 03:45:52 -05:00
}
}
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" : {
2019-11-28 12:37:22 -06:00
"application/problem+json" : {
2018-02-03 02:53:40 -06:00
"schema" : {
"$ref" : "../definitions/Error.json"
2021-12-09 11:28:47 -06:00
} ,
"examples" : {
"Short URL not found" : {
"$ref" : "../examples/short-url-not-found.json"
}
2018-02-03 02:53:40 -06:00
}
}
2016-10-22 16:44:14 -05:00
}
} ,
2021-12-09 11:28:47 -06:00
"default" : {
2016-10-22 16:44:14 -05:00
"description" : "Unexpected error." ,
2018-02-03 02:53:40 -06:00
"content" : {
2019-11-28 12:37:22 -06:00
"application/problem+json" : {
2018-02-03 02:53:40 -06:00
"schema" : {
"$ref" : "../definitions/Error.json"
}
}
2016-10-22 16:44:14 -05:00
}
}
}
}
}