Read a game's files
GET /api/developer/projects/{project_id}/files/ — the game's current text files and media, including edits made in Rosebud.
GET /api/developer/projects/{project_id}/files/
Authorization: Bearer <agent_token>Returns the editor's latest version of the game, including edits Rosie or the owner made in the browser, not the published copy.
Response
HTTP 200:
{
"project_id": "6f1d2c8e-...",
"content_version": "c81d7a33f0...",
"files": [{ "path": "index.html", "content": "<h1>Edited in Rosie</h1>" }],
"media": [
{
"path": "assets/fox.png",
"url": "<file URL>",
"size": 3,
"md5": "dddddddddddddddddddddddddddddddd",
"media_file_id": "6f1e1a0c-..."
}
]
}filesare text files with their full content, sorted by folder, then name.mediaare the game's media files; fetch each fromurl.sizeandmd5are null for a media file with no recorded metadata.- Compare
md5andsizewith a local file to skip a download, and declare the samemd5in an upload session so Rosebud links the file instead of asking for it again. content_versionis what to send asexpected_versionon the next release. Reading also records the game's paths at that version, so a later conflict can say what changed.- Reading files back is code download, so the game's owner needs Rosebud Pro or higher. Publishing and releases work on every plan. An unclaimed game has no plan, so approve the connection first.
Errors
| Code | Status | When |
|---|---|---|
plan_required | 403 | The owner's plan lacks code download. The message links Rosebud's plans. |
invalid_connection | 401 | Missing, malformed or unknown agent token for this game. |
connection_pending, connection_expired, connection_revoked | 403 | The connection isn't active. |
project_unavailable | 404 | The game doesn't exist or was deleted. |
game_expired | 410 | The unclaimed game passed its one-hour deadline. |
unsupported_project | 409 | Rosebud can't read this game's files back. |
sync_unavailable | 503 | This server can't read files back. |