Insert Device collection from Appery DB Oracle DB

This forum contains topics that were moved from Get Satisfaction
Anim
Posts: 0
Joined: Fri Jul 03, 2015 10:45 am

Insert Device collection from Appery DB Oracle DB

Post by Anim »

Hi,

I am trying to Insert data from Device collection in Appery to a table in Oracle.
The API I am using is 'https://api.appery.io/rest/push/reg/?...": "337355050748596;2d852dc4b1598a92"}', everytime I do this and I getting error as below:
{"code":"BCXX004","description":"No resource method found for GET, return 405 with Allow header"}

I have provided Appery APP and DB ID as we did for other collections. Other collections works fine but not the device collection.

I want to query Device collection based on Created Date or Updated Date not on base of Device ID.

-Vibhu

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Insert Device collection from Appery DB Oracle DB

Post by Evgene Karachevtsev »

Hello Vibhum

Sorry, I'm not sure I understand you correctly, could you please clarify do you use API Express to connect your app with db?

Anim
Posts: 0
Joined: Fri Jul 03, 2015 10:45 am

Insert Device collection from Appery DB Oracle DB

Post by Anim »

Hello Evgene,

No, I do not use API Express.
I use traditional REST service to link all my collections to Oracle DB, including Users and Files. Now I'm trying to link 'Devices' collection. I need to read the collection to Oracle DB using GET request. In other collections, I only need to provide Database-Id in the request header. For Devices collection I've provided App-Id as well, but I'm getting this in response
{"code":"BCXX004","description":"No resource method found for GET, return 405 with Allow header"}

When I used codehttps:&#47;&#47;api&#46;appery&#46;io/rest/push/reg/<deviceID>/code url, it worked, but I do not want to read by deviceID, I want to ready by _createdAt column. (so it will read multiple objects in one request).

I tried the following query in Appery query space and it worked :
code{"_createdAt" : {"$gt" : {"$date":"2015-07-10T10:42:06&#46;828Z"} }}/code

But when I tried it in Oracle as follows:
codehttps:&#47;&#47;api&#46;appery&#46;io/rest/push/reg/?where={"_createdAt" : {"$gt" : {"$date":"2015-07-10T10:42:06&#46;828Z"} }}/code

or

codehttps:&#47;&#47;api&#46;appery&#46;io/rest/push/reg/?where%3D%7B%22_createdAt%22%20%3A%20%7B%22%24gt%22%20%3A%20%7B%22%24date%22%3A%222015-07-10T10%3A42%3A06&#46;828Z%22%7D%20%7D%7D/code

It returned the following resposne:
code{"code":"BCXX004","description":"No resource method found for GET, return 405 with Allow header"}
/code

Anim
Posts: 0
Joined: Fri Jul 03, 2015 10:45 am

Insert Device collection from Appery DB Oracle DB

Post by Anim »

Hello,

Any updates on this.

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

Insert Device collection from Appery DB Oracle DB

Post by Alena Prykhodko »

Hello Anim,

Not yet, we'll post an update as soon as possible.

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

Insert Device collection from Appery DB Oracle DB

Post by Yurii Orishchuk »

Hi Vibhum,

You can get details about goal device(by id) with following CURL:

pre

curl -X GET \
-H "Content-Type: application/json" \
-H "X-Appery-App-Id: e51f973c-aad9-4102-9f39-349c25264277" \
https:&#47;&#47;api&#46;appery&#46;io/rest/push/reg/356062053530044%3B9ec5fd0c3ade6681

/pre

Unfortunatly you can not make queries (get several devices) cause of push API limitation. So only way is to get all items by theirs id.

Please read more about push api here: https://devcenter.appery.io/documenta...

Regards.

Post Reply