Cloud Development Kit

WebApi calls in myscript-text-web

Latest pricing seems to be really nice and welcome change. However, I was going through the myscript-text-web demo online. I can see that multiple REST calls are being made after every keystroke by the end user. How do I control the number of calls?

Can you please point me to a setting through which the developer has control over triggering Web Api calls?

1 Comment

Dear Shyamal Parikh,

Currently, you can have more information at the pricing page on our developer portal (open the "What counts as a request?" tab)

Basically, as you can see in our documentation, for the CDK, you can use 2 APIs, the REST and WebSocket (WS):
-In WebSocket (default mode, <myscript-text-web protocol="WebSocket" ...></myscript-text-web>), a request is counted only when the first stroke is opened in a websocket connection.
-In REST (<myscript-text-web protocol="REST" ...></myscript-text-web>), a request is counted each time you call the server. In the webcomponent the call is made after a timeout. The time counter starts when user stops writing and is reseted each time he starts writing again.

On your side, can you confirm the API you are using? Is it possible to have a screenshot of what you are seeing? It is indeed surprising you see many calls of the REST API.

Best regards,

Login or Signup to post a comment