mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-12 01:54:41 +08:00
Updated API docs including new endpoint and updating params for short code creation
This commit is contained in:
@@ -116,6 +116,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"ShortCodes"
|
"ShortCodes"
|
||||||
@@ -140,6 +141,34 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "validSince",
|
||||||
|
"in": "formData",
|
||||||
|
"description": "The date (in ISO-8601 format) from which this short code will be valid",
|
||||||
|
"required": false,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "validUntil",
|
||||||
|
"in": "formData",
|
||||||
|
"description": "The date (in ISO-8601 format) until which this short code will be valid",
|
||||||
|
"required": false,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "customSlug",
|
||||||
|
"in": "formData",
|
||||||
|
"description": "A unique custom slug to be used instead of the generated short code",
|
||||||
|
"required": false,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "maxVisits",
|
||||||
|
"in": "formData",
|
||||||
|
"description": "The maximum number of allowed visits for this short code",
|
||||||
|
"required": false,
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"$ref": "../parameters/Authorization.json"
|
"$ref": "../parameters/Authorization.json"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,5 +54,69 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"put": {
|
||||||
|
"tags": [
|
||||||
|
"ShortCodes"
|
||||||
|
],
|
||||||
|
"summary": "Edit short code",
|
||||||
|
"description": "Update certain meta arguments from an existing short URL.",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "shortCode",
|
||||||
|
"in": "path",
|
||||||
|
"type": "string",
|
||||||
|
"description": "The short code to edit.",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "validSince",
|
||||||
|
"in": "formData",
|
||||||
|
"description": "The date (in ISO-8601 format) from which this short code will be valid",
|
||||||
|
"required": false,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "validUntil",
|
||||||
|
"in": "formData",
|
||||||
|
"description": "The date (in ISO-8601 format) until which this short code will be valid",
|
||||||
|
"required": false,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "maxVisits",
|
||||||
|
"in": "formData",
|
||||||
|
"description": "The maximum number of allowed visits for this short code",
|
||||||
|
"required": false,
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "../parameters/Authorization.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"204": {
|
||||||
|
"description": "The short code has been properly updated."
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Provided meta arguments are invalid.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../definitions/Error.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "No short URL was found for provided short code.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../definitions/Error.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Unexpected error.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../definitions/Error.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user