Преглед на файлове

docs: add swagger api link

Pouria Ezzati преди 6 години
родител
ревизия
e1a5cd76fb
променени са 1 файла, в които са добавени 1 реда и са изтрити 62 реда
  1. 1 62
      README.md

+ 1 - 62
README.md

@@ -77,68 +77,7 @@ Download Kutt's extension for web browsers via below links. You can also find th
 
 ## API
 
-In addition to the website, you can use these APIs to create, delete and get URLs.
-
-### Types
-
-```
-URL {
-  createdAt {string} ISO timestamp of when the URL was created
-  id {string} Unique ID of the URL
-  target {string} Where the URL will redirect to
-  password {boolean} Whether or not a password is required
-  count {number} The amount of visits to this URL
-  shortUrl {string} The shortened link (Usually https://kutt.it/id)
-}
-```
-
-In order to use these APIs you need to generate an API key from settings. Never put this key in the client side of your app or anywhere that is exposed to others.
-
-All API requests and responses are in JSON format.
-
-Include the API key as `X-API-Key` in the header of all below requests. Available API endpoints with body parameters:
-
-**Get shortened URLs list:**
-
-```
-GET /api/url/geturls
-```
-
-Returns:
-
-```
-{
-  list {Array<URL>} List of URL objects
-  countAll {number} Amount of items in the list
-}
-```
-
-**Submit a link to be shortened**:
-
-```
-POST /api/url/submit
-```
-
-Body:
-
-- `target`: Original long URL to be shortened.
-- `customurl` (optional): Set a custom URL.
-- `password` (optional): Set a password.
-- `reuse` (optional): If a URL with the specified target exists returns it, otherwise will send a new shortened URL.
-
-Returns: URL object
-
-**Delete a shortened URL** and **Get stats for a shortened URL:**
-
-```
-POST /api/url/deleteurl
-GET /api/url/stats
-```
-
-Body (or query for GET request)
-
-- `id`: ID of the shortened URL.
-- `domain` (optional): Required if a custom domain is used for short URL.
+[Visit API v2 documentation on Swagger](https://app.swaggerhub.com/apis/poeti8/Kutt/2.0.0)
 
 ## Integrations