Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I am pretty new to talend and has been trying to connect an API key as below to retrieve lead from a website.
However, i have been finding difficult to idetify the right information to input in my TrestClient (if tha'x the right component to use).
Show
> Example Request: curl https://api.wishpond.com/api/v1/leads/:lead_id \ -H "X-Api-Token:YOUR_API_KEY"
> Sample Response:
{ "lead": { "id": "xxxxxxx", "email": "someone@test.com", "status": "active", "created_at": "2015-07-xxxx", "updated_at": "2015-07-xxxxx", "lead_score": 0, "subscribed": true, "cid": "xxxxx", "mid": "263531", "dynamic_attributes": { "first_name": "xxxx", "last_name": "xxxxx" } } }
Thank you TRF,
Can you please precise if i should leave the path box empty with quote?
Thank you so much for you help.
So, if I understand you search to tgranslate from curl to tRestClient.
Based on your example, here is how the component should be configured:
- URL: https://api.wishpond/api/v1/
- HTTP Method: GET
- Content Type: JSON
- Accept Type: any
- Query parameters: leads (as name) - lead_id (as value - probably issued from a global variable)
- HTTP Headers (Advanced settings): X-Api-Token (as name) - yourApiKey (as value - probably issued from a global variable)
Probably not so far from what you need but you have to try by yourself.
Thank you TRF,
Can you please precise if i should leave the path box empty with quote?
Thank you so much for you help.
Tha'x right !
I made a mistake as i am new here.
However it jut stop working with UnknownHostException invoking https://api.wishpond/api/v1/?Leads=lead_id: api.wishpond