Skip to content
Ona Docs

StartEnvironment

client.Environments.Start(ctx, body) (*EnvironmentStartResponse, error)
POST/gitpod.v1.EnvironmentService/StartEnvironment

Starts a stopped environment.

Use this method to resume work on a previously stopped environment. The environment retains its configuration and workspace content from when it was stopped.

Examples

  • Start an environment:

    Resumes a previously stopped environment with its existing configuration.

    environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
ParametersExpand Collapse
body EnvironmentStartParams
EnvironmentID param.Field[string]Optional

environment_id specifies which environment should be started.

formatuuid
ReturnsExpand Collapse
type EnvironmentStartResponse interface{…}

StartEnvironment

package main

import (
  "context"
  "fmt"

  "github.com/gitpod-io/gitpod-sdk-go"
  "github.com/gitpod-io/gitpod-sdk-go/option"
)

func main() {
  client := gitpod.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  response, err := client.Environments.Start(context.TODO(), gitpod.EnvironmentStartParams{
    EnvironmentID: gitpod.F("07e03a28-65a5-4d98-b532-8ea67b188048"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
{}
Returns Examples
{}