1
votes

Domino REST API doesn't return any view data if I use date at query parameter "Keys". In case of Extension Library REST Control we can use NotesDateTime() or @Date() to make it work.

But I don't know how to use the same at Domino REST API call. Anybody knows how to use date as key?

This is the the sample url,

https://demodomain.com/demo.nsf/api/data/collections/name/viewName?sortcolumn=DateField&keys=1999-03-24T22:16:17Z

1
Can you give an example of how the content of your view column looks like?Steve Zavocki
Tell us what you tried because you should be able to use SSJS in for the keys, including the @ functions.Steve Zavocki
Thanks Steve, I want to clarify that I am not using extlib REST control here, I am trying to get data using DAS REST API. And this is how my view column content looks, ex: 01/01/2016Syed Hussain
Syed, thanks for clarifying. It looks like you have a good answer below. If that works for you, make sure you accept the answer by pushing the green check mark on the left.Steve Zavocki

1 Answers

2
votes

I looked at the source code for the Domino data service. The view entries resource (/{db}/api/data/collections/name/{view}) always assumes the keys parameter is a string. So apparently it's unable to match any value in a date column.

This behavior could be improved. Meanwhile, you could work around the limitation by creating a separate sort column with the TEXT representation of the same date. Use the new column name in the sortcolumn parameter and the view entries resource should be able find rows that match the keys parameter.