Query Appery.io using Oracle APEX

This forum contains topics that were moved from Get Satisfaction
Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Query Appery.io using Oracle APEX

Post by Alena Prykhodko »

Hello Hawk,

We'll update here as soon as have solution.

Ihor Didevych
Posts: 0
Joined: Wed Nov 19, 2014 7:55 pm

Query Appery.io using Oracle APEX

Post by Ihor Didevych »

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

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Query Appery.io using Oracle APEX

Post by Hawk »

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,

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Query Appery.io using Oracle APEX

Post by Illya Stepanov »

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:&#47;&#47;api&#46;appery&#46;io/rest/1/db/login/code/pre

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Query Appery.io using Oracle APEX

Post by Hawk »

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,

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Query Appery.io using Oracle APEX

Post by Alena Prykhodko »

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.

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Query Appery.io using Oracle APEX

Post by Hawk »

operations"":{""$set"":{""Oracle_Flag"":""Y""}}}'; --content varchar2(4000) := '{""Oracle_Flag"":""N""}'; begin req := utl_http.begin_request(url

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Query Appery.io using Oracle APEX

Post by Hawk »

operations"":{""$set"":{""Oracle_Flag"":""Y""}}}';/pre But this: precontent varchar2(4000) := '{where: {""$and"":""[{\""Oracle_Flag\"": \""Y\""}""

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Query Appery.io using Oracle APEX

Post by Yurii Orishchuk »

{\""ToPull\"": \""Y\""}] }""

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Query Appery.io using Oracle APEX

Post by Hawk »

{\""ToPull\"": \""Y\""}] }""

Post Reply