---
title: "Results viewer: one submission file"
method: POST
path: "/check/viewer/file"
tags: ["Results"]
---

# Results viewer: one submission file

`POST /check/viewer/file`

## Request

- Base URL: `https://codequiry.com/api/v1`
- URL: `https://codequiry.com/api/v1/check/viewer/file`
- Auth: API key in header `apikey`

The stored text of one of a submission's own files, for the viewer's file tabs. /check/viewer ships content for the first file only; fetch the others here by their `filedir`. Resolved the way the dashboard resolves them: the engine's cache under every spelling of the path, then the submission's stored archive.

## Request body

- object
  - `check_id` integer, required
  - `submission_id` integer, required
  - `file_path` string, required: The file's `filedir` from the viewer payload.

## Response `200`

File text

- ViewerFile
  - `success` boolean
  - `content` string
  - `filedir` string

## Other responses

- `401`: Missing or invalid API key. The API key is checked before any endpoint logic runs, so this is returned for every operation.
- `402`: Payment required. Either the account is suspended for an unpaid invoice (every endpoint answers this until it is paid), or results are paywalled on this account until it upgrades (the viewer endpoints only). `paywalled` tells the two apart; the request was not performed.
- `404`: Resource not found or not owned by this account.
- `422`: Request validation failed.
- `429`: Rate limit exceeded: more than 60 requests in one minute from this IP. Retry after the number of seconds in the Retry-After header. Successful responses carry X-RateLimit-Limit and X-RateLimit-Remaining too, so you can pace a client without waiting to be refused.

---

[API](https://skmtc.dev/codequiry/apis/codequiry-api.md) · [All operations](https://skmtc.dev/codequiry/apis/codequiry-api/llms.txt) · [OpenAPI document](https://skmtc.dev/codequiry/apis/codequiry-api/revisions/6297e91d9665?raw)
