Search code examples
gooddata

Copy Insight through API


Is it possible to copy an insight through the API? I know it's possible to "save as new" an insight through the designer, but I would like to do so programmatically.


Solution

  • any insight is metadata object, so basically it should be enough to post the same body to metadata resource: address is /gdc/md/<project ID>/obj?createAndGet=true and body the same like the original one (you fetch it with GET to /gdc/md/<project ID>/obj/<your object ID> as visible in address bar.

    Those help pages might help (the principle is the same inside the project): Migrate objects between projects