- swh.web.api.views.snapshot.api_snapshot(request: rest_framework.request.Request, snapshot_id: str)
- GET /api/1/snapshot/(snapshot_id)/
Get information about a snapshot in the archive.
A snapshot is a set of named branches, which are pointers to objects at any level of the Software Heritage DAG. It represents a full picture of an origin at a given time.
As well as pointing to other objects in the Software Heritage DAG, branches can also be aliases, in which case their target is the name of another branch in the same snapshot, or dangling, in which case the target is unknown.
A snapshot identifier is a salted sha1. See
swh.model.git_objects.snapshot_git_object()in our data model module for details about how they are computed.
snapshot_id (sha1) – a snapshot identifier
- Query Parameters
branches_from (str) – optional parameter used to skip branches whose name is lesser than it before returning them
branches_count (int) – optional parameter used to restrain the amount of returned branches (default to 1000)
target_types (str) – optional comma separated list parameter used to filter the target types of branch to return (possible values that can be contained in that list are
- Request Headers
Accept – the requested response content type, either
- Response Headers
- Response JSON Object
branches (object) – object containing all branches associated to the snapshot,for each of them the associated target type and id are given but also a link to get information about that target
id (string) – the unique identifier of the snapshot
- Status Codes