Question

Disable FME Server schedule using REST API

  • 12 December 2018
  • 3 replies
  • 5 views

Badge +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

Badge +16

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.

Badge +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.

Badge

You can also use the REST V2 API:

http://fmeserver/fmerest/v2/apidoc/#!/schedules/enabled_put_5

Reply