v18

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-014211,6201.8 MB
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.

post/gitpod.v1.EnvironmentService/UpdateEnvironment

Request body

environmentIdstring uuid

environment_id specifies which environment should be updated.

+required

Response

Success

GitpodV1UpdateEnvironmentResponse required