List app code 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 path of every file in the app's source, the list the app editor shows in its file tree.

Files the app's .gitignore excludes, dependency and build folders, most dotfiles, and binary or media files are left out. Read a file's text with Get an app code file.

Reads come from the app's live sandbox, the same files the app editor shows, including changes that haven't been published yet. If no sandbox is running, the call starts one, so the first call after a quiet period takes noticeably longer than later ones.

Set branch_id to read a branch's files instead of main's. Each branch has its own sandbox, so the first read of a branch also takes longer. A merged branch can't be read: the call returns a 409. On an app imported from GitHub, reading a merged branch can instead return the files as they were when the branch was created, so don't rely on it there.

This is limited to 60 requests a 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, including a read-only one, from anyone with access to the app, viewers included. Workspace API keys are not authorized for it.</Note>

get/api/apps/{app_id}/code/file-list

Request

  • Base URL: https://app.base44.com
  • URL: https://app.base44.com/api/apps/{app_id}/code/file-list
  • Auth: HTTP bearer

Path parameters

app_idstring required

ID of the app whose code to read.

Query parameters

branch_idstring

ID of the branch to work on, as returned by List branches. Omit it to work on the app's main branch.

Response

The path of every file in the app's source.

pathsstring[] required

Path of each file, relative to the app root.

Example response

{
  "paths": [
    "package.json",
    "src/App.jsx",
    "src/pages/Home.jsx"
  ]
}

Changes

    • breaking

      query request parameter branch_id list-of-types was narrowed by removing types null

    • info

      for the query request parameter branch_id, the type was generalized from no type to string

    • info

      added the new optional query request parameter branch_id

    • info

      added the non-success response with the status