I am trying to create a Job from an api call to a DaaS system using the built in ResourceScheduling_Create Job script. I have run the script manually in the Cube application and it runs just fine, and I have set up the user defined api call and token, however when I run the api call using the same values for the parameters, it fails.
Method - POST
API link - https://<HOSTNAME>/api/custom/createJob
Body:
{
"Action": "Create",
"Job ID": "NEXT",
"Resource Pool ID": "Arena",
"Resource ID": "Video Playback 01"
}
Response:
{
"errors": [
{
"title": "Error occurred while handling the request, contact your admin with the provided errorCode and faultingNode ID.",
"detail": "Something went wrong, contact the system administrator.",
"errorCode": 12,
"faultingNode": 1019894
}
]
}
Alarm Response:
Element description Element name Element type Polling IP Protocol Parameter description Parameter Parameter key Value Time Root time Severity Severity duration Service impact Services RCA level Alarm type Status Owner User status Comment Source Alarm ID Root alarm ID Creation time Root creation time Category Alarm description Corrective action Component info Key point Offline impact Interface impact Interfaces View impact Views Element.Redundancy Type Element.Created Element.Created by Element.Modified Element.Modified by Element.Alarm template changed Element.Alarm template changed by Element.Trending template changed Element.Trending template changed by Element.State changed Element.State changed by Element.Feed Type Service.Created Service.Created by Service.Modified Service.Modified by
node-040257fb-4DataMiner AgentScript execution failureScript execution failureScript Failure (ResourceScheduling_Create Job): (Code: 0x80131500) Skyline.DataMiner.Net.Exceptions.DataMinerException: No method found in assembly (Script: ResourceScheduling_Create Job) matching the specified entrypoint (ID: OnApiTrigger)
at CManagedAutomation.RunEntryPointWrapped(CManagedAutomation* , Int32 iCookie, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn, String scriptName, tagVARIANT* pvarEntryPointResult)
at CManagedAutomation.Run(CManagedAutomation* , Int32 iCookie, Char* bstrScriptName, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn, tagVARIANT* pvarEntryPointResult) (CSharp; 0x80131500h):Today 12:30:26 PMToday 12:30:26 PMInformation12m 32s0None.None.NoneNew alarmClearedSystemNot AssignedAutomation Engine1019894/2100000000/2847/28471019894/2100000000/2847Today 12:30:26 PMToday 12:30:26 PMNo impact000
Hello Gunnison,
The error you pasted states that the ResourceScheduling_CreateJob script failed due to not having the OnApiTrigger. By default, User-Defined APIs look for an OnApiTrigger function when called. You can change it to use Run by editing the User-Defined API and switching the Method to be executed: 
For more information about this, here's the documentation: Using existing scripts | DataMiner Docs.
I hope this helped,
Bauti