v1

latestOpenAPI 3.0.02026-07-249055687.1 KB
org-snapshots

List details of periodic historical data snapshots (Beta)

This API endpoint is used to list the details of historical snapshots. Snapshots of organization data are taken periodically, and each historical snapshot record contains high-level overview metrics about the data that was collected. Other Historical Data Endpoints can be used to fetch the raw data associated with each snapshot.

Historical snapshots contain details and raw data for the following resources:

  • Repositories
  • Alerts
  • Dependencies
  • Artifacts
  • Users
  • Settings

Daily snapshot data is bucketed to the nearest day which is described in more detail at: Historical Data Endpoints

This endpoint consumes 10 units of your quota.

This endpoint requires the following org token scopes:

  • historical:snapshots-list
get/orgs/{org_slug}/historical/snapshots

Path parameters

org_slugstring required

The slug of the organization

Query parameters

datestring

The UTC date in YYYY-MM-DD format for which to fetch snapshots

rangestring

The number of days of data to fetch as an offset from input date (e.g. "-7d" or "7d") or use "latest" to query for latest snapshots for each repo

per_pageinteger

Specify the maximum number of results to return per page (intermediate pages may have fewer than this limit and callers should always check "endCursor" in response body to know if there are more pages)

startAfterCursorstring

The pagination cursor that was returned as the "endCursor" property in previous request

filters.statusstring

Comma-separated list of historical snapshot statuses that should be included (allowed: "in-progress", "success", "failure", "timeout", "skipped")

filters.requestIdstring

Comma-separated list of requestId values that were used to start the historical snapshot job

Response

The historical snapshots.

endCursorstring nullable required