Set GitHub Actions cache retention limit for an enterprise
PUT
/enterprises/{enterprise}/actions/cache/retention-limit
Sets GitHub Actions cache retention limit for an enterprise. All organizations and repositories under this enterprise may not set a higher cache retention limit.
OAuth tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”enterprise
required
string
The slug version of the enterprise name.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Actions cache retention limit for an enterprise
GitHub Actions cache retention policy for an enterprise.
object
max_cache_retention_days
For repositories & organizations in an enterprise, the maximum duration, in days, for which caches in a repository may be retained.
integer
Examples
Exampleselected_actions
{ "max_cache_retention_days": 80}Responses
Section titled “Responses”Response
Bad Request
Basic Error
Basic Error
object
message
string
documentation_url
string
url
string
status
string
Examplegenerated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Scim Error
Scim Error
object
message
string
documentation_url
string
detail
string
status
integer
scimType
string
schemas
Array<string>
Examplegenerated
{ "message": "example", "documentation_url": "example", "detail": "example", "status": 1, "scimType": "example", "schemas": [ "example" ]}Forbidden
Media typeapplication/json
Basic Error
Basic Error
object
message
string
documentation_url
string
url
string
status
string
Examplegenerated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Media typeapplication/json
Basic Error
Basic Error
object
message
string
documentation_url
string
url
string
status
string
Examplegenerated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}