actions

Set GitHub Actions cache retention limit for an organization

Sets GitHub Actions cache retention limit for an organization. All repositories under this organization may not set a higher cache retention limit.

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

put/organizations/{org}/actions/cache/retention-limit

Request

  • Base URL: https://api.github.com
  • URL: https://api.github.com/organizations/{org}/actions/cache/retention-limit
  • Auth: none declared

Path parameters

orgstring required

The organization name. The name is not case sensitive.

Request body

max_cache_retention_daysinteger

For repositories in this organization, the maximum duration, in days, for which caches in a repository may be retained.

Example request

{
  "max_cache_retention_days": 14
}

Response

Response

Changes

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