gitpod.v1.EnvironmentService
CreateEnvironment
Creates a development environment from a context URL (e.g. Git repository) and starts it.
The class field must be a valid environment class ID. You can find a list of available environment classes with the ListEnvironmentClasses method.
Examples
-
Create from context URL:
Creates an environment from a Git repository URL with default settings.
spec: machine: class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" content: initializer: specs: - contextUrl: url: "https://github.com/gitpod-io/gitpod" -
Create from Git repository:
Creates an environment from a Git repository with specific branch targeting.
spec: machine: class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" content: initializer: specs: - git: remoteUri: "https://github.com/gitpod-io/gitpod" cloneTarget: "main" targetMode: "CLONE_TARGET_MODE_REMOTE_BRANCH" -
Create with custom timeout and ports:
Creates an environment with custom inactivity timeout and exposed port configuration.
spec: machine: class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" content: initializer: specs: - contextUrl: url: "https://github.com/gitpod-io/gitpod" timeout: disconnected: "7200s" # 2 hours in seconds ports: - port: 3000 admission: "ADMISSION_LEVEL_EVERYONE" name: "Web App"
post/gitpod.v1.EnvironmentService/CreateEnvironment
Request body
Response
Success