2016-10-23 00:44:14 +03:00
|
|
|
{
|
2018-02-03 11:53:40 +03:00
|
|
|
"openapi": "3.0.0",
|
2016-10-23 00:44:14 +03:00
|
|
|
"info": {
|
|
|
|
"title": "Shlink",
|
|
|
|
"description": "Shlink, the self-hosted URL shortener",
|
2017-07-08 13:55:33 +03:00
|
|
|
"version": "1.0"
|
2016-10-23 00:44:14 +03:00
|
|
|
},
|
2018-02-03 11:53:40 +03:00
|
|
|
|
2018-12-09 17:18:10 +03:00
|
|
|
"externalDocs": {
|
|
|
|
"url": "https://shlink.io/api-docs",
|
|
|
|
"description": "Find more info on how to start using this API here"
|
|
|
|
},
|
|
|
|
|
2018-02-03 11:53:40 +03:00
|
|
|
"servers": [
|
|
|
|
{
|
2018-12-09 17:18:10 +03:00
|
|
|
"url": "{scheme}://{host}",
|
2018-02-03 11:53:40 +03:00
|
|
|
"variables": {
|
2018-12-09 17:18:10 +03:00
|
|
|
"scheme": {
|
2018-02-03 11:53:40 +03:00
|
|
|
"default": "https",
|
2018-02-03 12:06:04 +03:00
|
|
|
"enum": ["https", "http"]
|
2018-02-03 11:53:40 +03:00
|
|
|
},
|
2018-12-09 17:18:10 +03:00
|
|
|
"host": {
|
2018-02-03 12:09:42 +03:00
|
|
|
"default": ""
|
2018-02-03 11:53:40 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-10-23 01:02:13 +03:00
|
|
|
],
|
2016-10-23 00:44:14 +03:00
|
|
|
|
2018-02-03 11:53:40 +03:00
|
|
|
"components": {
|
|
|
|
"securitySchemes": {
|
2018-09-20 22:15:17 +03:00
|
|
|
"ApiKey": {
|
|
|
|
"description": "A valid shlink API key",
|
|
|
|
"type": "apiKey",
|
|
|
|
"in": "header",
|
2018-09-24 20:24:23 +03:00
|
|
|
"name": "X-Api-Key"
|
2018-09-20 22:15:17 +03:00
|
|
|
},
|
2018-02-03 11:53:40 +03:00
|
|
|
"Bearer": {
|
2019-05-05 10:21:57 +03:00
|
|
|
"description": "**[DEPRECATED]** The JWT identifying a previously authenticated API key",
|
2018-02-03 11:53:40 +03:00
|
|
|
"type": "http",
|
|
|
|
"scheme": "bearer",
|
|
|
|
"bearerFormat": "JWT"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-09-20 21:52:27 +03:00
|
|
|
"tags": [
|
|
|
|
{
|
|
|
|
"name": "Short URLs",
|
|
|
|
"description": "Operations that can be performed on short URLs"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Tags",
|
|
|
|
"description": "Let you handle the list of available tags"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Visits",
|
|
|
|
"description": "Operations to manage visits on short URLs"
|
2018-09-20 22:15:17 +03:00
|
|
|
},
|
2018-12-29 16:39:31 +03:00
|
|
|
{
|
|
|
|
"name": "Monitoring",
|
|
|
|
"description": "Public endpoints designed to monitor the service"
|
|
|
|
},
|
2018-12-09 17:18:10 +03:00
|
|
|
{
|
|
|
|
"name": "URL Shortener",
|
|
|
|
"description": "Non-rest endpoints, used to be publicly exposed"
|
|
|
|
},
|
2018-09-20 22:15:17 +03:00
|
|
|
{
|
|
|
|
"name": "Authentication",
|
2019-05-05 10:21:57 +03:00
|
|
|
"description": "**[DEPRECATED]** Authentication-related endpoints"
|
2018-09-20 21:52:27 +03:00
|
|
|
}
|
|
|
|
],
|
|
|
|
|
2016-10-23 00:44:14 +03:00
|
|
|
"paths": {
|
2018-12-09 17:18:10 +03:00
|
|
|
"/rest/v1/short-urls": {
|
2018-09-24 23:49:30 +03:00
|
|
|
"$ref": "paths/v1_short-urls.json"
|
2016-10-23 00:44:14 +03:00
|
|
|
},
|
2018-12-09 17:18:10 +03:00
|
|
|
"/rest/v1/short-urls/shorten": {
|
2018-09-24 23:49:30 +03:00
|
|
|
"$ref": "paths/v1_short-urls_shorten.json"
|
2018-05-06 13:19:08 +03:00
|
|
|
},
|
2018-12-09 17:18:10 +03:00
|
|
|
"/rest/v1/short-urls/{shortCode}": {
|
2018-09-24 23:49:30 +03:00
|
|
|
"$ref": "paths/v1_short-urls_{shortCode}.json"
|
2016-10-23 00:44:14 +03:00
|
|
|
},
|
2018-12-09 17:18:10 +03:00
|
|
|
"/rest/v1/short-urls/{shortCode}/tags": {
|
2018-09-24 23:49:30 +03:00
|
|
|
"$ref": "paths/v1_short-urls_{shortCode}_tags.json"
|
2017-07-08 13:55:33 +03:00
|
|
|
},
|
|
|
|
|
2018-12-09 17:18:10 +03:00
|
|
|
"/rest/v1/tags": {
|
2017-07-08 13:55:33 +03:00
|
|
|
"$ref": "paths/v1_tags.json"
|
|
|
|
},
|
|
|
|
|
2018-12-09 17:18:10 +03:00
|
|
|
"/rest/v1/short-urls/{shortCode}/visits": {
|
2018-09-24 23:49:30 +03:00
|
|
|
"$ref": "paths/v1_short-urls_{shortCode}_visits.json"
|
2018-09-20 22:15:17 +03:00
|
|
|
},
|
|
|
|
|
2018-12-29 16:39:31 +03:00
|
|
|
"/rest/health": {
|
|
|
|
"$ref": "paths/health.json"
|
|
|
|
},
|
|
|
|
|
2018-12-09 17:18:10 +03:00
|
|
|
"/{shortCode}": {
|
|
|
|
"$ref": "paths/{shortCode}.json"
|
|
|
|
},
|
2018-12-09 17:43:56 +03:00
|
|
|
"/{shortCode}/track": {
|
|
|
|
"$ref": "paths/{shortCode}_track.json"
|
|
|
|
},
|
|
|
|
"/{shortCode}/qr-code": {
|
|
|
|
"$ref": "paths/{shortCode}_qr-code.json"
|
|
|
|
},
|
|
|
|
"/{shortCode}/preview": {
|
|
|
|
"$ref": "paths/{shortCode}_preview.json"
|
|
|
|
},
|
2018-12-09 17:18:10 +03:00
|
|
|
|
|
|
|
"/rest/v1/authenticate": {
|
2018-09-20 22:15:17 +03:00
|
|
|
"$ref": "paths/v1_authenticate.json"
|
2016-10-23 00:44:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|