Forums

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

API query for lastModified returns every page

Steve Suranie April 2, 2021

When I call this endpoint: 

https://wiki.xxxxxxxxx.com/rest/api/content?&lastModified%3E=now(-2)&type=page&limit=2000

 

I know my results should not be more than 10-15 pages but I am getting every page on our site back in the results. 

 

Any idea of where I am going wrong with this call? 

2 answers

1 accepted

1 vote
Answer accepted
Steve Suranie April 6, 2021

Hey Kurt, 

 

This seemed to work for me: 

https://wiki.xandr.com/rest/api/content/search?cql=lastModified%3E2021-03-11

I received an error when I used your formatting: 

{

statusCode: 400,

    data: {

        authorized: false,

        valid: true,

        allowedInReadOnlyMode: true,

        errors: [ ],

        successful: false

},

        message: "Could not parse cql : lastModified%3E=now(%22-2d%22)",

        reason: "Bad Request"

}

0 votes
Kurt Klinner
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.
April 2, 2021

@Steve Suranie 

 

Hi Steve

based on

https://developer.atlassian.com/server/confluence/advanced-searching-using-cql/

it should be more like 

http://myhost:8080/rest/api/content/search?cql=lastModified>=now("-2d")

 

the cql= needs to be embedded

 

Cheers

Kurt

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events