gitpod.v1.PrebuildService
CreatePrebuild
Creates a prebuild for a project.
Use this method to:
- Create on-demand prebuilds for faster environment startup
- Trigger prebuilds after repository changes
- Generate prebuilds for specific environment classes
The prebuild process creates an environment, runs the devcontainer prebuild lifecycle, and creates a snapshot for future environment provisioning.
Examples
-
Create basic prebuild:
Creates a prebuild for a project using default settings.
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" spec: timeout: "3600s" # 60 minutes default -
Create prebuild with custom environment class:
Creates a prebuild with a specific environment class and timeout.
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" spec: timeout: "3600s" # 1 hour
post/gitpod.v1.PrebuildService/CreatePrebuild
Request body
Response
Success