Retrieve the body of a file

Returns the final text of one file of a pad environment, as text/plain; charset=utf-8. This is the url of a cold or hot file in GET /pad_environments/{id} and also works for files whose contents are inline.

The body of a cold or hot file is the file's final state, available once the pad has ended: before that the request answers 422; right after the pad ended, while the final state is still being prepared (usually under a minute), it answers 202 with "status": "preparing" — retry shortly. A file whose contents are inline answers 200 at any time.

Two states are terminal, and never answer preparing: 503 when final file states are not enabled for the pad's owner, 410 when the pad's data has been archived and wiped and there is no archive left to prepare the file from.

The same access rule as the pad environment applies. Binary, large and link files have no text body and answer 404, as does a file that is not in the environment.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required

The pad environment ID.

Query Params
string
required

The file, identified by the Base64 encoding of its path in file_contents (for example c3JjL21haW4ucHk= for src/main.py). The url of a cold file carries it already.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json