Skip to main content
Solved

Hiding data download URL from Workspace/Server app result

  • October 24, 2023
  • 1 reply
  • 35 views

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

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.

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.

1 reply

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • 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.