null로 저장되게 성공시킴

This commit is contained in:
leeheejin
2025-11-28 14:45:04 +09:00
parent 652617fe37
commit 552beabdc0
5 changed files with 317 additions and 17 deletions

View File

@@ -192,6 +192,43 @@ export class ExternalRestApiConnectionAPI {
return response.data;
}
/**
* REST API 데이터 조회 (화면관리용 프록시)
*/
static async fetchData(
connectionId: number,
endpoint?: string,
jsonPath?: string,
): Promise<{
rows: any[];
columns: Array<{ columnName: string; columnLabel: string; dataType: string }>;
total: number;
connectionInfo: {
connectionId: number;
connectionName: string;
baseUrl: string;
endpoint: string;
};
}> {
const response = await apiClient.post<ApiResponse<{
rows: any[];
columns: Array<{ columnName: string; columnLabel: string; dataType: string }>;
total: number;
connectionInfo: {
connectionId: number;
connectionName: string;
baseUrl: string;
endpoint: string;
};
}>>(`${this.BASE_PATH}/${connectionId}/fetch`, { endpoint, jsonPath });
if (!response.data.success) {
throw new Error(response.data.message || "REST API 데이터 조회에 실패했습니다.");
}
return response.data.data!;
}
/**
* 지원되는 인증 타입 목록
*/