Skip to main content
Question

FME Server API - Multiple Dataset Download URL?

  • February 20, 2018
  • 8 replies
  • 43 views

oscard
Influencer
Forum|alt.badge.img+22

Good morning!

I have a workspace that creates a KML and a zip with SHAPE Files. I'm going to upload it to FME Server so the user can download those file easily.

Before doing anything I have checked the API documentation. The respone from a job looks like this:

result {
id (integer): Unique identifier for this job,
numFeaturesOutput (integer, optional),
priority (integer, optional),
requesterHost (string, optional),
requesterResultPort (integer, optional),
resultDatasetDownloadUrl (string, optional),
status (string, optional) = ['SUBMITTED', 'QUEUED', 'ABORTED', 'SUCCESS', 'FME_FAILURE', 'JOB_FAILURE' or 'PULLED']: Job success, failure, or other status,
statusMessage (string, optional),
timeFinished (string, optional),
timeRequested (string, optional),
timeStarted (string, optional)
}

The "resultDatasetDownloadUrl" is not an array, so that makes me think the Server will create just one URL. How does FME Server choose between my KML or ZIP file with SHAPES?

Is there a way to force FME Server to create two URL? Or should I add the KML to the ZIP file to have just one element to download?

The user is not going to access FME Server. I'm coding a .NET app for that.

I'm using FME Server 2017.

Thanks for any help provided.

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.

8 replies

david_r
Celebrity
  • February 20, 2018

I believe you can only associate one single writer with that functionality, if you need several writers per workspace I'd probably do it differently, e.g.

  • Define a custom shared resource, e.g. "OUTPUT" (Documentation)
  • In your workspace, write all the data to $(OUTPUT)/$(FME_JOB_ID).zip
  • In your application, you can then use the API to download each file, e.g. /fmerest/v3/resources/connections/OUTPUT/filesys/<job id>.zip

You should also define a cleanup task that deletes all the files in $(OUTPUT) after a certain time.


oscard
Influencer
Forum|alt.badge.img+22
  • Author
  • Influencer
  • February 20, 2018

I believe you can only associate one single writer with that functionality, if you need several writers per workspace I'd probably do it differently, e.g.

  • Define a custom shared resource, e.g. "OUTPUT" (Documentation)
  • In your workspace, write all the data to $(OUTPUT)/$(FME_JOB_ID).zip
  • In your application, you can then use the API to download each file, e.g. /fmerest/v3/resources/connections/OUTPUT/filesys/<job id>.zip

You should also define a cleanup task that deletes all the files in $(OUTPUT) after a certain time.

OK. You propose to ignore the URL that FME would create if I check the "Data Dowlonad Service" and use the URL of a repository created in the Server once the job is finished.

 

 

That would work. Thanks!

 

 


david_r
Celebrity
  • February 20, 2018
OK. You propose to ignore the URL that FME would create if I check the "Data Dowlonad Service" and use the URL of a repository created in the Server once the job is finished.

 

 

That would work. Thanks!

 

 

In fact, you could simply use a regular job submission service rather than the datadownload.

david_r
Celebrity
  • February 20, 2018
OK. You propose to ignore the URL that FME would create if I check the "Data Dowlonad Service" and use the URL of a repository created in the Server once the job is finished.

 

 

That would work. Thanks!

 

 

Submit a job: /fmerest/v3/transformations/commands/submit<repository>/<workspace>

 

Poll for status: /fmerest/v3/transformations/jobs/id/<job id>

 


oscard
Influencer
Forum|alt.badge.img+22
  • Author
  • Influencer
  • February 20, 2018
In fact, you could simply use a regular job submission service rather than the datadownload.
I will do that. Thanks :)

 

 


fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • February 20, 2018

Hi @oscard,

I just want to clarify that it is possible to register multiple writers with the Data Download Service. I'm not sure that's exactly what you want but I thought I should mention it. It will still include everything in one zip file.

 

If you wanted to though, you could use published parameters to control your workspace as to weather SHP, KML or both formats are included in the downloaded zip.

 


oscard
Influencer
Forum|alt.badge.img+22
  • Author
  • Influencer
  • February 21, 2018

Hi @oscard,

I just want to clarify that it is possible to register multiple writers with the Data Download Service. I'm not sure that's exactly what you want but I thought I should mention it. It will still include everything in one zip file.

 

If you wanted to though, you could use published parameters to control your workspace as to weather SHP, KML or both formats are included in the downloaded zip.

 

Thanks! I wasn't aware of the "Include Writers in Download" step.

 

 


oscard
Influencer
Forum|alt.badge.img+22
  • Author
  • Influencer
  • March 13, 2018

Hi @oscard,

I just want to clarify that it is possible to register multiple writers with the Data Download Service. I'm not sure that's exactly what you want but I thought I should mention it. It will still include everything in one zip file.

 

If you wanted to though, you could use published parameters to control your workspace as to weather SHP, KML or both formats are included in the downloaded zip.

 

My "Edit" buttons are grey out. Could that mean that my FME Server user doesn't have enough permissions?