---
title: "Get artifact and log retention settings for a repository"
method: GET
path: "/repos/{owner}/{repo}/actions/permissions/artifact-and-log-retention"
tags: ["actions"]
---

# Get artifact and log retention settings for a repository

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

## Request

- Base URL: `https://api.github.com`
- URL: `https://api.github.com/repos/{owner}/{repo}/actions/permissions/artifact-and-log-retention`
- Auth: none declared

Gets retention settings for checks, workflow runs, commit statuses, artifacts, and logs for a repository.

Checks include check suites, check runs, and check annotations. These settings also apply to checks and commit statuses created by third-party integrations, and are not limited to data created by GitHub Actions.

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

## Path parameters

- `owner` string, required
- `repo` string, required

## Response `200`

Response

- ActionsArtifactAndLogRetentionResponse
  - `days` integer, required: The number of days checks, workflow runs, commit statuses, artifacts, and logs are retained
  - `maximum_allowed_days` integer, required: The maximum number of days that can be configured

## Other responses

- `404`: Resource not found

---

[API](https://skmtc.dev/github/apis/rest.md) · [All operations](https://skmtc.dev/github/apis/rest/llms.txt) · [OpenAPI document](https://skmtc.dev/github/apis/rest/revisions/309e30296b21?raw)
