{ "get": { "tags": [ "ShortCodes", "Visits" ], "summary": "List visits for short URL", "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.", "required": true, "schema": { "type": "string" } }, { "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" } } ], "security": [ { "Bearer": [] } ], "responses": { "200": { "description": "List of visits.", "content": { "application/json": { "schema": { "type": "object", "properties": { "visits": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "../definitions/Visit.json" } } } } } } } }, "examples": { "application/json": { "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 }, { "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" } }, { "referer": null, "date": "2015-08-20T05:05:03+04:00", "userAgent": "some_web_crawler/1.4", "visitLocation": null } ] } } } }, "404": { "description": "The short code does not belong to any short URL.", "content": { "application/json": { "schema": { "$ref": "../definitions/Error.json" } } } }, "500": { "description": "Unexpected error.", "content": { "application/json": { "schema": { "$ref": "../definitions/Error.json" } } } } } } }