Skip to content

Add a Coverage Badge

The nolapse badge endpoint returns an SVG image showing your repository’s current coverage status. Embed it in your README so contributors and users can see coverage health at a glance.


https://api.nolapse.dev/v1/badge/{org}/{repo}

Replace {org} with your organisation slug and {repo} with your repository name.

Example:

https://api.nolapse.dev/v1/badge/acme/api-service

![coverage](https://api.nolapse.dev/v1/badge/my-org/my-repo)
[![coverage](https://api.nolapse.dev/v1/badge/my-org/my-repo)](https://app.nolapse.dev/my-org/my-repo)
<img src="https://api.nolapse.dev/v1/badge/my-org/my-repo" alt="coverage" />

The badge colour depends on the most recent execution’s coverage percentage:

CoverageBadge colourLabel example
80% or aboveGreencoverage 84%
60% to 79%Yellowcoverage 72%
Below 60%Redcoverage 45%
No baseline or no executionsGreycoverage unknown

The thresholds (80% / 60%) are fixed for the badge display. They are separate from your warn_threshold and fail_threshold enforcement settings.


The badge endpoint sets Cache-Control: public, max-age=60. This means:

  • CDNs and browsers may cache the badge for up to 60 seconds.
  • After a new execution record is written, the badge may take up to 60 seconds to update.
  • GitHub’s README image proxy also caches badge images. You may see a delay of a few minutes before a newly updated badge reflects the latest execution.

To force an immediate refresh in a browser, append a cache-bust query string: ?v=2. This does not affect the actual badge data — it only bypasses the local browser cache.


For self-hosted deployments, replace https://api.nolapse.dev with your server’s base URL:

![coverage](http://nolapse.internal.example.com/v1/badge/my-org/my-repo)

Note that GitHub’s README renderer will not load badge images from http:// URLs in public repositories. Use HTTPS for your self-hosted instance if you want the badge to render on GitHub.