[Cloud Security] add api version to fleet call (#166335)

## Summary
fixes
- https://github.com/elastic/security-team/issues/7623

adding version to the fleet call
This commit is contained in:
Maxim Kholod 2023-09-14 15:28:18 +02:00 committed by GitHub
parent bd0ed6cd89
commit cfd65eb5c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,7 @@ import {
epmRouteService,
type GetInfoResponse,
type DefaultPackagesInstallationError,
API_VERSIONS,
} from '@kbn/fleet-plugin/common';
import { CLOUD_SECURITY_POSTURE_PACKAGE_NAME } from '../../../common/constants';
import { useKibana } from '../hooks/use_kibana';
@ -21,6 +22,8 @@ export const useCisKubernetesIntegration = () => {
const { http } = useKibana().services;
return useQuery<GetInfoResponse, DefaultPackagesInstallationError>(['integrations'], () =>
http.get<GetInfoResponse>(epmRouteService.getInfoPath(CLOUD_SECURITY_POSTURE_PACKAGE_NAME))
http.get<GetInfoResponse>(epmRouteService.getInfoPath(CLOUD_SECURITY_POSTURE_PACKAGE_NAME), {
version: API_VERSIONS.public.v1,
})
);
};