Skip to main content
Solved

Hiding data download URL from Workspace/Server app result

  • October 24, 2023
  • 1 reply
  • 23 views

j.botterill
Influencer
Forum|alt.badge.img+36

Hi everyone, I have a workspace/server app which has a Data Download service published. It produces a downloadable zip file of the writer results. 

We a user clicks ok to run the server app and the status is completed, the data download url is shown. I have an Automation however which receives a topic and this triggers another workspace to send an email with the job details (rest api).

data_download_urlIs there a way to hide the above data download link URL and still create the url behind the scenes>

Best answer by daveatsafe

Hi @jamesb16otterill​,

You could move some of the process from the Automation to the workspace. Have the email workspace call the download workspace through a HTTPCaller POST, with the workspace parameters in the body:

DESC_NM=test&DT_NAME=NAD83&Datum=Yes&EPSG=&ESRIWKT=&GROUP=&Name=test&ORG_LAT=0&PARM1=-123&PROJ=TM&QUAD=1&SCL_RED=0.9996&SOURCE=&UNIT=METER&X_OFF=500000.0&Y_OFF=0.0&opt_servicemode=sync&opt_showresult=false&opt_responseformat=json

If you include the parameter 'opt_responseformat=json', the response will be a JSON package that includes the key serviceResponse.url, which will hold the download link. You can then repackage that link into the email body. I use this technique for the Define Custom Coordinate System web app.

View original
Did this help you find an answer to your question?

1 reply

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • Best Answer
  • October 27, 2023

Hi @jamesb16otterill​,

You could move some of the process from the Automation to the workspace. Have the email workspace call the download workspace through a HTTPCaller POST, with the workspace parameters in the body:

DESC_NM=test&DT_NAME=NAD83&Datum=Yes&EPSG=&ESRIWKT=&GROUP=&Name=test&ORG_LAT=0&PARM1=-123&PROJ=TM&QUAD=1&SCL_RED=0.9996&SOURCE=&UNIT=METER&X_OFF=500000.0&Y_OFF=0.0&opt_servicemode=sync&opt_showresult=false&opt_responseformat=json

If you include the parameter 'opt_responseformat=json', the response will be a JSON package that includes the key serviceResponse.url, which will hold the download link. You can then repackage that link into the email body. I use this technique for the Define Custom Coordinate System web app.


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