Get checkpoint files
Changed on<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Returns the source files saved in a checkpoint, so you can read the app's code as it was at that version or compare two versions.
The files are the app's editable source, such as its pages, components, backend functions and entity schemas, rather than every file in its repository. They come from the commit the checkpoint saved. A checkpoint saved before the app's code was kept in git is rebuilt from the copy it stored, which holds fewer files. That copy is also used when a newer checkpoint's commit can't be read and the checkpoint stored one.
Every file comes back in one response, so expect a large response for a big app.
Set branch_id to read one of a branch's checkpoints. A checkpoint is found only on its own line: leave branch_id out for main's checkpoints, and set it to the branch a branch checkpoint belongs to.
This is limited to 120 requests per minute per app for each workspace's personal API keys, so every key in a workspace shares one allowance. Some workspaces have a different limit.
<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app, including a read-only key. Workspace API keys are not accepted.</Note>
<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time.</Warning>
Request
- Base URLhttps://app.base44.com
- URLhttps://app.base44.com/api/apps/{app_id}/app-checkpoints/{checkpoint_id}/file-tree
- AuthHTTP bearer
Path parameters
ID of the checkpoint, as returned in id by List checkpoints.
ID of the app.
Query parameters
ID of the branch to work on, as returned by List branches. Omit it to work on the app's main branch.
Response
The checkpoint's source files.
Example response
{
"files": {
"entities/Task": {
"name": "Task",
"properties": {
"title": {
"type": "string"
}
},
"type": "object"
},
"functions/sendWelcomeEmail": "Deno.serve(async (req) => Response.json({ ok: true }));\n",
"pages/Home": "export default function Home() {\n return <h1>Welcome</h1>;\n}\n"
}
}Changes
- info
added the new optional
queryrequest parameterbranch_id
- info
- info
the security scope
read_onlywas added to the endpoint's security schemePersonalAccessTokenAuth - info
the security scope
full_accesswas removed from the endpoint's security schemePersonalAccessTokenAuth
- info