v68

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,21696712.3 MB
actions

Get GitHub Actions cache retention limit for a repository

Gets GitHub Actions cache retention limit for a repository. This determines how long caches will be retained for, if not manually removed or evicted due to size constraints.

OAuth tokens and personal access tokens (classic) need the admin:repository scope to use this endpoint.

get/repos/{owner}/{repo}/actions/cache/retention-limit

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

Response

Response

max_cache_retention_daysinteger

The maximum number of days to keep caches in this repository.

Example response

{
  "max_cache_retention_days": 14
}