Download a single file from a revision
GET
/api/sites/{path}/revisions/{rev}/file
const url = 'https://example.com/api/sites/example/revisions/example/file?path=example';const options = {method: 'GET', headers: {'Remote-User': '<Remote-User>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/sites/example/revisions/example/file?path=example' \ --header 'Remote-User: <Remote-User>'Streams one file with a Content-Disposition: attachment header.
Available to any authenticated user; hidden sites are visible only to
admins.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”path
required
string
Full site path — group segments (0–2) plus the slug, e.g. claude/app or demo.
rev
required
string
A revision ID — current for the live content, or an archive timestamp from GET …/revisions.
Query Parameters
Section titled “Query Parameters”path
required
string
Slash-separated file path within the revision.
Responses
Section titled “ Responses ”The file contents.
Media typeapplication/octet-stream
string format: binary
Missing or invalid credentials.
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}No such site, key, or connection.
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}