Skip to main content
Question

Create web service

  • November 26, 2020
  • 3 replies
  • 19 views

Forum|alt.badge.img+1

Hi all;

 

I just started learning fme server. I want to create a web service using the rest api. I want to show the data in my database as json.

Is there a sample application? What are the fme server settings?

 

Thank you.

 

3 replies

david_r
Celebrity
  • November 26, 2020

You may want to look into the fmedatastreaming service, it will allow you to return the output of a webservice as e.g. JSON.

There are some examples here, based on the sample workspaces that are installed with FME Server, and that you can inspect in detail: https://docs.safe.com/fme/html/FME_Server_Documentation/ReferenceManual/Examples_data_streaming.htm

 


Forum|alt.badge.img+1
  • Author
  • December 2, 2020

Hi David;

Thank you for your help.

Some of my data is too much and I don't want to create them all at the same time for performance. I want to filter by giving parameters and bring in maximum 15 pieces of data each time. Can i do that What kind of path should I follow?

 

Thank you

 


david_r
Celebrity
  • December 2, 2020
ssisman06 wrote:

Hi David;

Thank you for your help.

Some of my data is too much and I don't want to create them all at the same time for performance. I want to filter by giving parameters and bring in maximum 15 pieces of data each time. Can i do that What kind of path should I follow?

 

Thank you

 

You would typically use a published parameter for the consumer to send e.g. the starting feature number (like a paging function), this can be send as a parameter in the URL.

In the workspace you can then filter the features based on this starting feature number, either using a WHERE-clause in the database or by using a combination of Sampler/Counter/Tester transformers.

The WHERE-clause is going to be much faster if there is a lot of data, however.


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