GET
/
badge.json
Shields endpoint JSON
curl --request GET \
  --url https://nums.advay.ca/badge.json
{
  "schemaVersion": 1,
  "label": "views",
  "message": "73",
  "color": "blue",
  "cacheSeconds": 30
}
Return Shields.io-compatible JSON for a dynamic badge.

Example

The following example demonstrates how to use the Shields endpoint to create a badge for your project’s homepage hits:
open "https://img.shields.io/endpoint?url=https%3A%2F%2F<deployment>%2Fbadge.json%3Fid%3Dhome%26label%3Dhits%26cacheSeconds%3D30"
Replace <deployment> with your actual deployment URL. This command, when run in a terminal, will open a URL that returns a JSON response compatible with Shields.io, allowing you to display dynamic badge data.

Query Parameters

id
string
label
string
color
string
cacheSeconds
integer

Clamped to 30–3600 seconds

Response

200 - application/json

OK

The response is of type object.