class_docstr: Serves all the requests made to trials/ REST endpoint
docstr: Handle GET requests for trials/:experiment where ``experiment`` is
  the user-defined name of the experiment.
docstr_tok: ["Handle","GET","requests","for","trials\/",":","experiment","where","``","experiment","``","is","the","user-defined","name","of","the","experiment","."]
code: def on_get_trials_in_experiment(
      self, req: Request, resp: Response, experiment_name: str
  ):
      """
      Handle GET requests for trials/:experiment where ``experiment`` is
      the user-defined name of the experiment.
      """
      verify_query_parameters(req.params, SUPPORTED_PARAMETERS)
  
      status = req.get_param("status", default=None)
      verify_status(status)
      version = req.get_param_as_int("version")
      with_ancestors = req.get_param_as_bool("ancestors", default=False)
  
      experiment = retrieve_experiment(
          self.storage, experiment_name, version
      )
      if status:
          trials = experiment.fetch_trials_by_status(
              status, with_ancestors
          )
      else:
          trials = experiment.fetch_trials(with_ancestors)
  
      response = build_trials_response(trials)
      resp.text = json.dumps(response)
  
file_path: orion/src/orion/serving/trials_resource.py
imports: import json
  import falcon.errors
  from falcon import Request, Response
  from orion.core.worker.trial import Trial
  from orion.serving.parameters import retrieve_experiment, retrieve_trial, verify_query_parameters, verify_status
  from orion.serving.responses import build_trial_response, build_trials_response
label_desc: Use image node_id 2 for calling the TrialsResource obj's underlying member method code with example usage: obj.on_get_trials_in_experiment(req, resp, experiment_name) without return types