Page 1 of 1

No resource method found for PATCH - while array update

Posted: Tue Jul 22, 2014 1:52 am
by Anil Sagar

I am trying to use 'patch' method for array update. Although the service test works fine for 'put' method, using patch gives the following error -

{
"status":"405 Method Not Allowed",
"url":"https://api.appery.io/rest/1/db/colle...",
"response":{
"code":"BCXX004",
"description":"No resource method found for PATCH, return 405 with Allow header"
}
}


No resource method found for PATCH - while array update

Posted: Tue Jul 22, 2014 8:43 am
by Kateryna Grynko

Hi Anil,

Do you get this error in service test or in a ready application?
Could you please post screenshots of service settings and test tab with the error?


No resource method found for PATCH - while array update

Posted: Tue Jul 22, 2014 10:01 am
by Anil Sagar

Hi Katya, I am doing this in service test first. Screen shots are attached.

Image

Image


No resource method found for PATCH - while array update

Posted: Tue Jul 22, 2014 2:16 pm
by Evgene Karachevtsev

Hello Anil,

You should use method "put" to update data in the database: http://devcenter.appery.io/documentat...


No resource method found for PATCH - while array update

Posted: Tue Jul 22, 2014 2:29 pm
by Anil Sagar

Put is not the most efficient method as it uploads the whole array back again into the DB. Incremental update like patch should be preferred. But if patch is not working fine then there is little choice.

I have raised another query regarding how to capture the whole DB array into local storage. Have not been able to do that yet. Once that is possible than I can push additional records locally and then update back the array into DB using put. Pls help on the other query then.


No resource method found for PATCH - while array update

Posted: Tue Jul 22, 2014 2:40 pm
by Evgene Karachevtsev

Anil,

in this case, you should either locally modify the data and record it in the database, or by using servercode