UpdateEnvironment
POST/gitpod.v1.EnvironmentService/UpdateEnvironment
Updates an environment’s configuration while it is running.
Updates are limited to:
- Git credentials (username, email)
- SSH public keys
- Content initialization
- Port configurations
- Automation files
- Environment timeouts
Examples
-
Update Git credentials:
Updates the Git configuration for the environment.
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" spec: content: gitUsername: "example-user" gitEmail: "user@example.com" -
Add SSH public key:
Adds a new SSH public key for authentication.
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" spec: sshPublicKeys: - id: "0194b7c1-c954-718d-91a4-9a742aa5fc11" value: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI..." -
Update content session:
Updates the content session identifier for the environment.
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" spec: content: session: "0194b7c1-c954-718d-91a4-9a742aa5fc11"
Note: Machine class changes require stopping the environment and creating a new one.
UpdateEnvironment
curl https://app.gitpod.io/api/gitpod.v1.EnvironmentService/UpdateEnvironment \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $GITPOD_API_KEY" \
-d '{}'{}Returns Examples
{}