Ravi Dommaraju Posted January 26, 2021 Posted January 26, 2021 Anyone using REST adopter We have a data science models available in GCP. My requirement is, I need to send a request along with some parameters and get the response to display in report. Can you share if you have any example Thanks for your help.
Manoj Chaurasia Posted January 26, 2021 Posted January 26, 2021 Hi RD Welcome to myibi. It is a great place to get answers to your development . REST adapters are very popular and once you set up a connection it behaves just like any other adapter where you can pass parameters with WHERE conditions. I dont have a current example but Im sure others can supply if necessary. What version of WebFOCUS are you using
Ravi Dommaraju Posted January 26, 2021 Author Posted January 26, 2021 Thanks Chuck for quick reply. we are in 8202M. Example will be great if you have any Which is the best Rest operation GET vs. POST If I use GET, I am not getting any response, our backend guys suggesting to use POST. as per documentation, POST will be used for inserts.
NYCBabak . Posted January 26, 2021 Posted January 26, 2021 First you have to configure the REST connection which at a minimum requires a Connection name and a BASE URL. I also assume theres security so youll need to set that up. Once the Connection is configured and you get a Successful Test, you can create metadata for the objects using GET. image.png1848693 48.3 KB Thats where you pick the URL Extension and provide Service Parameters. image.png1345790 35 KB Take a look at the doc here for the more esoteric requirements of the specific call you have to make.https://ecl.informationbuilders.com/rs_dms_7706_81/index.jsptopic=%2Fpubdocs%2FReportingServer%2FAdapter_Admin%2Fsource%2Ftopic428.htm
Ravi Dommaraju Posted January 26, 2021 Author Posted January 26, 2021 Thank you NYCBabak! Yes, I have configured adopter. see below. the connection was successful. image.png745250 12.9 KB I created metadata using same connection and specified all the input parameters. Did not given any value for service url extension as service name is included in base URL. see below. this step is failing due to below error. reached to backend guy who supports these services. he ask me to use Post operation instead of Get. If I use Post, not getting any response. image.png1130526 21.2 KB image.png896139 5.34 KB For Post Operation, I have given input parameters in Jason format under document sample. I can able to create metadata. image.png601747 21.1 KB but, not getting any response, instead getting below error. (FOC44540) Web Services Request got error. Response Status : 400 ; Reason: BAD REQUEST Let me know if I am doing anything wrong here. IB documentation is not clear on what to provide under Provide document sample
NYCBabak . Posted January 27, 2021 Posted January 27, 2021 Im not positive but Im pretty sure you need GET. Anyway, according to doc: If the method indicated is GET, then a GET or a POST may be used. If the method indicated is POST, then only a POST may be used. You may need to reach out to ibi tech support to see what they think.
Efrem Litwin Posted January 27, 2021 Posted January 27, 2021 It would be good to see the REST POST request that you want to send. Also, I notice that you dont have anything in Service URL Extension. And, its hard to see the entire input that you put in the BaseURL. Once you supply this, Ill be able to help. Also, I noticed that one screenshot is GET and then you have Document Sample of JSON input which is used in a POST. Are there 2 issues. Lets work with the one that you need working first.
Ravi Dommaraju Posted January 27, 2021 Author Posted January 27, 2021 Thanks Litwi! I have tried initially GET method, then I got the error. my webservice team asked me to use POST method instead, since that is the only method supported that particular API . I switched to POST method, still getting an error. I have verified regarding service URL extension with same team , they mentioned that, they don t have any extension. its only one end point which I have given in base URL. unfortunately I can not able to share my input parameters and end point here. Is there anyway I can send it to you privately Also, I am working with IB to resolve the issue. Thanks for your support. I will share details here If the issue get resolved.
Manoj Chaurasia Posted January 28, 2021 Posted January 28, 2021 RD - At the top right hand side of this page is a icon that looks like an envelope which can be a private message to Efrem
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now