Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

When using the Confluence rest API, how can I use a uri with a question mark instead of %3F?

Alexis Evans
Contributor
December 16, 2022 edited

I am using a rest API call to confluence in the scripting language Groovy (using Adaptivist Scriptrunner for Jira). I am setting the uri path in the api call, but it includes a question mark so I can use parameters. When I run the code, at some point it replaces the ? with %3F, and then the api call doesn't return anything.

Is there a way to get the uri to use something other than percent encoding so the question mark goes through? Or is there another way to add parameters to the end of the url? For example, I have the url to our instance of confluence followed by /rest/api/content and then I want to add parameters after a question mark so the url is
/rest/api/content?title=page_title&spaceKey=KEY&expand=body.storage but after the code is run, it tries to access the url /rest/api/content%3Ftitle=page_title&spaceKey=KEY&expand=body.storage which obviously doesn't return anything. Any ideas?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events