UPDATE some columns (ie PATCH)

This forum contains topics that were moved from Get Satisfaction
Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

UPDATE some columns (ie PATCH)

Post by Serhii Kulibaba »

Yes, it will work if you replace _id and myDBKey with real values

Michael Ochakovsky
Posts: 0
Joined: Thu Oct 17, 2019 2:56 am

UPDATE some columns (ie PATCH)

Post by Michael Ochakovsky »

My issue is passing the _id to the code dynamically. I have the _id saved to a storage variable named: 'myID', which I get from the 'me' service on successful login.

And there is no way to read the value of a LSV via server code, right?

Michael Ochakovsky
Posts: 0
Joined: Thu Oct 17, 2019 2:56 am

UPDATE some columns (ie PATCH)

Post by Michael Ochakovsky »

I am also having an issue with the list/quert service:

when the service run on update page load event, it fills the fields on the page but with the wrong data. How can this be set so that the list/query service only gets the data for _id or current user.

The custom collection containing users profile data is named: 'UserProfile'

I get the current user _id from the me service at successful login and store it in 'myID' LSV. How do I tell the list/query service to only retrieve the data belonging to 'myID'?

Thanks

Mike

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

UPDATE some columns (ie PATCH)

Post by Serhii Kulibaba »

It is pretty simple to do with a mapping from the Storage variable to the request parameter "_id" of the read service. Just add it to your page and see what parameters it has

Michael Ochakovsky
Posts: 0
Joined: Thu Oct 17, 2019 2:56 am

UPDATE some columns (ie PATCH)

Post by Michael Ochakovsky »

I got it working. I had the list, then query services, but then switched to a read service, and was able to get the data for the current user. Thanks

Unrelated issue: do I need to use the Appery 'Users' collection? Here is my issue:

  1. Can I store my user login details (username, password); provided in Appery by the 'Users' collection, and my user profile data; provided in my app by the
    'UserProfile' custom collection, and store it all on my external wix database? if yes how, if no why not?

  2. do I need to store app login details (username + password on the Appery database?

  3. what are the api calls cost associated with having the db hosted externally to appery vs internally in appery? (cost in this context means how it'll affect my app's allowed api calls per month).

    sorry for asking so many complex questions. I really appreciate your help.

    thanks

    Mike

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

UPDATE some columns (ie PATCH)

Post by Serhii Kulibaba »

  1. The user, created in the collection Users has a secure field "password" which is used in the login service to generate a token. If you use your custom collection - you will keep the password in the string value, this is an insecure solution. Also, you need to create your own login service
    1. It depends on your API and needs. If you already have a secure functionality, you can store it somewhere else. But we recommend create a secure API with Appery.io database https://docs.appery.io/docs/apiexpres...
    2. Please see the pricing page for that information: https://appery.io/pricing
Michael Ochakovsky
Posts: 0
Joined: Thu Oct 17, 2019 2:56 am

UPDATE some columns (ie PATCH)

Post by Michael Ochakovsky »

On your reply to (1), are you saying that I need to use Appery DB at least for login purposes, then store the rest of the data (registration) on any secure external db?

I like the platform; I am just concerned about the limited storage space, even in the enterprise package + the limited API calls..

Do you have a sample server code for calling an api for basic db operations (get, post, put, update..)

Mike

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

UPDATE some columns (ie PATCH)

Post by Serhii Kulibaba »

Sure, please see the documentation of our database API: https://docs.appery.io/reference#data...

Post Reply