Sample - GitHub REST API
GET/orgs/{org}/actions/permissions/artifact-and-log-retention

Get artifact and log retention settings for an organization

Gets artifact and log retention settings for an organization.

OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
orgstringrequired
The organization name. The name is not case sensitive.

3 status codes
200Response
daysintegerrequired
The number of days artifacts and logs are retained
maximum_allowed_daysintegerrequired
The maximum number of days that can be configured
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 403 is returned: Forbidden. A 404 is returned: Resource not found.