mirror of https://github.com/statping/statping
Created Badges (markdown)
parent
7b1bd877bc
commit
6dbabd4da1
|
@ -0,0 +1,32 @@
|
|||
Using shields.io you can easily create Badges for your services. Using the URL below, you can format your own SVG badge:
|
||||
|
||||
```
|
||||
https://img.shields.io/badge/dynamic/json?url=<URL>&label=<LABEL>&query=<$.DATA.SUBDATA>&color=<COLOR>&prefix=<PREFIX>&suffix=<SUFFIX>
|
||||
```
|
||||
- `url` - URL for JSON endpoint
|
||||
- `label` - Text for the left side of the badge
|
||||
- `query` - [JSON Path](https://jsonpath.com/) to be set for right side value
|
||||
|
||||
## Examples
|
||||
|
||||
#### Service Uptime Percent
|
||||
<img src="https://img.shields.io/badge/dynamic/json?color=blue&label=%20Statping%20Uptime&query=%24.online_24_hours&url=https%3A%2F%2Fdemo.statping.com%2Fapi%2Fservices%2F2&suffix=%">
|
||||
|
||||
- URL: [https://demo.statping.com/api/services/2](https://demo.statping.com/api/services/2)
|
||||
- JSON Path: `$.online_24_hours`
|
||||
- Suffix: `%`
|
||||
|
||||
```
|
||||
https://img.shields.io/badge/dynamic/json?color=blue&label=%20Statping%20Uptime&query=%24.online_24_hours&url=https%3A%2F%2Fdemo.statping.com%2Fapi%2Fservices%2F2&suffix=%
|
||||
```
|
||||
|
||||
#### Count Services
|
||||
<img src="https://img.shields.io/badge/dynamic/json?color=purple&label=Demo%20Site&query=%24.services&url=https://demo.statping.com/health&suffix=%20services">
|
||||
|
||||
- URL: [https://demo.statping.com/health](https://demo.statping.com/health)
|
||||
- JSON Path: `$.services`
|
||||
- Suffix: ` services`
|
||||
|
||||
```
|
||||
https://img.shields.io/badge/dynamic/json?color=purple&label=Demo%20Site&query=%24.services&url=https://demo.statping.com/health&suffix=%20services
|
||||
```
|
Loading…
Reference in New Issue