Hello <@U029F0SJ8A0> it seems you are on the corre...
# gooddata-platform
Hello @Sebastiaan abbink spaink it seems you are on the correct path conceptually. Yes, the insights are represented as visualizationObjects in GoodData.CN, and the api endpoints you mention are the correct ones. However, if you use the GoddData.UI SDK, there is much easier way to go about this. There is a way in what we call an Analytical Backend object in the SDK to easily get, save, create and delete the insights (among other things) so that the code looks something like this
Copy code
import { IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
import { idRef, insightSetFilters } from "@gooddata/sdk-model";
// omitted for simplicity, the way to set up the bakcend object is sketched at <https://sdk.gooddata.com/gooddata-ui/docs/cloudnative_integration.html#step-3-set-up-analytical-backend-and-integrate-it-into-your-application>
const backend: IAnalyticalBackend = null;

const insight = await backend.workspace(WORKSPACE_ID).insights().getInsight(idRef(INSIGHT_REF));

const insightWithChanges = insightSetFilters(insight, FILTERS); // for example, you can modify the insight as you wish

const savedInsight = await backend.workspace(WORKSPACE_ID).insights().createInsight(insightWithChanges);
For all the methods available for the insights, you can either use your IDE (it should show you the options in the automatic suggestions) or if you prefer static API reference, it is available here. Hope this helps!