Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

[Saviynt API] How to create an 'Application Data Import' type trigger using Saviynt APIs?

Uwaraj-Waman
New Contributor
New Contributor

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

5 REPLIES 5

sudeshjaiswal
Saviynt Employee
Saviynt Employee

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.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Hi @sudeshjaiswal 

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 -

Trigger_Error.jpg

Thanks and Regards,

Uwaraj Waman

dgandhi
All-Star
All-Star

HI 

Can you try with below?

"jobname": "SapImportJob",

Thanks

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.

sudeshjaiswal
Saviynt Employee
Saviynt Employee

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,

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Hi @sudeshjaiswal 

Yes, the job "Import_Acct_Github1" job exists and I can execute it from the UI.

Thanks,

Uwaraj Waman