signoz/frontend/src/api/IngestionKeys/limits/deleteLimitsForIngestionKey.ts
Yunus M b39f703919
feat: support multi ingestion keys (#5105)
* feat: support multi ingestion keys

* fix: remove unwanted changes

* feat: limits ui

* feat: handle limit updates from component

* feat: handle limit updates per signal

* feat: integrate multiple ingestion key api

* feat: handle crud for limits

* fix: lint errors

* feat: support query search for ingestion name

* feat: show utilized size in limits

* feat: show multiple ingestions ui only if gateway is enabled

* feat: handle decimal values for ingestion size

* feat: enable multiple ingestion keys for all users with gateway enabled

* chore: remove yarn.lock

---------

Co-authored-by: Yunus A M <younix@Yunuss-MacBook-Pro.local>
Co-authored-by: Prashant Shahi <prashant@signoz.io>
2024-06-04 18:40:15 +05:30

27 lines
745 B
TypeScript

import { GatewayApiV1Instance } from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { AllIngestionKeyProps } from 'types/api/ingestionKeys/types';
const deleteLimitsForIngestionKey = async (
id: string,
): Promise<SuccessResponse<AllIngestionKeyProps> | ErrorResponse> => {
try {
const response = await GatewayApiV1Instance.delete(
`/workspaces/me/limits/${id}`,
);
return {
statusCode: 200,
error: null,
message: response.data.status,
payload: response.data.data,
};
} catch (error) {
return ErrorResponseHandler(error as AxiosError);
}
};
export default deleteLimitsForIngestionKey;