class EnvironmentRestApi {

  @GET
  @Operation(summary = "List of Environments",
          tags = {"environments"},
          responses = {
                  @ApiResponse(description = "successful operation", 
                      content = @Content(
                          schema = @Schema(
                              implementation = Environment.class)))})
  public Response listEnvironment(@QueryParam("status") String status) {
    try {
      List<Environment> environmentList =
          environmentManager.listEnvironments(status);
      return new JsonResponse.Builder<List<Environment>>(Response.Status.OK)
          .success(true).result(environmentList).build();
    } catch (SubmarineRuntimeException e) {
      return parseEnvironmentServiceException(e);
    }
  }

}