REST Client using POST JSON Arguments Containing Objects

Four Stars

REST Client using POST JSON Arguments Containing Objects

I'm trying to implement a REST API where the arguments contain a JSON object.

 

I've tried both tREST and tRESTClient without success.

 

Example :

{

   "SessionToken": "",

   "ClientToken": "",

    "AdditionalInformation" : {

        "StartDate" : "",

        "EndDate" : ""

    }

}


Accepted Solutions
Six Stars

Re: REST Client using POST JSON Arguments Containing Objects

Try with a tRest component, with http method post and place your json in the corps http

Don't forget to put the header : Content-Type = "application/json"

View solution in original post


All Replies
Nine Stars

Re: REST Client using POST JSON Arguments Containing Objects

Are you "implementing a REST API" or consuming a REST API?   tREST and tRESTClient are only for the latter.

 

What error are you getting?  Are you able to POST to the same web service using another tool like Postman?

--
Please give Kudos and mark topics as solved where appropriate.
Six Stars

Re: REST Client using POST JSON Arguments Containing Objects

Try with a tRest component, with http method post and place your json in the corps http

Don't forget to put the header : Content-Type = "application/json"

View solution in original post

Four Stars

Re: REST Client using POST JSON Arguments Containing Objects

Thank you! I must have done something wrong when I tried it previously.

 

Is there a way to use programmatic, instead of fixed, arguments?

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

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog