Skip to content
Snippets Groups Projects
Commit 0d4e38b7 authored by Johanna Szepanski's avatar Johanna Szepanski
Browse files

updated backend

parent 91683748
No related branches found
No related tags found
2 merge requests!612Release 5.0.0,!593CE-3465: Ui not existing host
......@@ -304,6 +304,12 @@ const injectedRtkApi = api.injectEndpoints({
url: `/api/v1/hosts/${queryArg.hostId}/info_by_host_id`
})
}),
checkHostExists: build.query<
CheckHostExistsApiResponse,
CheckHostExistsApiArg
>({
query: (queryArg) => ({ url: `/api/v1/hosts/${queryArg.hostId}/exists` })
}),
findHostAlerts: build.query<
FindHostAlertsApiResponse,
FindHostAlertsApiArg
......@@ -465,7 +471,8 @@ export type UpdateIocApiArg = {
iocUpdateRequest: IocUpdateRequest;
};
export type UnDeployInDbApiResponse =
/** status 200 Undeployment created */ Deployment[];
/** status 200 Undeployment created */
Deployment[] | /** status 204 No Content */ void;
export type UnDeployInDbApiArg = {
/** The id of the IOC to undeploy */
iocId: number;
......@@ -657,6 +664,12 @@ export type FindNetBoxHostByHostIdApiArg = {
/** The host's Host ID */
hostId: string;
};
export type CheckHostExistsApiResponse =
/** status 200 Hosts exists in NetBox */ void;
export type CheckHostExistsApiArg = {
/** Host identifier */
hostId: string;
};
export type FindHostAlertsApiResponse =
/** status 200 Host alerts */ HostAlertResponse;
export type FindHostAlertsApiArg = {
......@@ -1188,6 +1201,8 @@ export const {
useLazyFindAssociatedIocsByHostIdQuery,
useFindNetBoxHostByHostIdQuery,
useLazyFindNetBoxHostByHostIdQuery,
useCheckHostExistsQuery,
useLazyCheckHostExistsQuery,
useFindHostAlertsQuery,
useLazyFindHostAlertsQuery,
useFindNetBoxHostByFqdnQuery,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment