jina.serve.runtimes.gateway.http.app module#

jina.serve.runtimes.gateway.http.app.get_fastapi_app(streamer, title, description, no_debug_endpoints, no_crud_endpoints, expose_endpoints, expose_graphql_endpoint, cors, logger)[source]#

Get the app from FastAPI as the REST interface.

Parameters:
  • streamer (GatewayStreamer) – gateway streamer object

  • title (str) – The title of this HTTP server. It will be used in automatics docs such as Swagger UI.

  • description (str) – The description of this HTTP server. It will be used in automatics docs such as Swagger UI.

  • no_debug_endpoints (bool) – If set, /status /post endpoints are removed from HTTP interface.

  • no_crud_endpoints (bool) –

    If set, /index, /search, /update, /delete endpoints are removed from HTTP interface.

    Any executor that has @requests(on=…) bind with those values will receive data requests.

  • expose_endpoints (bool) – A JSON string that represents a map from executor endpoints (@requests(on=…)) to HTTP endpoints.

  • expose_graphql_endpoint (bool) – If set, /graphql endpoint is added to HTTP interface.

  • cors (bool) – If set, a CORS middleware is added to FastAPI frontend to allow cross-origin access.

  • logger (JinaLogger) – Jina logger.

Returns:

fastapi app