class_docstr: Client for interacting with the MLflow Gateway API.
  
  :param gateway_uri: Optional URI of the gateway. If not provided, attempts to resolve from
      first the stored result of `set_gateway_uri()`, then the  environment variable
      `MLFLOW_GATEWAY_URI`.
class_docstr_tok: ["Client","for","interacting","with","the","MLflow","Gateway","API",".",":","param","gateway_uri",":","Optional","URI","of","the","gateway",".","If","not","provided",",","attempts","to","resolve","from","first","the","stored","result","of","`","set_gateway_uri","(",")","`",",","then","the","environment","variable","`","MLFLOW_GATEWAY_URI","`","."]
docstr: Search for routes in the Gateway.
  
  Args:
      page_token: Token specifying the next page of results. It should be obtained from
          a prior ``search_routes()`` call.
  
  Returns:
      Returns a list of all configured and initialized `Route` data for the MLflow
      Gateway Server. The return will be a list of dictionaries that detail the name, type,
      and model details of each active route endpoint.
docstr_tok: ["Search","for","routes","in","the","Gateway",".","Args",":","page_token",":","Token","specifying","the","next","page","of","results",".","It","should","be","obtained","from","a","prior","``","search_routes","(",")","``","call",".","Returns",":","Returns","a","list","of","all","configured","and","initialized","`","Route","`","data","for","the","MLflow","Gateway","Server",".","The","return","will","be","a","list","of","dictionaries","that","detail","the","name",",","type",",","and","model","details","of","each","active","route","endpoint","."]
code: def search_routes(
      self, page_token: Optional[str] = None
  ) -> PagedList[Route]:
      """
      Search for routes in the Gateway.
  
      Args:
          page_token: Token specifying the next page of results. It should be obtained from
              a prior ``search_routes()`` call.
  
      Returns:
          Returns a list of all configured and initialized `Route` data for the MLflow
          Gateway Server. The return will be a list of dictionaries that detail the name, type,
          and model details of each active route endpoint.
  
      """
      request_parameters = (
          {"page_token": page_token} if page_token is not None else None
      )
      response_json = self._call_endpoint(
          "GET",
          MLFLOW_GATEWAY_CRUD_ROUTE_BASE,
          json_body=json.dumps(request_parameters),
      ).json()
      routes = [
          Route(
              **{
                  **resp,
                  "route_url": resolve_route_url(
                      self._gateway_uri,
                      resp["route_url"],
                  ),
              }
          )
          for resp in response_json.get("routes", [])
      ]
      next_page_token = response_json.get("next_page_token")
      return PagedList(routes, next_page_token)
  
imports: import json
  import logging
  from typing import Any, Dict, List, Optional
  import requests.exceptions
  from mlflow import MlflowException
  from mlflow.gateway.config import LimitsConfig, Route
  from mlflow.gateway.constants import MLFLOW_GATEWAY_CLIENT_QUERY_RETRY_CODES, MLFLOW_GATEWAY_CLIENT_QUERY_TIMEOUT_SECONDS, MLFLOW_GATEWAY_CRUD_ROUTE_BASE, MLFLOW_GATEWAY_LIMITS_BASE, MLFLOW_GATEWAY_ROUTE_BASE, MLFLOW_QUERY_SUFFIX
  from mlflow.gateway.utils import assemble_uri_path, gateway_deprecated, get_gateway_uri, resolve_route_url
  from mlflow.protos.databricks_pb2 import BAD_REQUEST
  from mlflow.store.entities.paged_list import PagedList
  from mlflow.tracking._tracking_service.utils import _get_default_host_creds
  from mlflow.utils.databricks_utils import get_databricks_host_creds
  from mlflow.utils.rest_utils import augmented_raise_for_status, http_request
  from mlflow.utils.uri import get_uri_scheme
label_desc: Use image node_id 7 for calling the MlflowGatewayClient obj's underlying member method code with example usage: obj.search_routes(page_token) and returns: PagedList