Forums

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

Unable to get expected results with search api

Madanmohan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 11, 2020

Hi,

 

 I am using 'confluence/rest/searchv3/1.0/search?queryString=FileName'. 
[Referred: https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-get-the-id-of-an-attachment/qaq-p/518429].

its yeilded results in json format as expected in most of cases; but in some rare cases where exact filename is not found it gave results of closest matches which I dont want. 
Is there any option to avoid that;  like search for exact match or any options & also to check for filename in a particular page.

-Madan

1 answer

1 accepted

0 votes
Answer accepted
Madanmohan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 14, 2020

Search doesn't provide expected results all the time.
Instead its better to search attachment details using page level api calls to get require details.

e.g. curl -u user:pass -X GET "+URL+/confluence/rest/api/content?title=PageTitle&spaceKey=SPACE&expand=history"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events