Use this API to download a snapshot of a project’s repository, for use in salvaging a corrupt repository.

These endpoints require administrator access to the instance.

Download snapshot of a Git repository

GET /api/v4/projects/{id}/snapshot

Downloads a snapshot of the project Git repository, or of the wiki repository if wiki is true. The snapshot is always in uncompressed tar format. If a repository is corrupted so that git clone does not work, the snapshot might allow some of the data to be retrieved. Requires administrator or auditor access.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the project
wiki
Query
BooleanIf true, downloads the wiki repository instead of the project repository

Responses

CodeDescriptionSchema
200OKString (binary) (application/x-tar)
400Bad Request—
401Unauthorized—
404Not Found—