mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Documented health endpoint
This commit is contained in:
parent
144a5415da
commit
fd8d73af38
31
docs/swagger/definitions/Health.json
Normal file
31
docs/swagger/definitions/Health.json
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"pass",
|
||||||
|
"fail"
|
||||||
|
],
|
||||||
|
"description": "The status of the service"
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Shlink version"
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"about": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "About shlink"
|
||||||
|
},
|
||||||
|
"project": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Shlink project repository"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "A list of links"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
62
docs/swagger/paths/health.json
Normal file
62
docs/swagger/paths/health.json
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"get": {
|
||||||
|
"operationId": "health",
|
||||||
|
"tags": [
|
||||||
|
"Monitoring"
|
||||||
|
],
|
||||||
|
"summary": "Check healthiness",
|
||||||
|
"description": "Checks the healthiness of the service, making sure it can access required resources.",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The passing health status",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../definitions/Health.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"application/json": {
|
||||||
|
"status": "pass",
|
||||||
|
"version": "1.16.0",
|
||||||
|
"links": {
|
||||||
|
"about": "https://shlink.io",
|
||||||
|
"project": "https://github.com/shlinkio/shlink"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"503": {
|
||||||
|
"description": "The failing health status",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../definitions/Health.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"application/json": {
|
||||||
|
"status": "fail",
|
||||||
|
"version": "1.16.0",
|
||||||
|
"links": {
|
||||||
|
"about": "https://shlink.io",
|
||||||
|
"project": "https://github.com/shlinkio/shlink"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Unexpected error.",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../definitions/Error.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -56,6 +56,10 @@
|
|||||||
"name": "Visits",
|
"name": "Visits",
|
||||||
"description": "Operations to manage visits on short URLs"
|
"description": "Operations to manage visits on short URLs"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Monitoring",
|
||||||
|
"description": "Public endpoints designed to monitor the service"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "URL Shortener",
|
"name": "URL Shortener",
|
||||||
"description": "Non-rest endpoints, used to be publicly exposed"
|
"description": "Non-rest endpoints, used to be publicly exposed"
|
||||||
@ -88,6 +92,10 @@
|
|||||||
"$ref": "paths/v1_short-urls_{shortCode}_visits.json"
|
"$ref": "paths/v1_short-urls_{shortCode}_visits.json"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"/rest/health": {
|
||||||
|
"$ref": "paths/health.json"
|
||||||
|
},
|
||||||
|
|
||||||
"/{shortCode}": {
|
"/{shortCode}": {
|
||||||
"$ref": "paths/{shortCode}.json"
|
"$ref": "paths/{shortCode}.json"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user