# Get a Contributor Network item

```http
GET /api/public/v1/contributor-network/items/{itemId}
```

**Scope**: `contributor-network.read`.

Returns one active public item with its complete kind-specific immutable payload and lineage summary. Reading an item requires neither competition enrollment nor account setup.

## Path parameter

| Parameter | Requirement |
| :--- | :--- |
| `itemId` | **Required string.** Opaque Contributor Network item ID. |

## Optional type assertions

| Parameter | Type, requirement, and meaning |
| :--- | :--- |
| `competitionId` | **Optional string.** Expected competition ID. Must be sent together with `kind`. |
| `kind` | **Optional string.** Expected item kind. Must be sent together with `competitionId`. |

Omit both parameters when the client handles the full discriminated union. A client that expects one known resource type should send both as server-side assertions; a mismatch returns `404 NOT_FOUND` without revealing which assertion failed.

Supported `kind` values are `cheatsheet`, `solver-template`, `model-reference`, and `lean-kernel-package`. Supplying only one assertion, an unsupported value, a blank value, an unknown query parameter, or a repeated parameter returns `422 RESOURCE_FIELD_INVALID`.

## Visibility

The item and its owning competition must both remain publicly visible, and the competition must expose Contributor Network items. Missing, withdrawn, hidden, deleted, force-revoked, or otherwise unavailable items all return the same `404 NOT_FOUND` response. This endpoint never returns an unavailable item's title, author, remark, payload, or download metadata.

## Response

Returns `200 OK` with a `ContributorNetworkItem` discriminated by `kind`. It contains every [common summary field](./list-items.md#common-summary-fields), its kind-specific detail fields, and `lineage`.

### Lineage fields

| Field | Type | Description |
| :--- | :--- | :--- |
| `lineage.depth` | integer | Number of parent edges from the lineage root; `0` for an original item. |
| `lineage.parent` | `ContributorItemReference` or `null` | Direct parent, or `null` for an original item. |
| `lineage.root` | `ContributorItemReference` | Root publication; points to this item when `depth` is `0`. |

`ContributorItemReference` contains `id`, `publicCode`, and `available`. References are always from the same competition and kind as the returned item. A kind-specific guide may impose a narrower invariant, such as the same Lean Problem.

If a referenced ancestor was withdrawn or made unavailable, the reference remains with `available: false` so lineage is not rewritten. The response does not expose that ancestor's title, author, remark, payload, or download metadata.

### Kind-specific detail

Use the matching competition guide for the complete payload:

- [Get a shared Stage 1 cheatsheet](../competitions/mathematics-distillation-stage1/get-contributor-cheatsheet.md)
- [Get a shared Stage 2 solver template](../competitions/mathematics-distillation-stage2/get-contributor-solver.md)
- [Get a shared model reference](../competitions/modular-arithmetic-challenge/get-contributor-model.md)

Unrelated kind-specific fields are omitted instead of returned as `null`. The response describes the published artifact; it does not grant access to the author's private drafts. Lean packages use `workspaceFiles` as their complete source representation and do not add a redundant root-level `content` field.

Successful responses use `Content-Type: application/json` and `Cache-Control: private, no-store` because favorite and comment state can change and `viewerHasFavorited` is caller-specific.

## Errors

| HTTP | Code | When |
| :---: | :--- | :--- |
| `404` | `NOT_FOUND` | The item or owning competition is unavailable, or a supplied type assertion does not match. |
| `422` | `RESOURCE_FIELD_INVALID` | Type assertions are incomplete or invalid, or the request contains an unknown or repeated query parameter. |

Kind-specific detail pages document artifact-integrity errors. See [Errors](../../errors.md) for shared errors.
