mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-27 17:31:20 -06:00
Documented new visits endpoint
This commit is contained in:
parent
1ef10f11cb
commit
3232ab401f
10
docs/swagger/definitions/VisitStats.json
Normal file
10
docs/swagger/definitions/VisitStats.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"required": ["visitsCount"],
|
||||||
|
"properties": {
|
||||||
|
"visitsCount": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "The total amount of visits received."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
54
docs/swagger/paths/v2_visits.json
Normal file
54
docs/swagger/paths/v2_visits.json
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"get": {
|
||||||
|
"operationId": "getGlobalVisits",
|
||||||
|
"tags": [
|
||||||
|
"Visits"
|
||||||
|
],
|
||||||
|
"summary": "Get general visits stats",
|
||||||
|
"description": "Get general visits stats not linked to one specific short URL.",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "../parameters/version.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKey": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Visits stats.",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"visits": {
|
||||||
|
"$ref": "../definitions/VisitStats.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"application/json": {
|
||||||
|
"visits": {
|
||||||
|
"visitsCount": 1569874
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Unexpected error.",
|
||||||
|
"content": {
|
||||||
|
"application/problem+json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../definitions/Error.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -78,6 +78,9 @@
|
|||||||
"$ref": "paths/v1_tags.json"
|
"$ref": "paths/v1_tags.json"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"/rest/v{version}/visits": {
|
||||||
|
"$ref": "paths/v2_visits.json"
|
||||||
|
},
|
||||||
"/rest/v{version}/short-urls/{shortCode}/visits": {
|
"/rest/v{version}/short-urls/{shortCode}/visits": {
|
||||||
"$ref": "paths/v1_short-urls_{shortCode}_visits.json"
|
"$ref": "paths/v1_short-urls_{shortCode}_visits.json"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user