Billy Williams
Posts: 0
Joined: Thu May 26, 2016 5:09 pm

api URL parameter dynamic

I have added the rest service and my REST url is
https://agwebv01.ag.utk.edu/silorest/...

i have added that as a request parameter and it even says that it will replace that in the url and not add as the GET parameter.
but in my code I have tried to set that id parameter

requestData.params.id = sessionStorage.getItem("PERNR");

but when it runs and tries to execute it. I can see in the browser console its trying to call

https://agwebv01.ag.utk.edu/silorest/...
instead of the proper

https://agwebv01.ag.utk.edu/silorest/...

how do i make this work?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

api URL parameter dynamic

Hello Billy,

Please send us screenshots of service settings and JS code, which you exactly use to execute that service

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

api URL parameter dynamic

It looks correct. Please provide us with a public app link (https://devcenter.appery.io/documenta...) and exact steps to reproduce this problem.

Billy Williams
Posts: 0
Joined: Thu May 26, 2016 5:09 pm

api URL parameter dynamic

http://appery.io/app/mobile-frame?src...

when you go there just type in "wil" for last name
click on the first one
in the console.log you will see where it makes the incorrect REST call

angular.js:10514 OPTIONS https://agwebv01.ag.utk.edu/silorest/...

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

api URL parameter dynamic

Please delete edited (blue colored) files on Source tab and click Undo all source changes on folder with edited files.

Please note that functionality added via Source tab will be lost and you would need to edit source files again in order to add it back, thus we would recommend that you save project backup before that.

[Here] (http://devcenter.appery.io/tutorials/...) is more information about Source files editing.

Billy Williams
Posts: 0
Joined: Thu May 26, 2016 5:09 pm

api URL parameter dynamic

ok i did that
now i get this in the URL

https://agwebv01.ag.utk.edu/silorest/...

its not dropping the {id} just changing it to %7Bid%7D

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

api URL parameter dynamic

What I'm doing wrong? Image
Please provice the URL, which you need to use exactly fo that request

Billy Williams
Posts: 0
Joined: Thu May 26, 2016 5:09 pm

api URL parameter dynamic

if i put in the id it should be https://agwebv01.ag.utk.edu/silorest/...

that

https://agwebv01.ag.utk.edu/silorest/...
the {id} should drop off when setting id = 208277

Return to “Issues”