feat: shields.io endpoint badge (#652)
* feat: shields.io endpoint badge Signed-off-by: Steven Kreitzer <skre@skre.me> * chore: update readme to include new shields.io badge Signed-off-by: Steven Kreitzer <skre@skre.me> --------- Signed-off-by: Steven Kreitzer <skre@skre.me> Co-authored-by: TwiN <twin@linux.com>
This commit is contained in:
20
README.md
20
README.md
@ -107,6 +107,7 @@ Have any feedback or questions? [Create a discussion](https://github.com/TwiN/ga
|
||||
- [Badges](#badges)
|
||||
- [Uptime](#uptime)
|
||||
- [Health](#health)
|
||||
- [Health (Shields.io)](#health-shieldsio)
|
||||
- [Response time](#response-time)
|
||||
- [How to change the color thresholds of the response time badge](#how-to-change-the-color-thresholds-of-the-response-time-badge)
|
||||
- [API](#api)
|
||||
@ -1958,6 +1959,25 @@ https://example.com/api/v1/endpoints/core_frontend/health/badge.svg
|
||||
```
|
||||
|
||||
|
||||
#### Health (Shields.io)
|
||||

|
||||
|
||||
The path to generate a badge is the following:
|
||||
```
|
||||
/api/v1/endpoints/{key}/health/badge.shields
|
||||
```
|
||||
Where:
|
||||
- `{key}` has the pattern `<GROUP_NAME>_<ENDPOINT_NAME>` in which both variables have ` `, `/`, `_`, `,` and `.` replaced by `-`.
|
||||
|
||||
For instance, if you want the current status of the endpoint `frontend` in the group `core`,
|
||||
the URL would look like this:
|
||||
```
|
||||
https://example.com/api/v1/endpoints/core_frontend/health/badge.shields
|
||||
```
|
||||
|
||||
See more information about the Shields.io badge endpoint [here](https://shields.io/badges/endpoint-badge).
|
||||
|
||||
|
||||
#### Response time
|
||||

|
||||

|
||||
|
Reference in New Issue
Block a user