null로 저장되게 성공시킴
This commit is contained in:
@@ -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!;
|
||||
}
|
||||
|
||||
/**
|
||||
* 지원되는 인증 타입 목록
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user