> Index of every page on this site: [llms.txt](https://docs.a-line.cloud/llms.txt)

# Actions

> The actions operations of the v1 API.

## The org cache

`GET /v1/actions/cache` (operation ID `get_actions_cache`)

The org cache: Actions cache and BuildKit cache usage, the free part, the limit and the monthly estimate. Only usage above the free part is billed.

Authentication: `api_key` ([how to authenticate](/api/authentication)).

**Responses**

- `200`: Usage, limit and cost. Body: [`V1ActionsCache`](/api/reference/schemas#v1actionscache).
- `401`: Missing, invalid or revoked API key.
- `404`: Not a member of the organization.
- `429`: This API key spent its request budget for the current window (code `rate_limited`); retry after `Retry-After` seconds. Body: [`V1Error`](/api/reference/schemas#v1error).

```bash
curl 'https://api.a-line.cloud/v1/actions/cache' \
  -H 'Authorization: Bearer alc_test_EXAMPLE_not_a_real_key'
```

## Change the org cache limit

`PATCH /v1/actions/cache` (operation ID `set_actions_cache_limit`)

Lowering it evicts the oldest items at once.

Authentication: `api_key` ([how to authenticate](/api/authentication)).

**Request body**: [`V1SetActionsCacheLimit`](/api/reference/schemas#v1setactionscachelimit) (required): A new org cache limit.

**Responses**

- `200`: The cache at the new limit. Body: [`V1ActionsCache`](/api/reference/schemas#v1actionscache).
- `400`: Invalid body, below the free amount or above the max.
- `401`: Missing, invalid or revoked API key.
- `403`: The key's scope or the caller's role does not allow this, or a demo organization (DEMO_CACHE_FIXED).
- `429`: This API key spent its request budget for the current window (code `rate_limited`); retry after `Retry-After` seconds. Body: [`V1Error`](/api/reference/schemas#v1error).

```bash
curl -X PATCH 'https://api.a-line.cloud/v1/actions/cache' \
  -H 'Authorization: Bearer alc_test_EXAMPLE_not_a_real_key' \
  -H 'Content-Type: application/json' \
  -d '{"cache_limit_gb":1}'
```
