Remove /api for internal API (#188548)

This commit is contained in:
Kevin Delemme 2024-07-18 10:40:07 -04:00 committed by GitHub
parent e4852dc703
commit 7b1dd6143d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 7 deletions

View file

@ -98,7 +98,7 @@ export function useFetchSloGroups({
}),
queryFn: async ({ signal }) => {
const response = await http.get<FindSLOGroupsResponse>(
'/internal/api/observability/slos/_groups',
'/internal/observability/slos/_groups',
{
query: {
...(page && { page }),

View file

@ -30,7 +30,7 @@ export function useFetchSloInspect(slo: CreateSLOInput, shouldInspect: boolean)
try {
const body = JSON.stringify(slo);
const response = await http.post<SLOInspectResponse>(
'/internal/api/observability/slos/_inspect',
'/internal/observability/slos/_inspect',
{
body,
signal,

View file

@ -17,7 +17,7 @@ export function useFetchSLOSuggestions() {
queryFn: async ({ signal }) => {
try {
return await http.get<GetSLOSuggestionsResponse>(
'/internal/api/observability/slos/suggestions',
'/internal/observability/slos/suggestions',
{
signal,
}

View file

@ -141,10 +141,10 @@ const createSLORoute = createSloServerRoute({
});
const inspectSLORoute = createSloServerRoute({
endpoint: 'POST /internal/api/observability/slos/_inspect 2023-10-31',
endpoint: 'POST /internal/observability/slos/_inspect',
options: {
tags: ['access:slo_write'],
access: 'public',
access: 'internal',
},
params: createSLOParamsSchema,
handler: async ({ context, params, logger, dependencies, request }) => {
@ -455,7 +455,7 @@ const findSLORoute = createSloServerRoute({
});
const findSLOGroupsRoute = createSloServerRoute({
endpoint: 'GET /internal/api/observability/slos/_groups',
endpoint: 'GET /internal/observability/slos/_groups',
options: {
tags: ['access:slo_read'],
access: 'internal',
@ -475,7 +475,7 @@ const findSLOGroupsRoute = createSloServerRoute({
});
const getSLOSuggestionsRoute = createSloServerRoute({
endpoint: 'GET /internal/api/observability/slos/suggestions',
endpoint: 'GET /internal/observability/slos/suggestions',
options: {
tags: ['access:slo_read'],
access: 'internal',
@ -528,6 +528,7 @@ const fetchHistoricalSummary = createSloServerRoute({
endpoint: 'POST /internal/observability/slos/_historical_summary',
options: {
tags: ['access:slo_read'],
access: 'internal',
},
params: fetchHistoricalSummaryParamsSchema,
handler: async ({ context, params, logger }) => {