# List saved Playground solutions

```http
GET /api/public/v1/competitions/lean-kernel-challenge/playground/solutions
```

**Scope**: `playground.read`.

Returns all current private saved Solutions owned by the authenticated account. A Solution is the latest editable Workspace; it is not a version history, practice Run, formal submission, or Contributor Network item.

Existing Solutions remain readable after enrollment or Playground write access changes. Competition visibility and ownership still apply.

## Query parameters

| Parameter | Type and meaning |
| :--- | :--- |
| `problem` | **Optional string.** Exact Problem ID stored with the Solution. An unmatched value returns `items: []`. |

This endpoint is not cursor-paginated and does not return `nextCursor` or a total count. Solutions are returned in the server's current order.

## Response fields

| Field | Type and meaning |
| :--- | :--- |
| `items` | [`SavedSolution[]`](#savedsolution) — Complete matching collection. |

### `SavedSolution`

| Field | Type and meaning |
| :--- | :--- |
| `solutionId` | `string` — Stable opaque Solution ID. |
| `problemId` | `string` — Problem to which the Solution belongs. |
| `name` | `string` — Current user-managed Solution name. |
| `files` | `Record<string, string>` — Complete current Workspace. It contains root `Submission.lean`; compatible auxiliary files may appear below `Submission/`. |
| `revision` | `integer` — Positive optimistic-concurrency version. |
| `published` | `boolean` — Whether this Solution currently has an active Contributor Network publication. |
| `publicItemId` | `string \| null` — Active Contributor Network item ID when `published` is `true`; otherwise `null`. |
| `createdAt` | `string` — ISO 8601 UTC creation time. |
| `updatedAt` | `string` — ISO 8601 UTC time of the latest successful update. |

The response does not include computed `fileCount`, `totalBytes`, or a nested `publication` object. Calculate sizes from `files` only when needed, and treat `published` plus `publicItemId` as the implemented publication projection.

## Example request

```bash
export SAIR_API_BASE="https://api.sair.foundation/api/public/v1"

curl \
  "$SAIR_API_BASE/competitions/lean-kernel-challenge/playground/solutions?problem=fib" \
  -H "Authorization: Bearer $SAIR_API_KEY"
```

## Example response

```json
{
  "ok": true,
  "data": {
    "items": [
      {
        "solutionId": "17",
        "problemId": "fib",
        "name": "baseline",
        "files": {
          "Submission.lean": "import Spec\n\nnamespace Submission\n\ndef impl : Nat → Nat := fibSpec\n\ntheorem impl_correct : ∀ n, impl n = fibSpec n := fun _ => rfl\n\nend Submission\n"
        },
        "revision": 2,
        "published": false,
        "publicItemId": null,
        "createdAt": "2026-09-02T08:00:00Z",
        "updatedAt": "2026-09-04T11:30:00Z"
      }
    ]
  }
}
```

Successful responses use `Content-Type: application/json`.

## Errors

| HTTP | Code | When |
| :---: | :--- | :--- |
| `404` | `NOT_FOUND` | The Competition does not exist or is not visible to the caller. |
| `500` | `DATABASE_ERROR` | Saved Solutions could not be read. |
| `502` | `PLATFORM_UNAVAILABLE` | Competition visibility cannot be verified. |

See [Errors](../../../errors.md) for shared authentication, scope, and rate-limit errors.
