List backend functions

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 app's deployed backend functions, each with its code and the automations that run it.

Use it to pull the functions' source, for example before you change one and send it back with Redeploy a backend function. Every function comes back in one response, with no paging.

Set branch_id to list the functions a branch serves: main's functions, with the ones the branch deployed in their branch version and the ones it deleted left out. Automations belong to the app, so they're the same on every branch. When a branch can't have functions of its own, for example on an app whose functions haven't moved to Base44's current function runtime, you get main's functions.

This is limited to 60 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>

get/api/apps/{app_id}/backend-functions

Request

  • Base URL
    https://app.base44.com
  • URL
    https://app.base44.com/api/apps/{app_id}/backend-functions
  • Auth
    HTTP bearer

Path parameters

app_idstring required

ID of the app the functions belong to.

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 app's backend functions.

Example response

{
  "functions": [
    {
      "automations": [],
      "entry": "main.ts",
      "files": [
        {
          "content": "Deno.serve(async (req) => {\n  return Response.json({ ok: true });\n});\n",
          "path": "main.ts"
        }
      ],
      "name": "sendWelcomeEmail"
    }
  ]
}

Changes

    • info

      added the new optional query request parameter branch_id

    • info

      the security scope read_only was added to the endpoint's security scheme PersonalAccessTokenAuth

    • info

      the security scope full_access was removed from the endpoint's security scheme PersonalAccessTokenAuth