issue to extract ID of the user

Highlighted
Six Stars

issue to extract ID of the user

Hello,

I am working on tRest composant.I would like to pass my ID of the user dynamically so I have added a variable to get the ID of the user.

https://xxx.xxxx.com/api/3.6/sites/xxxxxxxxxxx/users/"fb25fcdd-1510-48a0-8def-85725687bb68"

 

Here I want to get just the ID without " ".I don't know what modifications I have to change on the parameter.

 

t1.PNGt2.PNG


Accepted Solutions
Highlighted
Six Stars

Re: issue to extract ID of the user

Hi,

I found the solution it was "+((String)).globalmap.get(("USERID"))+".

Actually its strange that the body part doesn't work in the same way.because when you want to pass a parameter you have to put a  backslash like this \"namexx \" but in the URL part you don't have to.

But any ways thanks for the solution proposed in the community.Btw the issue was not coming from URL.

I hope it can be useful for other people in the community.

Regards,

Manoj

View solution in original post

Tags (4)

All Replies
Highlighted
Community Manager

Re: issue to extract ID of the user

Can you post your URL code as text please? Alter any values you do not want shown to the rest of the world first. I believe your URL code may be slightly incorrect. It looks like you are almost there though.

Highlighted
Community Manager

Re: issue to extract ID of the user

Hi
From your image, I see you add double quotes in the URL and escape it, change it to:
"...users/"+(String)globalMap.get("USERID")

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Highlighted
Six Stars

Re: issue to extract ID of the user

Hi,

I found the solution it was "+((String)).globalmap.get(("USERID"))+".

Actually its strange that the body part doesn't work in the same way.because when you want to pass a parameter you have to put a  backslash like this \"namexx \" but in the URL part you don't have to.

But any ways thanks for the solution proposed in the community.Btw the issue was not coming from URL.

I hope it can be useful for other people in the community.

Regards,

Manoj

View solution in original post

Tags (4)

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 2

Part 2 of a series on Context Variables

Blog

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