Hi all,
Testing API Deployment for an automation script, I always get the error "Could not start script: no element linked to dummy id 1 (Router1)"
The script works fine when is executed from the Automation app, only when testing the API from Cube or Postman I get that error.
Thanks for any help provided.
Hi Edson,
As suggested by the thread initiated by Ruben, the issue is indeed caused by the 'EnableJson' option on the deployment. This is enabled by default and cannot be overridden in the Cube UI. This means only scripts with a single input parameter for the JSON are supported when deploying via Cube. If you want to deploy a script like yours, this will have to be done in code.
I already had a deployer script lying around that you can use. It has 4 parameters for the various options on a deployment. You'll have to reuse an existing token, the script does not make one for you. The input could look like this:
You can find the script XML here: https://github.com/Skyline-ThomasGH/DataMiner_ScriptExamples/blob/main/SLAPIDeployment_DeployerScript_NoJson.xml
Let me know if you run into issues.
Note that this implementation of custom APIs is in soft-launch and will be replaced in the very near future with a new implementation. This will require you to do changes to your scripts. Passing a dummy will not be supported in this first version. You will be able to use this old implementation for a while (at least until 10.4) before it is removed.
Hi Edson,
Getting the same error when replicating your script.
Don't have an immediate solution, but perhaps you could consider to not work with a script dummy at all, and just pass a json string in the body of the request with the element details, which can then be processed by the script. It will require some coding, but at least it's a way forward.
I wonder then if it will work when disabling the ‘enableJson’ flag during deployment of the script? Currently this flag is only configurable programmatically.
Perhaps someone from the development team can confirm…
Note that you can only use 1 script parameter as mentioned by Thomas in https://community.dataminer.services/question/api-deployments-parameters/