def get_queryset(self):  # type: ignore[no-untyped-def]
        """
        Override queryset to filter based on provided URL parameters.
        """
        if getattr(self, "swagger_fake_view", False):
            return FeatureState.objects.none()

        environment_api_key = self.kwargs["environment_api_key"]

        try:
            environment = Environment.objects.get(api_key=environment_api_key)
            queryset = get_environment_flags_queryset(
                environment=environment,
                feature_name=self.request.query_params.get("feature_name"),  # type: ignore[arg-type]
            )
            queryset = self._apply_query_param_filters(queryset)

            if self.action == "list":
                queryset = queryset.prefetch_related(
                    "multivariate_feature_state_values"
                )

            return queryset.select_related("feature_state_value", "identity", "feature")
        except Environment.DoesNotExist:
            raise NotFound("Environment not found.")

        Override queryset to filter based on provided URL parameters.
        
api/features/views.py