Skip to main content
Question

Disable FME Server schedule using REST API

  • December 12, 2018
  • 3 replies
  • 32 views

sunsilk11
Contributor
Forum|alt.badge.img+6

Hi I would like to disable the schedule in FME Server in the event of a job failure.

I am looking at https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html#!/schedules/update_put_3

which works but it seems that I have to update all the parameters in the schedule for this to work, rather than just the parameter "enabled".

I would like to set the request body as

{

"enabled": false

}

Has anyone manage to get this working by just setting enabled to false ?

3 replies

itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • December 12, 2018

Looking at the documentation shows that only a few parameters are not optional, these are the only ones you need to supply, I never tried it my self but I think you cannot just change only the enable tag.


Forum|alt.badge.img+2

Hi @sunsilk11,

As itay mentioned only a few parameters are optional. Instead what you could do is first use the GET response to read in the current schedule set up, then use a StringReplacer to change the "enabled":false to "enabled":true and then use a second HTTPCaller with the PUT request to upload the modified response.


Forum|alt.badge.img
  • December 13, 2018

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings