|
| 1 | +--- |
| 2 | +name: List GitHub Actions caches for a repository |
| 3 | +example: octokit.rest.actions.getActionsCacheList({ owner, repo }) |
| 4 | +route: GET /repos/{owner}/{repo}/actions/caches |
| 5 | +scope: actions |
| 6 | +type: API method |
| 7 | +--- |
| 8 | + |
| 9 | +# List GitHub Actions caches for a repository |
| 10 | + |
| 11 | +Lists the GitHub Actions caches for a repository. |
| 12 | +You must authenticate using an access token with the `repo` scope to use this endpoint. |
| 13 | +GitHub Apps must have the `actions:read` permission to use this endpoint. |
| 14 | + |
| 15 | +```js |
| 16 | +octokit.rest.actions.getActionsCacheList({ |
| 17 | + owner, |
| 18 | + repo, |
| 19 | +}); |
| 20 | +``` |
| 21 | + |
| 22 | +## Parameters |
| 23 | + |
| 24 | +<table> |
| 25 | + <thead> |
| 26 | + <tr> |
| 27 | + <th>name</th> |
| 28 | + <th>required</th> |
| 29 | + <th>description</th> |
| 30 | + </tr> |
| 31 | + </thead> |
| 32 | + <tbody> |
| 33 | + <tr><td>owner</td><td>yes</td><td> |
| 34 | + |
| 35 | +The account owner of the repository. The name is not case sensitive. |
| 36 | + |
| 37 | +</td></tr> |
| 38 | +<tr><td>repo</td><td>yes</td><td> |
| 39 | + |
| 40 | +The name of the repository. The name is not case sensitive. |
| 41 | + |
| 42 | +</td></tr> |
| 43 | +<tr><td>per_page</td><td>no</td><td> |
| 44 | + |
| 45 | +The number of results per page (max 100). |
| 46 | + |
| 47 | +</td></tr> |
| 48 | +<tr><td>page</td><td>no</td><td> |
| 49 | + |
| 50 | +Page number of the results to fetch. |
| 51 | + |
| 52 | +</td></tr> |
| 53 | +<tr><td>ref</td><td>no</td><td> |
| 54 | + |
| 55 | +The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. |
| 56 | + |
| 57 | +</td></tr> |
| 58 | +<tr><td>key</td><td>no</td><td> |
| 59 | + |
| 60 | +An explicit key or prefix for identifying the cache |
| 61 | + |
| 62 | +</td></tr> |
| 63 | +<tr><td>sort</td><td>no</td><td> |
| 64 | + |
| 65 | +The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. |
| 66 | + |
| 67 | +</td></tr> |
| 68 | +<tr><td>direction</td><td>no</td><td> |
| 69 | + |
| 70 | +The direction to sort the results by. |
| 71 | + |
| 72 | +</td></tr> |
| 73 | + </tbody> |
| 74 | +</table> |
| 75 | + |
| 76 | +See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository). |
0 commit comments