Documented updates on the tags endpoint to return more detailed information

This commit is contained in:
Alejandro Celaya 2020-05-08 10:14:38 +02:00
parent 8d23e60d3a
commit 7e0a14493e
4 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,17 @@
{
"type": "object",
"properties": {
"tag": {
"type": "string",
"description": "The unique tag name"
},
"shortUrlsCount": {
"type": "number",
"description": "The amount of short URLs using this tag"
},
"userAgent": {
"type": "number",
"description": "The combined amount of visits received by short URLs with this tag"
}
}
}

View File

@ -14,6 +14,19 @@
"parameters": [
{
"$ref": "../parameters/version.json"
},
{
"name": "withStats",
"description": "Whether you want to include also a list with general stats by tag or not.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"true",
"false"
]
}
}
],
"responses": {
@ -26,12 +39,20 @@
"properties": {
"tags": {
"type": "object",
"required": ["data"],
"properties": {
"data": {
"type": "array",
"items": {
"type": "string"
}
},
"stats": {
"description": "The tag stats will be returned only if the withStats param was provided with value 'true'",
"type": "array",
"items": {
"$ref": "../definitions/TagInfo.json"
}
}
}
}