Hi, i am currently trying to write a rest api request against the /content/search endpoint. In the cql section, you can specify a constraint to the creation date in the from
created > now("-3w") or created > "2015-06-10 14:30"
but i am not able to specify seconds in that constraint.
In JIRA the documentation states that milliseconds since epoch is used if the quotation marks are omitted. This does not seem to work in confluence.
Does anyone know how to specify an exact time stamp including seconds in cql?
Thanks for your help,
Lukas
Community moderators have prevented the ability to post new answers.
Unfortunately it doesn't seems like the standard search format allows for it.
However, after testing out a lot of things, I finally figured out how to do it, although it's not very pretty. I discovered that the "text" CQL field performs the exact same search as a regular search field (i.e. the search in the menubar). This means you can use the old Confluence search syntax, which allows you to search based to the second. Therefore, if you search for something like this:
text ~ "created:[20150610143026 TO 20151231]"
it will return all pages created later than 2015/06/10 14:30:26 GMT/UTC. You can keep adding numbers and it should go down to milliseconds too. Make sure you pay attention to the fact that you have to convert the search request to UTC time.
Thanks a lot for your support! Much appreciated!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.