Skip to main content
Question

Submit data streaming job via the REST API.

  • April 9, 2020
  • 2 replies
  • 118 views

nielsgerrits
VIP
Forum|alt.badge.img+61

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

helmoet
Forum|alt.badge.img+8
  • April 9, 2020

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.


nielsgerrits
VIP
Forum|alt.badge.img+61

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.