Controlling the WebService

I am working with two types of webservices.
One that feeds the main dashboard with live data repeatedly. It needs to update (HTTP GET) every X seconds while the page is visible and then stop when it is not.
The other is a user detail page that needs load once when the UserDetail page is displayed (HTTP GET) and then return the modified data to the server (HTTP POST).
I am finding that all the Webservice plugins read every 10 seconds, and I dont know how to stop/start them.
My questions:

  1. How to control the time period between updates (GET). I note the time slider in the GenericJSON plugin has been removed. I have tried setting the time programmatically but without much success.
  2. How to turn off repeating updates, so that the data updates only when requested?
  3. How to request a one-shot or single update for a webservice plugin
  4. How to post an update back to the server. I see no code in the WebService plugin.
    If I need to, I can implement my own direct HTTP POST code (in the “Update” button script) in the User Detail page. I just thought I would use your routines if they were available.
    Thanks.
  1. and 2. The generic JSON data plugin should contain interval setting for “refresh”. If you set it to 0 then it will not refresh until you e.g. click button with “Refresh Data sheet” interaction.

Juha will answer the rest of the questions.

Hi Kevin,

  1. for requesting data sheet update there’s Refresh data sheet interaction:

  2. JSON plugin actually has implementation for POST written by plugin’s writeReactWebCodeForDataSheetWriteOverrides method. The code it implements gets called in an exported project through Save Data interaction, i.e. if you add a new line to a data sheet it’ll send same data to a connected web service as well which can update its state accordingly. The implementation is not very versatile and it might not plug in to an existing web service very well so it might be better idea to try the custom implementation you mentioned.

-Juha