and more in a single search tool across platforms. Read the announcement here. |
02/16/2024 08:20 AM
How to use the Job Trigger API with Advanced query? The Saviynt API doesn't talk about it but is there a way we can run particular tasks like how we do from the UI?
To put it simply, how to do the below from the API
02/16/2024 10:12 AM
AFAIK , not possible
Thanks,
Amit
04/29/2024 10:29 PM
@SowmithriV - Yes this is possible, try below
API Call: {{url}}/ECM/{{path}}/runJobTrigger
Request Body:
04/30/2024 04:07 AM
hi @jsatish, I did try this and looks like it doesn't consider the advquery in the above JSON Body. It seems to process all the requests pending in that endpoint.
04/30/2024 06:32 AM
@SowmithriV - Is advanced query updated, when you edit the job. ?
04/30/2024 06:37 AM
@jsatish, There is nothing updated in the job. I want to update the advance query via the API.
Let me give you a context. We have Freshservice integration to look for the task number from the pending task(which they are able to) and provision that particular task by running the job via API too.
04/30/2024 06:48 AM
@SowmithriV - This is what i have used today, created the job and executed it manually. Everything worked fine.
createUpdateTrigger
04/30/2024 08:22 PM
05/02/2024 05:51 AM
Job is not update with the taskkey and hence there is no trace in the logs @rushikeshvartak
@jsatish , lemme try to see if the am able to update the job without having to create it.
05/02/2024 08:57 PM
Use below API
{{URL}}/ECM/{{path}}/createUpdateTrigger
curl --location "https://rushi-dev.saviyntcloud.com/ECM/api/v5/createUpdateTrigger" --header "Authorization: Bearer ey" --header "Content-Type: application/json" --header "Cookie: CCSRF-TOKEN=5a69f1c0-a517-4d82-a726-2d7bc90090e4; INGRESSCOOKIE=1714533700.461.195.179429|0f4091fceac04271d9e9e5a60a3d3e8f; JSESSIONID=D90EEF8DEBD35EB6FAC2AC5457E6095C; access_token=eyJ; token_type=Bearer; user_name=137658" --data "[
{
\"triggers\":[
{
\"valueMap\":{\"advquery\": \"and at.taskkey in (1,2,3,4)\"},
\"triggername\": \"Prov_Dev\",
\"group\": \"utility\",
\"jobname\": \"WSRetryJob\",
\"jobgroup\": \"utility\",
\"cronexpression\": \"0 33 14 * * ? 2060\"
}
]
}
]"
05/03/2024 06:07 AM
@rushikeshvartak @jsatish , I did try to update the Advance Query using Create and Update Trigger and when I checked the UI - Job Control, the Adv Query was updated. When I tried to run the Trigger, it again provisioned all the tasks in that endpoint. It did not process just the two tasks that I intended.
05/04/2024 08:10 AM
Its looks like your version issue i have validated in v24.4 Upgrade the version and validate
04/30/2024 07:06 AM
it's not ideal to create the job for each task right? Can we have the same adv query set up in the run "Run Job Trigger"?
Also will Create and Update Trigger, create a job and update it or can it only do Update on the job?
04/30/2024 12:39 PM
If the job already exist, it just updates the existing trigger. If it doesn't exists, it will create a new one.
I will test the runTrigger and confirm.