Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

API runJobTrigger returns 500 Internal Server Error

oscar-am
New Contributor III
New Contributor III

Hello!

I am trying to run the /v5/runJobTrigger endpoint with the following body:

 

 

 

{
    "jobgroup": "DATA",
    "triggername": "ActiveDirectory_Accounts_Import_Full",
    "jobname": "ApplicationDataImportJob",
    "createJobIfNotExists": "false"
}

 

 

 

I found the values for these in the ecmimportjob table in Saviynt: 

Screenshot 2024-03-19 at 16.38.43.png

Full screenshot from Postman:

Screenshot 2024-03-19 at 16.41.14.png

What could be the issue?

25 REPLIES 25

dgandhi
All-Star
All-Star

Can you try {{path}} - Use api/v5

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.

oscar-am
New Contributor III
New Contributor III

Thanks for your reply, The full url path is set up correctly.

{{base_url}} in my case is a variable, and it contains everything i.e., https://mycompany.saviyntcloud.com/ECM/api

So that is not the issue I think.

CR
Regular Contributor III
Regular Contributor III

it should be like below auth and url

CR_0-1710868016547.png

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

oscar-am
New Contributor III
New Contributor III

Yes, I have authorization set up correctly, and the path is also correct.

{{base_url}} in my case is a variable, and it contains everything i.e., https://mycompany.saviyntcloud.com/ECM/api

rushikeshvartak
All-Star
All-Star

ECM keyword missing in url 

{{URL}}/ECM/{{path}}/runJobTrigger

Refer https://forums.saviynt.com/t5/identity-governance/how-to-run-job-trigger-via-rest-api-correctly/m-p/...


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

{{base_url}} in my case is a variable, and it contains everything i.e., https://mycompany.saviyntcloud.com/ECM/api

So that is not the issue I think.

There should be v5 also

Please share curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Yes the v5 is there as shown in the screenshot.

Here's the curl command:
curl --location 'https://****.saviyntcloud.com/ECM/api/v5/runJobTrigger' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer *****; token_type=Bearer; user_name=***' \
--data '{
"jobgroup": "DATA",
"triggername": "ActiveDirectory_Accounts_Import_Full",
"jobname": "ApplicationDataImportJob",
"createJobIfNotExists": "false"
}'

{
"jobgroup": "DATA",
"triggername": "ActiveDirectory_Accounts_Import_Full",
"jobname": "SapImportJob"
}

job name is wrong please fix


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Tried changing jobname to "SapImportJob" and I'm getting the following response:

oscaramelin_0-1710929933517.png

 

Job Name is not correct/exists in system / Are you connecting to correct instance ?


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

I think so... according to other forum posts it seems like I have the correct values. Even tried creating a Account Import (Single Threaded) as I saw that Multi Threaded was not supported for the API. 

Will raise a ticket, thanks for all your help!

Check logs

rushikeshvartak_0-1711078270425.png

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

oscar-am
New Contributor III
New Contributor III

I can add that running this POST request to the same endpoint works:

oscaramelin_0-1710919913543.png

So I think I might have wrong jobgroup or triggername or jobname. 

CR
Regular Contributor III
Regular Contributor III

think so you added v5 right, and mismatch group.

anyway you got the solution, Great thank you..!


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

oscar-am
New Contributor III
New Contributor III

My original problem statement still stands, but maybe I should rephrase myself. How do I find the correct attributes:

jobname, jobgroup, triggername

CR
Regular Contributor III
Regular Contributor III

above your 1 statement query is right , am using same and used result in payload nd getting status '200'.

try below query check analytic report any diff above field name

select qt.trigger_name,qt.job_name,qt.job_group from qrtz_cron_triggers qcr inner join qrtz_triggers qt on qt.trigger_name=qcr.trigger_name

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

oscar-am
New Contributor III
New Contributor III

Running your command I get:

oscaramelin_0-1710922380587.png

Which is the same as running it in the data analyzer on table ecmimportjob:

oscaramelin_1-1710922422325.png

So I am still stuck with the values:

{
"jobgroup": "DATA",
"triggername": "ActiveDirectory_Accounts_Import_Full",
"jobname": "ApplicationDataImportJob",
"createJobIfNotExists": "false"
}
 
which results in 500 response 😞 Is this a bug on Saviynts side or something else?
oscaramelin_2-1710922475032.png

 

PremMahadikar
Regular Contributor III
Regular Contributor III

Hi @oscar-am ,

 
Its working for me, can you try below:

 

{
"jobgroup": "DATA",
"triggername": "ActiveDirectory_Accounts_Import_Full",
"jobname": "SapImportJob"
}

 

If this reply answers your question, please consider selecting Accept As Solution and hit kudos.

Don't see how that's relevant since we have a different jobname. Maybe I'm failing to understand what's needed.

Jobname is internal category of jobs


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

CR
Regular Contributor III
Regular Contributor III

yes as per schema name it should work, my system it working. re-import api dump and check it.


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

oscar-am
New Contributor III
New Contributor III

What do you mean with "re-import api dump and check it", thanks

CR
Regular Contributor III
Regular Contributor III

Saviynt Api re-configured or just dump saviynt api document to your postman set again env nd check it


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.