2018-05-06 05:19:08 -05:00
|
|
|
{
|
|
|
|
"get": {
|
2018-09-20 13:52:27 -05:00
|
|
|
"operationId": "shortenUrl",
|
2023-01-21 05:05:54 -06:00
|
|
|
"deprecated": true,
|
2018-05-06 05:19:08 -05:00
|
|
|
"tags": [
|
2018-09-20 13:52:27 -05:00
|
|
|
"Short URLs"
|
2018-05-06 05:19:08 -05:00
|
|
|
],
|
|
|
|
"summary": "Create a short URL",
|
2023-01-22 05:35:07 -06:00
|
|
|
"description": "**[Deprecated]** Use [Create short URL](#/Short%20URLs/createShortUrl) instead",
|
2018-05-06 05:19:08 -05:00
|
|
|
"parameters": [
|
2019-11-29 12:09:03 -06:00
|
|
|
{
|
|
|
|
"$ref": "../parameters/version.json"
|
|
|
|
},
|
2018-05-06 05:19:08 -05:00
|
|
|
{
|
|
|
|
"name": "apiKey",
|
|
|
|
"in": "query",
|
|
|
|
"description": "The API key used to authenticate the request",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "longUrl",
|
|
|
|
"in": "query",
|
|
|
|
"description": "The URL to be shortened",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "format",
|
|
|
|
"in": "query",
|
|
|
|
"description": "The format in which you want the response to be returned. You can also use the \"Accept\" header instead of this",
|
|
|
|
"required": false,
|
|
|
|
"schema": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"txt",
|
|
|
|
"json"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "The list of short URLs",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
2018-11-16 09:57:18 -06:00
|
|
|
"$ref": "../definitions/ShortUrl.json"
|
2021-12-09 08:27:18 -06:00
|
|
|
},
|
|
|
|
"example": {
|
|
|
|
"longUrl": "https://github.com/shlinkio/shlink",
|
2023-01-19 02:05:52 -06:00
|
|
|
"shortUrl": "https://s.test/abc123",
|
2021-12-09 08:27:18 -06:00
|
|
|
"shortCode": "abc123",
|
|
|
|
"dateCreated": "2016-08-21T20:34:16+02:00",
|
2022-12-16 06:34:34 -06:00
|
|
|
"visitsSummary": {
|
|
|
|
"total": 0,
|
|
|
|
"nonBots": 0,
|
|
|
|
"bots": 0
|
|
|
|
},
|
2021-12-09 08:27:18 -06:00
|
|
|
"tags": [
|
|
|
|
"games",
|
|
|
|
"tech"
|
|
|
|
],
|
|
|
|
"meta": {
|
|
|
|
"validSince": "2017-01-21T00:00:00+02:00",
|
|
|
|
"validUntil": null,
|
|
|
|
"maxVisits": 100
|
|
|
|
},
|
|
|
|
"domain": null,
|
|
|
|
"title": null,
|
|
|
|
"crawlable": false
|
2018-05-06 05:19:08 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"text/plain": {
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
2020-02-02 01:57:04 -06:00
|
|
|
},
|
2023-01-19 02:05:52 -06:00
|
|
|
"example": "https://s.test/abc123"
|
2021-12-09 08:27:18 -06:00
|
|
|
}
|
2018-05-06 05:19:08 -05:00
|
|
|
}
|
|
|
|
},
|
2021-12-09 11:28:47 -06:00
|
|
|
"default": {
|
2018-05-06 05:19:08 -05:00
|
|
|
"description": "Unexpected error.",
|
|
|
|
"content": {
|
2019-11-28 12:37:22 -06:00
|
|
|
"application/problem+json": {
|
2018-05-06 05:19:08 -05:00
|
|
|
"schema": {
|
|
|
|
"$ref": "../definitions/Error.json"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"text/plain": {
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|