export type GetApiDiV1ExperimentRunExecIdExecutionArgs = {exec_id: number}; export type GetApiDiV1ExperimentRunExecIdExecutionOptions = {baseUrl?: string | undefined, basicAuthToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Linkis Execution Method. * * GET /di/v1/experimentRun/{exec_id}/execution * * Also accepts auth: watsonAuthToken, watsonAuthTokenQuery */ export const getApiDiV1ExperimentRunExecIdExecution = async (args: GetApiDiV1ExperimentRunExecIdExecutionArgs, options?: GetApiDiV1ExperimentRunExecIdExecutionOptions) => { const {baseUrl = "https://di.prophecis.com", fetch: fetchFn = fetch, basicAuthToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (basicAuthToken !== undefined) headers.set("Authorization", basicAuthToken) const url = `${baseUrl.replace(/\/+$/, '')}/di/v1/experimentRun/${encodeURIComponent(String(args.exec_id))}/execution${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };