code: func (c *DeploymentsController) ShowSpaceEnvironments(ctx *app.ShowSpaceEnvironmentsDeploymentsContext) error {
  
  	kc, err := c.GetKubeClient(ctx)
  	defer cleanup(kc)
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  
  	envs, err := kc.GetEnvironments()
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, errs.Wrap(err, "error retrieving environments"))
  	}
  	if envs == nil {
  		return jsonapi.JSONErrorResponse(ctx, errors.NewNotFoundError("environments", ctx.SpaceID.String()))
  	}
  
  	res := &app.SimpleEnvironmentList{
  		Data: envs,
  	}
  
  	return ctx.OK(res)
  }
docs: // ShowSpaceEnvironments runs the showSpaceEnvironments action.
  // FIXME Remove this method once showSpaceEnvironments API is removed.