Get data from GitHub using talend tRESTClient?

Four Stars

Get data from GitHub using talend tRESTClient?

Hi All, I'm trying to get the data from Github url using tRESTClient of Big Data Open Studio. But I got error. My job is, 1. tRESTClient 2. tXMLMap 3. tLogRow In tRESTClient, URL "https://api.github.com/users/sample/repos", HTTP Method "GET" and Accept Type "XML". When i trying to execute this job, I'm getting Error. Exception in component tRESTClient_1 javax.ws.rs.NotSupportedException: HTTP 415 Unsupported Media Type How can i resolve this issue?Even i added content type in advanced settings.
Ten Stars

Re: Get data from GitHub using talend tRESTClient?

I tested the same with the sample link you provided. The service is returning JSON, not XML.
Four Stars

Re: Get data from GitHub using talend tRESTClient?

I tried with Accept Type in JSON, But is giving NULL values.How can get the data? Is tXMLMap need to change anything?
Six Stars

Re: Get data from GitHub using talend tRESTClient?

Hi
I tried with Accept Type in JSON, it  is giving Response in XML format. i believe you need to check txmlmap configuration

Four Stars

Re: Get data from GitHub using talend tRESTClient?

I'm getting NULL values, when tired with JSON in Accept Type
Four Stars

Re: Get data from GitHub using talend tRESTClient?

This is my tXMLMap Detail
Six Stars

Re: Get data from GitHub using talend tRESTClient?

Hi Praksh,

there is one extra root element is coming from response please see my txmlmap configurationxmlmap.png 

Four Stars

Re: Get data from GitHub using talend tRESTClient?

I couldn't open your image.
Four Stars

Re: Get data from GitHub using talend tRESTClient?

Is this right way of mapping data using tXMLMap? I tried with tExtractJSONFields, but i'm getting this error. A JSONObject text must begin with '{' at character 1 of
Six Stars

Re: Get data from GitHub using talend tRESTClient?

can you check now

Six Stars

Re: Get data from GitHub using talend tRESTClient?

I don`t believe we can use tExtractJsonFields because the response in XML format. so we could use tXmlMap or tExtractXmlfields.