creating API - accepting query parameters from the request

Highlighted
Nine Stars

creating API - accepting query parameters from the request

Hi,

 

I have been trying to get a hand on apis and have a simple api deployed in localhost. I have designed the api to accept a parameter. But I don't receive the parameter right. Providing screenshots of my job

 

Screen Shot 2019-11-13 at 1.35.50 PM.png

I have a post request with a parameter 'jobName'Screen Shot 2019-11-13 at 1.35.41 PM.png

And passing a string to the response component.

Screen Shot 2019-11-13 at 1.35.58 PM.png

 

Screen Shot 2019-11-13 at 1.36.08 PM.png

 

Im trying to making the post request from POSTMAN like thisScreen Shot 2019-11-13 at 1.40.14 PM.png

 

But there is no response. There is also no error. whenever a request is made, the job shows 0 records processed. what is it that I'm not doing right here?

Screen Shot 2019-11-13 at 1.41.30 PM.png

Please provide me suggestions

 

Thanks in advance


Accepted Solutions
Nine Stars

Re: creating API - accepting query parameters from the request

I fixed it. I shouldn't have passed jobName as a query parameter but it is the endpoint itself.

So making the post request like this works

http://localhost:8088/updateStepInsertEvent/apidesign/

 

 

where apidesign is the value for jobName

View solution in original post


All Replies
Nine Stars

Re: creating API - accepting query parameters from the request

I fixed it. I shouldn't have passed jobName as a query parameter but it is the endpoint itself.

So making the post request like this works

http://localhost:8088/updateStepInsertEvent/apidesign/

 

 

where apidesign is the value for jobName

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog