Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Syntax to call variable in a url

Bibin Mohan Kareethra August 18, 2021

Hi All ,

I am getting error while passing the value in the URL.

def projectID= 33587311

 

def http = new HTTPBuilder( 'https://bamboo-abc.com/rest/api/latest/permissions/deployment/${projectID}/groups/devops-business' )

 

 

Thanks & Regards

Bibin Mohan. K

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Joanna Choules
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 18, 2021

Hi Bibin,

What error are you getting? Note that Groovy only performs string interpolation on double-quoted strings and not single-quoted ones.

Regards,

Joanna Choules, Adaptavist Product Support

Bibin Mohan Kareethra August 18, 2021

Hi Joanna Choules,

It's working :)

 

 

Thanks & Regards

Bibin Mohan. K

TAGS
AUG Leaders

Atlassian Community Events