Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

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?

29 REPLIES 29

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.

Raghu
All-Star
All-Star

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

{{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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

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. 

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

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

 

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

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

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

jsatish
Regular Contributor II
Regular Contributor II

@arushi2403 - Even i tried the same, but it's giving the same error. 

jsatish_0-1716775887021.png

If jobname = SapImportJob it's failing with trigger name not found. But triggername is valid

Regards,
SJ

Whats error in logs


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

jsatish
Regular Contributor II
Regular Contributor II

@rushikeshvartak  - Looks like issue is with 24.1. But the same is working fine in 24.4

jsatish_0-1716919840979.png

To add additional validation jobname will be "ApplicationDataImportJob" for "Application Data Import (Multi Threaded)" type and SapImportJob for "Application Data Import (SingleThreaded)"

Yes as mentioned it works after 24.4 +


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.