Page 1 of 1

Hierarchial Stage - WebServices - POST to read data

Posted: Tue Jun 27, 2017 1:28 pm
by reachmexyz
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.

Posted: Tue Jun 27, 2017 2:51 pm
by ray.wurlod
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.

Posted: Wed Jun 28, 2017 4:59 am
by eostic
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

Re: Hierarchial Stage - WebServices - POST to read data

Posted: Fri Jun 30, 2017 6:08 am
by Neelabh
Found this on IBM Knowledge center see if this helps you:-

https://www.ibm.com/support/knowledgece ... ppost.html