Skip to content

Quickstart

View Markdown

Set the API origin once. These examples use a shell with cURL.

Terminal window
API='https://security.getomg.dev'
curl -fsS "$API/api/v1/status"
Terminal window
curl -fsS "$API/api/v1/cves/CVE-2024-3094?view=summary"

The summary includes the CVE ID, state, revision timestamps, and KEV information when available. Omit view=summary to fetch the stored canonical record. If the API returns 404, check the identifier and whether the record has reached the index.

Terminal window
curl -fsS -G "$API/api/v1/packages/check" \
--data-urlencode 'ecosystem=npm' \
--data-urlencode 'name=lodash'

This query matches the package name within an ecosystem. Add &version=4.17.21 when checking that exact release of lodash. Check the result-limit headers before relying on a result set. The API reference explains exclusions, limits, and errors.

Terminal window
curl -fsS "$API/api/v1/cves/recent?limit=5"

Read records and copy the next_cursor value. If it is a string, use it unchanged as the next request’s URL-encoded cursor value.

Terminal window
curl -fsS -G "$API/api/v1/cves/recent" \
--data-urlencode 'limit=5' \
--data-urlencode "cursor=$NEXT_CURSOR"

Stop when next_cursor is null. Cursors expire after one hour. Revisions can move as the index changes, so overlap repeated reads and deduplicate by CVE ID and modification timestamp.

Terminal window
curl -fsS "$API/api/v1/metrics"

Check cve_index.current before relying on the index for a time-sensitive decision. Check each latency sample count alongside its percentiles. See Data and metrics for the difference between zero, an unavailable measurement, and stale data.