Page 1 of 1

PUT method - how do I update values in my Tiggzi database using user inputs?

Posted: Fri Oct 26, 2012 9:27 am
by Melvin Tan Gim Huat

Hi,

I am creating a REST service to update values in my Tiggzi database based on user inputs. I understand that this requires the PUT method.

However, I am not sure what I should specify for the URL, request parameters and response parameters when setting up the REST service.

I have not been able to find any tutorials, documentation or examples to guide me.

Can someone please advise?
Thanks.


PUT method - how do I update values in my Tiggzi database using user inputs?

Posted: Fri Oct 26, 2012 10:35 am
by Maryna Brodina

Hello! Please take a look at the screenshot

Image

red - service URL
blue - request parameter

Here is how to define the service

Image

Here is the result after test

Image

name - it's just the name of column where I want to update the value


PUT method - how do I update values in my Tiggzi database using user inputs?

Posted: Fri Oct 26, 2012 12:46 pm
by Melvin Tan Gim Huat

Thanks Marina.
This example works but does not have much flexibility.

I need this REST service to be dynamic, therefore, I cannot simply specify the service URL with just one object ID. How can I set the object ID dynamically?

For e.g., Users can choose to vote for different items (hundreds or thousands) in my app. Whenever an item gets a vote, I want to update its number of votes in the database. Hence, the need for this REST service to be dynamic.

Appreciate your help.


PUT method - how do I update values in my Tiggzi database using user inputs?

Posted: Fri Oct 26, 2012 1:32 pm
by Maryna Brodina

You can send object Id as request parameter (name it Id), map that parameter to Local Storage variable, save in local storage Object Id and invoke the service.


PUT method - how do I update values in my Tiggzi database using user inputs?

Posted: Fri Oct 26, 2012 2:30 pm
by Melvin Tan Gim Huat

I understand the concept but it is the syntax that I can't get right.
I already have the object ID saved as a local storage variable from an earlier GET service so I can use it.

But, what do I specify as the service URL in this PUT service?
]https://api.tiggzi.com/rest/1/db/coll...? FYI, "thoughts" is the name of the collection.

This doesn't work. I tried a few other variations but they didn't work either.

Appreciate if you can list out the steps from setting up the dynamic PUT service to the mapping required to make it work.


PUT method - how do I update values in my Tiggzi database using user inputs?

Posted: Fri Oct 26, 2012 4:39 pm
by Melvin Tan Gim Huat

I've figured out the correct service URL to use.


PUT method - how do I update values in my Tiggzi database using user inputs?

Posted: Tue Apr 23, 2013 5:29 am
by dccshazam

I have an App I want to build, but I do not know how to use this product, HTML, JS well enough to build the app. I have the layout done, just not the backend. Anyone able to help?


PUT method - how do I update values in my Tiggzi database using user inputs?

Posted: Tue Apr 23, 2013 5:51 am
by Maryna Brodina

Hello! Please visit our docs site http://docs.appery.io/, there you can find a lot of information and many ideas on how to build your app. Please let us know if you have any specific question.


PUT method - how do I update values in my Tiggzi database using user inputs?

Posted: Sat Jul 06, 2013 7:34 pm
by The Herb Keeper

can you post the correct URL to use when pulling objectID from local storage to put in a dynamic URL? I have the same issue, and have used ObjectID from local storage to request, to no avail.


PUT method - how do I update values in my Tiggzi database using user inputs?

Posted: Sat Jul 06, 2013 10:20 pm
by maxkatz