{"info":{"_postman_id":"4e407be6-658f-49c8-baf9-7e97ac72a353","name":"linksnap","description":"<html><head></head><body><p>Linksnap is a URL shortener that allows you to create short links, view details of existing short URLs, delete URLs, and retrieve statistics and QR codes for each URL. This collection includes the necessary API endpoints for managing URLs and accessing associated data.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"26709386","collectionId":"4e407be6-658f-49c8-baf9-7e97ac72a353","publishedId":"2sAYBd6T15","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-12-08T14:52:51.000Z"},"item":[{"name":"short_link","id":"8b99eeda-8334-49a1-a80a-7b1b979854a6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/urls","description":"<p>This endpoint allows you to create a short URL by providing a long URL. Optionally, you can provide a custom alias for the short URL.</p>\n<ul>\n<li><p><strong>Request</strong>:</p>\n<ul>\n<li><p>Method: <code>POST</code></p>\n</li>\n<li><p>URL: <code>http://localhost:8080/api/urls</code></p>\n</li>\n</ul>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"longUrl\": \"https://www.youtube.com/watch?v=KigR4MQUxE8\",\n    \"customAlias\": \"song\"\n}\n\n</code></pre>\n<ul>\n<li><p><strong>Response</strong>:</p>\n<ul>\n<li>Status: 201 Created</li>\n</ul>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"created\": \"2024-12-08T18:22:31.343382+05:30\",\n    \"qrCode\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAABlBMVEX///8AAABVwtN+AAABWUlEQVR42uyYsW3FMAxEabhQqRE0ilf7o2kUjaCShaELSNo/+omTAUhdYcD2qwTxeCQtLS0t/SeoTnvJnajYl5cvYMhjP3eW/+i5lSZfjnDABpz7uQNgIai0AtSwACf5D7TYACXWusleAasLeSZA/OG5cLwDl0/KfUg9iz88G6l34NIOCAC0P7qjd+DuF2Aym0SjA6jOgA0Yeg6sDoFm+SAcMAS5YlLuuZdW2lGPOSaFALax4e2SEhclMNbJJ4MAwmhIgnSLbJVD7oCxYexXPshd66IRHVNdBAL0RiQ9LD2lj8IJA0g6gPmkGGVpQoQDLByciRNnqx/U6b44Ae4UxHIhZDogKhGB95IkQe+DTkn193TgHZinpK4xiUr98MkgwPfUnDDp5RSAbQd0OvjZDiIBLOfUn/tFBOCqi8SWk3RV9LRFcQ7cSxKwzQcWk9wBS0tLEfUVAAD//0D9D0dZJAdvAAAAAElFTkSuQmCC\",\n    \"shortUrl\": \"http://linksnap.io/song\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"8080","path":["api","urls"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8b99eeda-8334-49a1-a80a-7b1b979854a6"},{"name":"url_details","id":"2432cf23-4cdd-4324-bf50-d36af304d84c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/urls/bf257b","description":"<p>This endpoint retrieves the details of a short URL, including the original long URL, creation date, and any custom alias used.</p>\n<ul>\n<li><p><strong>Request:</strong></p>\n<ul>\n<li><p>Method: <code>GET</code></p>\n</li>\n<li><p>Url: <code>http://localhost:8080/api/urls/:code</code></p>\n</li>\n</ul>\n</li>\n<li><p><strong>Response:</strong></p>\n<ul>\n<li>Status: 200 OK</li>\n</ul>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"clicks\": 8,\n    \"createdAt\": \"2024-12-07T20:53:03.07Z\",\n    \"customAlias\": \"rap\",\n    \"longUrl\": \"https://www.youtube.com/results?search_query=seedhe+maut+akatsuki\",\n    \"shortCode\": \"rap\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"8080","path":["api","urls","bf257b"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2432cf23-4cdd-4324-bf50-d36af304d84c"},{"name":"delete _URL","id":"6a7842b4-33de-49d5-91d4-e3ba379d1ff0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/api/urls/5eef5a","description":"<p>This endpoint deletes a short URL by its short code.</p>\n<ul>\n<li><p><strong>Request:</strong></p>\n<ul>\n<li><p>Method: <code>DELETE</code></p>\n</li>\n<li><p>URL: <code>http://localhost:8080/api/urls/:code</code></p>\n</li>\n</ul>\n</li>\n<li><p><strong>Response:</strong></p>\n<ul>\n<li>Status: 200 OK</li>\n</ul>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Short URL deleted successfully\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"8080","path":["api","urls","5eef5a"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6a7842b4-33de-49d5-91d4-e3ba379d1ff0"},{"name":"get_stat","id":"d540285e-9f21-4824-a454-bad12b53d57b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/urls/song/stats","description":"<p>This endpoint retrieves statistics for a short URL, including the number of clicks it has received.</p>\n<ul>\n<li><p><strong>Request:</strong></p>\n<ul>\n<li><p>Method: <code>GET</code></p>\n</li>\n<li><p>URL: <code>http://localhost:8080/api/urls/:code/stats</code></p>\n</li>\n</ul>\n</li>\n<li><p><strong>Response:</strong></p>\n<ul>\n<li>Status: 200 OK</li>\n</ul>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"clicks\": 1,\n    \"shortCode\": \"song\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"8080","path":["api","urls","song","stats"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d540285e-9f21-4824-a454-bad12b53d57b"},{"name":"qr_code","id":"489f42d5-a2f8-406c-b0fb-8b5a28f0a5a3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/urls/bf257b/qr","description":"<p>This endpoint generates a QR code for the short URL, which can be scanned to open the link.</p>\n<ul>\n<li><p><strong>Request:</strong></p>\n<ul>\n<li><p>Method: <code>GET</code></p>\n</li>\n<li><p>URL: <code>http://localhost:8080/api/urls/:code/qr</code></p>\n</li>\n</ul>\n</li>\n<li><p><strong>Response:</strong></p>\n<ul>\n<li><p>Status: 200 OK</p>\n</li>\n<li><p>Body: QR code</p>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["api","urls","bf257b","qr"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"489f42d5-a2f8-406c-b0fb-8b5a28f0a5a3"},{"name":"list_all_urls","id":"2853b4f6-3641-4b5b-b22a-78b54769e46a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>This endpoint lists all the urls that have been stored in the database.</p>\n<ul>\n<li><p><strong>Request:</strong></p>\n<ul>\n<li><p>Method: <code>GET</code></p>\n</li>\n<li><p>URL: <code>http://localhost:8080/api/urls</code></p>\n</li>\n</ul>\n</li>\n<li><p><strong>Response:</strong></p>\n<ul>\n<li>Status: 200 OK</li>\n</ul>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"urls\": [\n        {\n            \"ID\": \"6754b5afb70c91250f9fb2ea\",\n            \"ShortCode\": \"rap\",\n            \"LongURL\": \"https://www.youtube.com/results?search_query=seedhe+maut+akatsuki\",\n            \"CustomAlias\": \"rap\",\n            \"CreatedAt\": \"2024-12-07T20:53:03.07Z\",\n            \"Clicks\": 8\n        },\n        {\n            \"ID\": \"6754b777b40d62e89794d2fa\",\n            \"ShortCode\": \"f30bab\",\n            \"LongURL\": \"https://www.youtube.com/results?search_query=seedhe+maut+luka+chuppi\",\n            \"CustomAlias\": \"\",\n            \"CreatedAt\": \"2024-12-07T21:00:39.26Z\",\n            \"Clicks\": 0\n        },\n        {\n            \"ID\": \"675572d00ca9c7cf5ea7678e\",\n            \"ShortCode\": \"6fc257\",\n            \"LongURL\": \"https://www.youtube.com/watch?v=R6_D7uGMx4U&amp;t=42s\",\n            \"CustomAlias\": \"\",\n            \"CreatedAt\": \"2024-12-08T10:20:00.103Z\",\n            \"Clicks\": 0\n        },\n        {\n            \"ID\": \"675572e40ca9c7cf5ea7678f\",\n            \"ShortCode\": \"bf257b\",\n            \"LongURL\": \"https://www.youtube.com/watch?v=pGCOCWHtGu8\",\n            \"CustomAlias\": \"\",\n            \"CreatedAt\": \"2024-12-08T10:20:20.111Z\",\n            \"Clicks\": 1\n        },\n        {\n            \"ID\": \"675572f10ca9c7cf5ea76790\",\n            \"ShortCode\": \"a2a061\",\n            \"LongURL\": \"https://www.youtube.com/watch?v=L8eat5WVIYA&amp;t=1257s\",\n            \"CustomAlias\": \"\",\n            \"CreatedAt\": \"2024-12-08T10:20:33.35Z\",\n            \"Clicks\": 0\n        },\n        {\n            \"ID\": \"67557657b239cec2a2c54cfd\",\n            \"ShortCode\": \"example\",\n            \"LongURL\": \"https://example.com\",\n            \"CustomAlias\": \"example\",\n            \"CreatedAt\": \"2024-12-08T10:35:03.276Z\",\n            \"Clicks\": 0\n        },\n        {\n            \"ID\": \"6755968f59bd5f972f280cf3\",\n            \"ShortCode\": \"song\",\n            \"LongURL\": \"https://www.youtube.com/watch?v=KigR4MQUxE8\",\n            \"CustomAlias\": \"song\",\n            \"CreatedAt\": \"2024-12-08T12:52:31.343Z\",\n            \"Clicks\": 1\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"2853b4f6-3641-4b5b-b22a-78b54769e46a"}]}