Page 1 of 3

Updating the Device Collection

Posted: Wed Jun 15, 2016 1:58 pm
by Logan Wells

Hi there,

In the push tutorial, it talks about updating the device, but where can I update the channels for the device?
https://devcenter.appery.io/tutorials...

I went here:
https://devcenter.appery.io/documenta...

However, this is confusing for me because it does not like the REST service I am used to using, or like an update service.

How do I make a service that updates the device collection so I can put in channels?

Thank you so much,

Logan


Updating the Device Collection

Posted: Wed Jun 15, 2016 3:39 pm
by Serhii Kulibaba

Hello,

Please create a REST service with method=PUT for that request: https://devcenter.appery.io/documenta...


Updating the Device Collection

Posted: Wed Jun 15, 2016 4:15 pm
by Logan Wells

Hi Sergiy,

I created the REST service, here are the settings:

Image

And here is the REQUEST tab:

Image

However, I do not know what to put in the RESPONSE tab, so this is what happens when I run the test:

Image

How does it look this far?

Thanks so much,

Logan


Updating the Device Collection

Posted: Thu Jun 16, 2016 7:25 pm
by Serhii Kulibaba

You use incorrect URL in that service: Image

Please change it to:
prehttps://api.appery.io/rest/push/reg/{deviceID}/pre


Updating the Device Collection

Posted: Thu Jun 16, 2016 8:18 pm
by Logan Wells

Ok, I just changed the URL, and now I am getting a different error, although I think it is very close to being right:

{
"status":400,
"uri":"https://api.appery.io/rest/push/reg/F...",
"response":{
"code":"PNDU002",
"description":"app id not specified"
}
}

Is this OK? Or should I change the URL again so it specifies the app id?

Thank you so much,

Logan


Updating the Device Collection

Posted: Fri Jun 17, 2016 4:30 pm
by Serhii Kulibaba

Please add a header parameter "X-Appery-App-Id" with a GUID of your application.
Here is an example of the GUID:
Image


Updating the Device Collection

Posted: Sun Jun 19, 2016 1:28 am
by Logan Wells

Alright, I added that and tested the service again, but it gave a 404 error for the deviceID, and I think it is because the REST service is not connected to the correct DB?

Should the service URL be connected to the URL of the DB?

Thanks so much,

Logan


Updating the Device Collection

Posted: Tue Jun 21, 2016 6:41 am
by Serhii Kulibaba

Please show us a request data from the network tab of that service, e.g.: https://developer.chrome.com/devtools...


Updating the Device Collection

Posted: Tue Jun 21, 2016 11:36 am
by Logan Wells

Ok, here is the screenshot:

Image

Thank you so much,

Logan


Updating the Device Collection

Posted: Tue Jun 21, 2016 1:06 pm
by Serhii Kulibaba

I need to know REQUEST data, not RESPONSE.