# List StarSling Disks presets (/api/disks/get-disk-presets)

`GET /api/disks/presets`

The presets a StarSling Disks step may name in preset:: each one's directory, default size cap and change test, and the limits every disk is held to. A preset mounts the tool's own default directory, so the tool needs no setting. Identical for every caller; requires no resource scope.

Base URL: `https://runners.starsling.dev`

## Authentication

Requires a bearer token (`Authorization: Bearer`).

## Responses

| Status | Description |
| --- | --- |
| `200` | Every preset a StarSling Disks step may name, and the limits every disk is held to. |
| `401` | No credential, or one that has expired — re-run `sling login`. |
| `500` | The request was valid; the control plane or a dependency it calls failed. |

### `200` body

- `presets` — array<object>, required
  - array of object
    - `name` — string, required. What a step names in `preset:`, and its default disk name. e.g. `pnpm-store`
    - `base` — string, required. The root `path` is under: the job user's home directory. `home`
    - `path` — string, required. The tool's own default directory, relative to `base`. The disk mounts there, so the tool needs no setting. e.g. `.local/share/pnpm/store`
    - `size_cap_bytes` — number, required. The size cap a step gets when it gives no `size-cap`. e.g. `20000000000`
    - `change_test` — string, required. What `publish: on-change` counts as a change: file contents, types, owners, modes and links, and with `content-and-mtime` modification times too, for tools that read them as freshness. `content-only`, `content-and-mtime`
- `limits` — object, required
  - `default_size_cap_bytes` — number, required. A disk's size cap when its step names neither a preset nor a `size-cap`.
  - `max_size_cap_bytes` — number, required. The largest `size-cap` a step may ask for.
  - `max_disks_per_repository` — number, required. How many disks one repository may keep.

### Example

```json
{
  "presets": [
    {
      "name": "pnpm-store",
      "base": "home",
      "path": ".local/share/pnpm/store",
      "size_cap_bytes": 20000000000,
      "change_test": "content-only"
    }
  ],
  "limits": {
    "default_size_cap_bytes": 10000000000,
    "max_size_cap_bytes": 200000000000,
    "max_disks_per_repository": 32
  }
}
```