Forums

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

Confluence query created and lastModified datetime filter

Shreeniwas Sovani
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!
October 16, 2018

I'm trying to retrieve spaces modified after some date-time value using confluence query. But what I observed that the results are filtered only by date and not by time. Below is the cql query that I've executed using search API:

/search?cql=(type=space and lastModified > "2018-08-06 10:10") 

For the above cql query results are filtered only by the date value(2018-08-06) and not by the time value(10:10). I've refereed the CQL date formats mentioned here

Is this the expected behavior? Or is there any other way to filter results by date-time.

1 answer

0 votes
Rambabu Patina _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.
October 17, 2018

Hi @Shreeniwas Sovani,

Does the provided search API return any results?

The supported content types for the field type is:

  • page
  • blogpost
  • comment
  • attachment

Note: An advanced search (CQL) allows you to use structured queries to search for content in Confluence

I think for your requirement you can use /search?cql=(space.type=global and lastModified > "2018-08-06 10:10") to retrieve the list of contents which is modified after the specified time. Please try it and let us know how it goes.

Thanks,
Ram.

Shreeniwas Sovani
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!
October 17, 2018

Hi @Rambabu Patina _Appfire_,

We do get the spaces in the result with the cql query mentioned in the question. The only problem is that the results are not filtered by date-time value provided in query and they are filtered by only date.

The same behavior I've observed for page and blogpost objects as well.

The query that you have suggested to use gives me all space contents(pages,blogposts) and not just the spaces. Also the results are not filtered by date-time value provided.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events