Skip to main content

loadProject

@lowcode/builder-web


Function: loadProject()

loadProject(projectId): Promise<ProjectState>

Defined in: apps/builder-web/src/api/client.ts:195

Loads full project state from backend, including its current or latest AppSchema version.

Backend routes:

  • GET /projects/:projectId
  • GET /projects/:projectId/versions

Selection logic:

  • if project.currentVersionId is set and found in versions → use it;
  • otherwise fallback to the last version in the list.

Parameters

projectId

string

ID of the project to load.

Returns

Promise<ProjectState>

Full ProjectState for the editor.

Throws

Error if project has no versions.