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-..."
        }
    ]
}
  • files are text files with their full content, sorted by folder, then name. media are the game's media files; fetch each from url. size and md5 are null for a media file with no recorded metadata.
  • Compare md5 and size with a local file to skip a download, and declare the same md5 in an upload session so Rosebud links the file instead of asking for it again.
  • content_version is what to send as expected_version on 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

CodeStatusWhen
plan_required403The owner's plan lacks code download. The message links Rosebud's plans.
invalid_connection401Missing, malformed or unknown agent token for this game.
connection_pending, connection_expired, connection_revoked403The connection isn't active.
project_unavailable404The game doesn't exist or was deleted.
game_expired410The unclaimed game passed its one-hour deadline.
unsupported_project409Rosebud can't read this game's files back.
sync_unavailable503This server can't read files back.

On this page