Deploying a WebService as a GET Method
![Niharika](https://us.v-cdn.net/6038102/uploads/defaultavatar/nLP0QHCLH24WL.jpg)
Niharika
New Altair Community Member
Hi,
I have created a web service for a process which gives prediction for the input using GET method.
![Image: https://us.v-cdn.net/6030995/uploads/editor/5k/263j1vf1l4qf.png](https://us.v-cdn.net/6030995/uploads/editor/5k/263j1vf1l4qf.png)
I have added URL query parameter as well while deploying the webservice.
![Image: https://us.v-cdn.net/6030995/uploads/editor/q6/8al6ktdzh5ip.png](https://us.v-cdn.net/6030995/uploads/editor/q6/8al6ktdzh5ip.png)
But when I am testing the webservice via POSTMAN I am not able to get the output .I am getting following error.
Where am I going wrong?I even tried by removing the macros from context panel but it didn't work.
I have created a web service for a process which gives prediction for the input using GET method.
![Image: https://us.v-cdn.net/6030995/uploads/editor/5k/263j1vf1l4qf.png](https://us.v-cdn.net/6030995/uploads/editor/5k/263j1vf1l4qf.png)
I have added URL query parameter as well while deploying the webservice.
![Image: https://us.v-cdn.net/6030995/uploads/editor/q6/8al6ktdzh5ip.png](https://us.v-cdn.net/6030995/uploads/editor/q6/8al6ktdzh5ip.png)
But when I am testing the webservice via POSTMAN I am not able to get the output .I am getting following error.
Where am I going wrong?I even tried by removing the macros from context panel but it didn't work.
Tagged:
0
Answers
-
Hi!
Your process is using two different types of inputs:
1. Process context macros (the GET parameters)
2. A process input (connected to Read Document)
This process expects you to provide a document (it can be HTTP POST or PUT) in the HTTP input. You are not providing that.
Also, you shouldn't post your Basic Authentication credentials to public forums ;-)
Regards,
Balázs1 -
Thanks @BalazsBarany for the screenshot mistake.
So what changes should I do to get the GET method working ?
0 -
Hi,
why is your Read Document connected to the process input? Do you expect data coming from there?
If you need input data, then you can't use the GET method. You should use POST or PUT with the document. You can still submit the additional parameters.
Regards,
Balázs1 -
Hi @BalazsBarany
Thanks for the help I was able to get my GET method working.I had replaced Read Document and JSON to data operator with Create ExampleSet and had set its parameters with incoming attributes and there macro values .
Thanks,
Niharika1