export type CreateApiApiV2DemJourneysInferredJourneyIdIgnoreArgs = {journey_id: string}; export type CreateApiApiV2DemJourneysInferredJourneyIdIgnoreOptions = {baseUrl?: string | undefined, apiKeyAuth?: string | undefined, appKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Ignore an inferred DEM journey * * POST /api/v2/dem/journeys/inferred/{journey_id}/ignore * * Also accepts auth: AuthZ */ export const createApiApiV2DemJourneysInferredJourneyIdIgnore = async (args: CreateApiApiV2DemJourneysInferredJourneyIdIgnoreArgs, options?: CreateApiApiV2DemJourneysInferredJourneyIdIgnoreOptions) => { const {baseUrl = "https://api.datadoghq.com", fetch: fetchFn = fetch, apiKeyAuth, appKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apiKeyAuth !== undefined) headers.set("DD-API-KEY", apiKeyAuth) if (appKeyAuth !== undefined) headers.set("DD-APPLICATION-KEY", appKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/api/v2/dem/journeys/inferred/${encodeURIComponent(String(args.journey_id))}/ignore${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };