# Get a problem

```http
GET /api/public/v1/competitions/lean-kernel-challenge/problems/{problemId}
```

**Scope**: `competition.read`.

Returns one Problem from the current approved catalog, including an entry that is temporarily unavailable for new submissions.

## Path parameters

| Parameter | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `problemId` | string | Yes | Exact, case-sensitive `problemId` returned by [List problems](./list-problems.md). Do not substitute `displayName`. |

## Example request

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

curl "$SAIR_API_BASE/competitions/lean-kernel-challenge/problems/$SAIR_PROBLEM_ID" \
  -H "Authorization: Bearer $SAIR_API_KEY"
```

## Example response

```json
{
  "ok": true,
  "data": {
    "approvedRevision": "7a0abb4a80d635740a91aed1894f714dfbb82edd",
    "problem": {
      "problemId": "fib",
      "displayName": "Fibonacci number",
      "availability": "available",
      "officialWorkspace": "https://github.com/SAIRcompetition/lean-kernel-challenge/tree/7a0abb4a80d635740a91aed1894f714dfbb82edd/problems/fib"
    },
    "sourceLimits": {
      "entrypoint": "Submission.lean",
      "uiMaxFiles": 1,
      "uiMaxBytes": 1048576,
      "participantMaxFiles": 1,
      "participantMaxBytes": 1048576
    }
  }
}
```

The revision and Problem values are illustrative. Always use the live response.

## Response fields

| Field | Type and meaning |
| :--- | :--- |
| `approvedRevision` | `string` — Full Git commit SHA for the current catalog snapshot. It must match the revision embedded in `problem.officialWorkspace`. |
| `problem` | [`Problem`](./list-problems.md#problem) — Exact current catalog entry selected by `problemId`. |
| `sourceLimits` | [`PlaygroundSourceLimits`](./list-problems.md#playground-source-limits) — Same current Playground runnable-source limits returned by List problems. |

## Retrieval semantics

- The endpoint returns both `available` and `unavailable` Problems. Availability controls new practice Runs and formal submissions; it does not hide the catalog entry or its pinned workspace.
- The endpoint reads the current approved catalog only. It does not accept a historical revision parameter. A Problem removed from a later catalog therefore returns `404 NOT_FOUND`; read historical Runs, submissions, and shared items through their own endpoints and snapshot rules.
- Open `problem.officialWorkspace` for the pinned statement, trusted source, starter, and configuration files. Use `problem.problemId` to filter examples, saved solutions, shared packages, and the formal leaderboard.
- Apply `sourceLimits` when preparing a Workspace for a Playground Run or publication. Read [Get submission spec](./get-submission-spec.md) for the separate formal source limits, rules links, and current contract acknowledgement.

## Errors

| HTTP | Code | When |
| :---: | :--- | :--- |
| `404` | `NOT_FOUND` | The competition is not publicly visible, or `problemId` does not exactly match a current catalog entry. |
| `404` | `DISCOVERY_NOT_LAUNCHED` | The Problem catalog is not public yet. |
| `502` | `PLATFORM_UNAVAILABLE` | Competition visibility cannot be verified because the platform authority is unavailable. |
| `502` | `SERVICE_UNAVAILABLE` | The authoritative Lean Kernel configuration service is unavailable. |
| `502` | `CATALOG_UNAVAILABLE` | The catalog is missing, empty, or inconsistent with its approved revision. |

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