Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

API query for lastModified returns every page

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

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"

}

@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
Community showcase
Published in Confluence Cloud

🎨 Add some visual life to your templates

Hi Atlassian Community, My name is Avni Barman, and I am a Product Manager on the Confluence Cloud team. Based on feedback from you, we are giving admins more power to create templates that a...

159 views 1 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you