Skip to content

Get artifact and log retention settings for a repository

GET
/repos/{owner}/{repo}/actions/permissions/artifact-and-log-retention

Gets artifact and log retention settings for a repository.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.

API method documentation

owner
required
string

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

repo
required
string

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

Response

Media type application/json
object
days
required

The number of days artifacts and logs are retained

integer
maximum_allowed_days
required

The maximum number of days that can be configured

integer
Examples
Example default
{
"days": 90,
"maximum_allowed_days": 365
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}