Files
Ashley Harrison 30bf2bcde1 API client generation: create a central getAPIBaseURL function (#99961)
* create a getAPIBaseURL function

* use base url in iam api
2025-02-03 13:05:47 +00:00

17 lines
561 B
TypeScript

import { createApi } from '@reduxjs/toolkit/query/react';
import { createBaseQuery } from '../../../api/createBaseQuery';
import { getAPIBaseURL } from '../../../api/utils';
// Currently, we are loading all query templates
// Organizations can have maximum of 1000 query templates
export const QUERY_LIBRARY_GET_LIMIT = 1000;
export const BASE_URL = getAPIBaseURL('peakq.grafana.app', 'v0alpha1');
export const queryLibraryApi = createApi({
baseQuery: createBaseQuery({ baseURL: BASE_URL }),
reducerPath: 'queryLibraryAPI',
endpoints: () => ({}),
});