Forums

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

Rest API searching returns old page title

wenjin.jia@bluescopesteel.com
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!
June 22, 2020

I am using Confluence REST API to search from our products help pages sitting in Confluence and displaying the page links and titles in our software products.

The query likes below.

atlassian.net/wiki/rest/api/content/search?cql=lastModified >= startOfYear() and type = page and space = MYSPACE and label = \"new\" order by lastModified desc";

However, after I updated our help pages yesterday, I found the REST API search returns the old page titles. When I click the link, it opens the correct page with correct page title. 

The query worked fine from last year but had problem from yesterday.

Does anyone know why it happens?

Regards,

1 answer

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

Hello wenjin.jia@bluescopesteel.com !

I tried replicating this issue but was ultimately unable to. Whenever I queried via REST, the correct page name.

Last test I ran used this query:

.atlassian.net/wiki/rest/api/content/search?cql=type=page%AND%space=MYSPACE

 

I ran the query before updating a page called “New Editor – Fabric”. This was the result:

Page

Screen Shot 2020-07-01 at 16.49.26.png

Query results

Screen Shot 2020-07-01 at 16.49.07.png

 

After I changed the page name to “New Editor – Fabric [UPDATED]”, I ran the same query again. Here are the results:

Page

Screen Shot 2020-07-01 at 16.49.57.png

Query results

Screen Shot 2020-07-01 at 16.55.40.png

 

 

 

With this in mind, I would like to understand if:

  1. This behavior is present when you run any other CQL query via REST.
  2. This behavior is present when using another browser to run the same query.

 

 

Let us hear from you!

wenjin.jia@bluescopesteel.com
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!
July 21, 2020

Hi Deigo, thank you for your replying.

This behavior is only present in some pages. Some pages work fine but some pages don't.

The query is run from my C# program, and I am using HttpWebRequest, and

UserAgent = "Mozilla/5.0 (Windows NT 5.1; rv:28.0) Gecko/20100101 Firefox/28.0". 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events