Hi,
We are running 11.3 version on Linux server.
I have a requirement to call a RestFul Webservice from DataStage and download the data from client in JSON format. For security reasons, call should be made using POST method rather than GET.
I tried to find documentation on using POST method to read data via WebServices using Hierarchial stage but could not find any such documentation using POST method.
Is this possible using Hierarchial Stage. If it is not, is they are other way to get this requirement fulfilled.
Appreciate your responses.
Hierarchial Stage - WebServices - POST to read data
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 296
- Joined: Sun Nov 16, 2008 7:41 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
GET reads, POST writes. It's basically as simple as that.
There are many examples for POST in the documentation of the REST API; you could profitably study those.
There are many examples for POST in the documentation of the REST API; you could profitably study those.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
As Ray notes, the "verb" you wish to use inside of the REST Step of the Assembly is something you select.....it is capable of doing most of the verb types. POST is also used for larger incoming payloads, so you will see it often on complex search scenarios that are "like" a simple GET, but sending up lengthy criteria.
....but a key here is practice. Go slow....for example:
a. run the REST service with JSON output from some kind of testing tool, or ask the service author for a sample response payload. Put it on disk. Read it from a file. Build the assembly with JSON Parser that reads it correctly and sends its pieces to an output link and review it downstream. NO REST step.
b. play with simple REST services. Call a service using GET. Send the resulting payload to an output link. The whole thing...just to make sure you get the "invocation" correct. First time, find and play with a service that has NO security requirements, except maybe basic ssl.
c. start putting them together......a REST step, followed by a JSON parser, etc..... never try doing them all at once until you have experience with each of them separately.
Ernie
....but a key here is practice. Go slow....for example:
a. run the REST service with JSON output from some kind of testing tool, or ask the service author for a sample response payload. Put it on disk. Read it from a file. Build the assembly with JSON Parser that reads it correctly and sends its pieces to an output link and review it downstream. NO REST step.
b. play with simple REST services. Call a service using GET. Send the resulting payload to an output link. The whole thing...just to make sure you get the "invocation" correct. First time, find and play with a service that has NO security requirements, except maybe basic ssl.
c. start putting them together......a REST step, followed by a JSON parser, etc..... never try doing them all at once until you have experience with each of them separately.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Re: Hierarchial Stage - WebServices - POST to read data
Found this on IBM Knowledge center see if this helps you:-
https://www.ibm.com/support/knowledgece ... ppost.html
https://www.ibm.com/support/knowledgece ... ppost.html
- Neelabh Barve
- We aspire! Universe Conspires!!
- We aspire! Universe Conspires!!