Hi Skyline Team
The API in DataMiner Automation added in 10.3.6.0 is interesting to me.
I tested it immediately.
I created a simple script to Pause and Start an element as Automation.
Created an endpoint in User-defined API
Of course, the token is created.
When I posted with Postman, it returned a 500 error.
I think this is a simple API that does not require an output, am I doing something wrong?
Hi Yuki,
We can see in the response that you get errorCode:12. This indicates the following:
AutomationActionError: An error occurred while trying to execute an Automation script action.
The full list of error codes can be found here: https://docs.dataminer.services/user-guide/Advanced_Modules/User%20Defined%20APIs/UD_APIs_Triggering_an_API.html
So it looks like your automation script has an error. My suggestion would be to look inside the C# Code of your automation script, and validate the code.
If you would like to have more information on the User-Defined API, this can be found here: https://docs.dataminer.services/user-guide/Advanced_Modules/User%20Defined%20APIs/Defining_an_API/UD_APIs_Defining_a_new_API.html
On the above link you'll find an example of a script that you can copy into your code.
Hope this helps you with debugging your issue.
Kind regards,
Thanks for the reply.
I read what was presented.
I understood that this is not a simple call to Automation, but an API that calls the C# code described in Automation.
Unfortunately, I no longer have use to this functionality as I am not in an environment where I can develop.
Additionally, I believe the root cause of the problem here is that your automation script was not built using a c# code block.
This Automation script needs the OnApiTrigger entry point method defined in a c# code block to function.