Hello Hawk,
We'll update here as soon as have solution.
Hello Hawk,
We'll update here as soon as have solution.
Hawk,
1) if you have collection like: [_id|name|property1|property2]
If you would like to update property2 for certain _id, then you don't need to set name and property1 with prev values.
2)you can update only by _id, but you can find any entity by whatever where parameter you would like.
3) Yes, to update Users collection you should fill session-token header for request.
You can obtain a session-token with login service
4) No, if you wouldn't set any _id then:
a) DB would know what entity exactly are you trying to delete
b) you get an error back for your request
so, yes you should get list of entities pick an id and use it to delete an entity from DB
4) Thanks Ihor, I need to know though how can I retrieve a session token from login service? I know how to use login service from the App builder. But since I'm using different DB now (Oracle), what kind or request should I send to Appery in order to get session-token in response ? Or is there any reference for this?
Many thanks,
Hi Hawk -
[quote:]what kind or request should I send to Appery in order to get session-token in response ?[/quote]
only Login service
pre
codecurl -X GET \
-H "X-Appery-Database-Id: 548a9dd8eXXXXX51aa8121f9" \
-G --data-urlencode 'username=<user_name>' \
--data-urlencode 'password=<user_password>' \
https://api.appery.io/rest/1/db/login/code/pre
Thanks Illya, I need to understand more:
does this mean in order to update every user I need to get a new session-token and I only can update the user I provided it's username and password in login service request? and in order to update a second user, I need to send login request with username and password for the second user and to get another session-token and then update it?
If that is the case, what if I do not know the password of that user and I need to reset that password? How can I do that If I cannot provide the password in login request?
Many thanks,
Hello,
[quote:]update every user I need to get a new session-token[/quote]
No, until token is not expired you can update any user entity.
operations"":{""$set"":{""Oracle_Flag"":""Y""}}}'; --content varchar2(4000) := '{""Oracle_Flag"":""N""}'; begin req := utl_http.begin_request(url
operations"":{""$set"":{""Oracle_Flag"":""Y""}}}';/pre But this: precontent varchar2(4000) := '{where: {""$and"":""[{\""Oracle_Flag\"": \""Y\""}""
{\""ToPull\"": \""Y\""}] }""
{\""ToPull\"": \""Y\""}] }""