Forums

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

How to resolve search issue while searching spaces using /rest/spacedirectory/1/search

Santwana Sarangi {Appfire}
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.
May 1, 2020

We are searching for spaces based on user inputs using /rest/spacedirectory/1/search rest endpoint. But it seems it is having trouble with searching when there is space in the user inputs.

I have created 3 spaces with the title as ntr - advise, ntr - w and ntr - win. When I am trying to search using ntr, I am getting all the three spaces. But when I am trying to search ntr - w, I am only getting spaces ntr - advise and ntr - win. I have also used the encodeUriComponent method to encode the search term. But this does not help. Also used /rest/api/search with cql, getting the same results.

Please help me with how to get the proper spaces from the user inputs.

1 answer

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 6, 2020

Hello @Santwana Sarangi {Appfire} !

As I understand, Confluence Space Search is not behaving as expected when used via REST API.

I would like to understand if Wildcards are involved in the search string itself. Is there any kind of wildcard combination being used?

 

One more thing that springs into my mind is when you said “proper spaces from the user inputs.”. What was meant by user inputs:

  1. Is it based on what the user does within Confluence?
  2. Is it based on what the user does within a specific macro?
  3. Is it based on what the user does within a specific page?

You can also take a look into our Developer documentation for REST and Search:

If you are aiming at Plugin development, our Developer Community is better suited to this kind of interaction:

 

Let us hear from you!

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence, marketing templates, confluence templates, marketing project management, content strategy, campaign planning, marketing collaboration, confluence for marketers, atlassian learning, marketing workflows, confluence best practices

5 must-use templates for Marketing teams (from a Confluence Marketer!) 👩🏻‍🎨

Who doesn’t love a good template? We sure do! Check out our top template picks for Marketing teams who want to streamline their processes, enhance collaboration, and take their marketing to new heights.

Read more 📚
AUG Leaders

Atlassian Community Events