I'm looking for a way to use SSJS to retrieve results for various ImportDefinitions. I see that one could do it with API (here), but I'm not certain how that translates to SSJS.
Is there anything that would be something like the below? The below doesn't work in CloudPages and the "Write" does not give any results as to why it fails.
1 | <script runat=server>
2 | Platform.Load("core","1");
3 |
4 | var results = ImportDefintion.Retrieve({Property:"ImportDefExternalKey",SimpleOperator:"equals",Value:"ImportDefName"});
4 |
5 | Write(Stringify(results));
6 | </script>