04/14/2023 01:33 AM
Hi,
I am trying to create a new trigger of type 'Application Data Import (Single Threaded)' using Saviynt APIs. I am referring the API documentation available at Saviynt Security Manager API Reference v2021.0/Summer Release (getpostman.com)
The sample payload in the documentation only covers few 'utility' type jobs so I tried following payload with POST request to 'createUpdateTrigger' endpoint -
{
"triggers": [
{
"triggername": "Import_Acct_Github",
"jobgroup": "data",
"jobname": "ApplicationDataImportJob",
"system": "GitHub",
"cronexpression": "0 15 10 * * ? 2099",
"externalconnection": "GitHub",
"jobtype": "Full Import",
"importtype": "Accounts",
"valuemap": {
"jobnamelabel": "Application Data Import (Single Threaded)",
"updateUser": "uwaman",
"jobtriggername": "Import_Acct_Github"
}
}
]
}
But I am receiving "412" response with following message -
{
"msg": "Error saving Import_Acct_Github4,",
"errorCode": "1"
}
Can someone please point out if anything is wrong with the request OR share a working sample of the API request to create such a trigger?
Thanks and Regards,
Uwaraj Waman
Solved! Go to Solution.
04/14/2023 01:45 AM
Hello @Uwaraj-Waman,
You can use the body below as a reference and customize it according to your specific needs.
[
{
"triggers":[
{
"valueMap":{
"CONNECTION":"AWS",
"connectiontype":"AWS",
"connectionid":8,
"securitysystems":10,
"fullorincremental":"full",
"accountsoraccess":"access"
},
"name":"SAVIYNTAWSACCESS-AWS",
"group":"GRAILS_JOBS",
"jobName":"ApplicationDataImportJob",
"jobGroup":"DATA",
"cronExp":"0 33 14 * * ? 2017"
},
{
"valueMap":{
"analyticsApplications":10
},
"name":"SAVIYNAWSANALYTICS",
"group":"GRAILS_JOBS",
"jobName":"AnalyticsJob",
"jobGroup":"Analytics",
"cronExp":"0 33 14 * * ? 2017"
}
]
}
]
Thanks.
04/14/2023 05:11 AM
Thank you for your suggestions. I tried following payload as per your suggestion but now getting "Status Code: 412, {"msg":"triggers not found","errorCode":"1"}".
Payload -
{
"valueMap": {
"CONNECTION": "GitHub-Recon",
"connectiontype": "GithubRest",
"connectionid": 13,
"securitysystems": 7,
"fullorincremental": "full",
"accountsoraccess": "account"
},
"name": "Import_Acct_Github1",
"group": "GRAILS_JOBS",
"jobName": "ApplicationDataImportJob",
"jobGroup": "DATA",
"cronExp": "0 15 10 * * ? 2099"
}
Also, as per logs, I cannot see any error in ecm or ecm-worker but I do see following in "ingress-nginx" logs -
Thanks and Regards,
Uwaraj Waman
04/14/2023 12:01 PM
HI
Can you try with below?
"jobname": "SapImportJob",
Thanks
04/17/2023 01:25 AM
Hello @Uwaraj-Waman ,
Please confirm if the job "Import_Acct_Github1" is created/present in the UI with the current configuration which you are trying to trigger.
Are you able to access the job from the UI and able to trigger it?
Thanks,
04/17/2023 01:33 AM
Yes, the job "Import_Acct_Github1" job exists and I can execute it from the UI.
Thanks,
Uwaraj Waman