     do: nil
   defp get_api_data(%{id: id, name: name, request: request}) do
     %{
-      id: to_string(id),
+      id: id,
       name: name,
-      request: prepare_params(request)
+      request: Map.take(request, [:scheme, :host, :port, :path, :methods])
     }
   end
 

      headers: modify_headers_list(conn.resp_headers),
      body: get_response_body(conn)
    }
    |> prepare_params
  end

  defp get_latencies_data(conn) do
    conn.assigns
    |> Map.get(:latencies)
    |> prepare_params
  end

  defp prepare_params(nil), do: %{}
  defp prepare_params(%{__struct__: _} = params), do: params |> Map.delete(:__struct__) |> prepare_params()
  defp prepare_params(params), do: for {key, val} <- params, into: %{}, do: {key_to_atom(key), val}

  defp key_to_atom(key) when is_binary(key), do: String.to_atom(key)
  defp key_to_atom(key) when is_atom(key), do: key
end

      headers: modify_headers_list(conn.req_headers),
      body: Poison.encode!(conn.body_params)
    }
  end

  defp get_response_body(conn) do
