Hi, is there a way in IAnalyticalBackend to get i...
# gooddata-ui
p
Hi, is there a way in IAnalyticalBackend to get insight details using insightId array in javascript?
d
Hi, I’m afraid there is currently no batch-oriented API for it (it is a good idea though, wdyt @Matyáš Kandl?). So currently, the best option you have is something like:
Copy code
import { idRef } from "@gooddata/sdk-model";

const ids = ["foo", "bar"];
const insights = await Promise.all(
    ids.map((id) => backend.workspace(WORKSPACE).insights().getInsight(idRef(id, "insight")))
);
👍 1