mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-29 16:14:42 +00:00
* feat: hoc to support markdown content with variable interpolation * feat: add ingestion settings page * feat: update ingestion settings page and java docs to use interpolation * feat: integrate ingestion info API and update docs components to use ingestion info * feat: address review comments and update <my-app> to <servive-name>
25 lines
650 B
TypeScript
25 lines
650 B
TypeScript
import axios from 'api';
|
|
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
|
import { AxiosError } from 'axios';
|
|
import { ErrorResponse, SuccessResponse } from 'types/api';
|
|
import { IngestionResponseProps } from 'types/api/settings/ingestion';
|
|
|
|
const getIngestionData = async (): Promise<
|
|
SuccessResponse<IngestionResponseProps> | ErrorResponse
|
|
> => {
|
|
try {
|
|
const response = await axios.get(`/settings/ingestion_key`);
|
|
|
|
return {
|
|
statusCode: 200,
|
|
error: null,
|
|
message: 'Success',
|
|
payload: response.data,
|
|
};
|
|
} catch (error) {
|
|
return ErrorResponseHandler(error as AxiosError);
|
|
}
|
|
};
|
|
|
|
export default getIngestionData;
|