repositories

Retrieve file archive from a repository

Retrieves the file archive of a specified repository. This endpoint can be accessed without authentication if the repository is publicly accessible. For GitLab.com users, this endpoint has a rate limit threshold of 5 requests per minute.

get/api/v4/projects/{id}/repository/archive

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Path parameters

idstring required

The ID or URL-encoded path of the project

Query parameters

shastring

The commit sha of the archive to be downloaded

ref_type'heads' | 'tags'

Type of ref in sha, heads (branch) or tags (tag)

formatstring

The archive format

pathstring

Subfolder of the repository to be downloaded

include_lfs_blobsboolean

Used to exclude LFS objects from archive

exclude_pathsstring[]

Comma-separated list of paths to exclude from the archive

Response

Retrieve file archive from a repository

Changes

No recorded changes to this operation across all 5 revisions of this API.