Skip to main content
Question

DataDownload opt_requesteremail don't work


giosp
Contributor
Forum|alt.badge.img+6
  • Contributor
Hi everybody,

I'm trying to call a datadownload service from a workbench with an HTTPCaller. All works perfectly: the call start the job on fme server and at the end I've the json response with the link and other parameters.

In my parameters from the HTTPCaller I've set the opt_requesteremail but no email are sent with the download link to the requester.

Anyone have tested it? I use fme 2018.1.0.3

 

I thought a workaround, but I like to use this parameter that made what I need...

 

Thanks for the support.

 

11 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • October 17, 2019

Do you have a topic to notifyon success/failure and an email subscription on that topic for the FME Server workbench?


giosp
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 18, 2019

No, I've tried it but the subscription send an email only if I specify the email in it. With this solution the opt_requesteremail is ignored... It don't send a meil to it. I'd like to be dynamic and send the link for the download at the requester: is an user of our administration.

In the email log I have this warning: Skipped sending email for subscription "DataDownload_Email_JobSuccess". No recipients were specified in subscription configuration or notification message.


giosp
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 18, 2019

I think I found the problem... I was sending a sync data download... With the async works.

 

UPDATE:Now the request is ok but when I send the call to the server the response is made in html... no json response. I've tried a lot of solution but I always an html response. If I use Advanced REST Client with same parameters works and I have a json response... If I use same parameters on httpcaller I have a html response.


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • October 18, 2019
giosp wrote:

I think I found the problem... I was sending a sync data download... With the async works.

 

UPDATE:Now the request is ok but when I send the call to the server the response is made in html... no json response. I've tried a lot of solution but I always an html response. If I use Advanced REST Client with same parameters works and I have a json response... If I use same parameters on httpcaller I have a html response.

Did you try setting the Accept header to application/json ?


giosp
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 18, 2019
jdh wrote:

Did you try setting the Accept header to application/json ?

Yes, in the header I have Authorization and Accept application/json, in the body a attribute with the parameters and the content-type to application/x-www-form-urlencoded .

I've tested the difference between httpcaller and ARC and the only difference is the useragent that in the httpcaller is set to FME...


giosp
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 18, 2019
giosp wrote:

Yes, in the header I have Authorization and Accept application/json, in the body a attribute with the parameters and the content-type to application/x-www-form-urlencoded .

I've tested the difference between httpcaller and ARC and the only difference is the useragent that in the httpcaller is set to FME...

The strange thing is that if I made my request by ARC all works perfectly and the mail notification come to my email box. If I run my httpcaller to do the datadownload the operation works but no mail come in my inbox with the link.


giosp
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 21, 2019

I create a workaround at the problem of the HTTPCaller request to the datadownload service: a python caller that do the request and work perfectly.

I don't understand why the same post request made with the httpcaller return a html response and don't send an email to the requester (async mode) but with curl return the json string and the email is delivered.


denniswilhelm
Contributor
Forum|alt.badge.img+11
giosp wrote:

I think I found the problem... I was sending a sync data download... With the async works.

 

UPDATE:Now the request is ok but when I send the call to the server the response is made in html... no json response. I've tried a lot of solution but I always an html response. If I use Advanced REST Client with same parameters works and I have a json response... If I use same parameters on httpcaller I have a html response.

You can also specify the format with "opt_responseformat=json".

See: https://docs.safe.com/fme/html/FME_Server_Documentation/ReferenceManual/service_datastreaming.htm


giosp
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 21, 2019
denniswilhelm wrote:

You can also specify the format with "opt_responseformat=json".

See: https://docs.safe.com/fme/html/FME_Server_Documentation/ReferenceManual/service_datastreaming.htm

Yes, thanks. I've tried a lot of configurations but nothing worked as expected.

Did you try the HTTPCaller to do what I try to do? Work by you?


denniswilhelm
Contributor
Forum|alt.badge.img+11
giosp wrote:

Yes, thanks. I've tried a lot of configurations but nothing worked as expected.

Did you try the HTTPCaller to do what I try to do? Work by you?

Which URL are you using? There are two APIs:

https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html#!/transformations/submit_post_29

and

https://docs.safe.com/fme/html/FME_Server_Documentation/ReferenceManual/service_datadownload.htm

The parameters are different.

I tried the HTTPCaller with the datadownload service which worked perfectly.


giosp
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 21, 2019
denniswilhelm wrote:

Which URL are you using? There are two APIs:

https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html#!/transformations/submit_post_29

and

https://docs.safe.com/fme/html/FME_Server_Documentation/ReferenceManual/service_datadownload.htm

The parameters are different.

I tried the HTTPCaller with the datadownload service which worked perfectly.

I'm using this url:

https://docs.safe.com/fme/html/FME_Server_Documentation/ReferenceManual/service_datadownload.htm


Reply


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