stats

GET /stats/vulnerability/counts

Changed on

Returns the record count per publication period.

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/stats/vulnerability/counts
  • Auth
    API key in header X-API-KEY

Query parameters

sourcestring

The source to report on, e.g. cvelistv5 or euvd.

granularity'year' | 'month'

Period granularity of the counts.

periodstring

With granularity=month, the year whose months are returned (YYYY). Defaults to the current year. Refused with granularity=year, where the answer already carries every year.

state'published' | 'reserved'

Count records by publication date (default) or by reservation date.

basis'date_published' | 'state_published'

Which records to count. date_published (default) counts every record carrying the date, so a past period never changes. state_published counts only those still in state PUBLISHED, so a withdrawal leaves the year it was published in; where a source's records carry their own publication date it is the population the CVSS figures use (not for EUVD, see docs/statistics.md), and it is unavailable for a source whose pass does not write per-source counters and a lifecycle index both. Refused with state=reserved.

Response

Success.

availableboolean

False when the counters have never been prepared; counts is then empty. With basis=state_published, also false unless the source's pass writes per-source counters and maintains a lifecycle index.

basisstring

date_published or state_published: whether a withdrawn record still counts in the period it was published in.

countsobject

Period (YYYY or YYYY-MM) -> record count.

granularitystring

year or month.

prepared_atstring

When the counters that answered were derived, for a family the indexing pass alone writes: always with basis=state_published, and on the default basis for a source whose feeder does not increment per-source counters. Null means the figure is kept current on ingestion instead.

sourcestring

The source reported on.

statestring

published or reserved: the date the records are counted by.

Changes