Question

Submit data streaming job via the REST API.

  • 9 April 2020
  • 2 replies
  • 25 views

Userlevel 6
Badge +33

Server 2019. I try to submit a data streaming job via the rest api. This works partially now, as I get it running and finishing successfully but the published parameters don't come through. 

What I did was change the url from

https://<base url>/fmerest/v3/transformations/submit/<repository>/<workspace>.fmw

to

https://<base url>/fmeserver/streaming/fmedatastreaming/<repository>/<workspace>.fmw
and kept the json body like I do when submitting via the job submitter.

 

When I run it from the GUI in server I see the published parameters being added to the request as Form Data, but before I try to change the request to Form Data I would like to double check if the JSON way is not possible?

 

Thanks for looking.


2 replies

Badge +8

Hi @nielsgerrits, it seems to me you moved from the REST API (.../fmerest/v3/...) away to the direct URL (.../fmeserver/streaming/fmedatastreaming/...) interface. Direct URL does not support json, I believe. What you could do, however, you could pack your json body into a base64 string and send that as value on one parameter. The workspace has to pick up the parameter value and decode it back into json text, where you can flatten it to get back the original params in the json body. Not sure if that will work for large json bodies.

Userlevel 6
Badge +33

Hi @nielsgerrits, it seems to me you moved from the REST API (.../fmerest/v3/...) away to the direct URL (.../fmeserver/streaming/fmedatastreaming/...) interface. Direct URL does not support json, I believe. What you could do, however, you could pack your json body into a base64 string and send that as value on one parameter. The workspace has to pick up the parameter value and decode it back into json text, where you can flatten it to get back the original params in the json body. Not sure if that will work for large json bodies.

Thanks @helmoet, was not so sharp apparently. Working with the kids around is asking its toll. Will return feedback when checked.

Reply