At Red Pill Now, we have a strong belief that the future for Notes data lies in the ability to access the data via REST services. In their wisdom IBM have decided to make REST services available for all Notes databases using Domino Data Services. Unfortunately to get DDS to run it is necessary to manually enable it for each and every database and then for each and every view for which REST services are needed. Because Red Pill Now is developing solutions that surface hundreds or thousands of Notes databases inside a Web portal based upon the use of REST we needed a faster way to do this. So I reverse engineered the effect of the manual changes to develop an automated approach for turning DDS off and on for an entire portfolio of Notes databases.
The first step is to enable DDS for the specific database. This is done manually via the Database properties panel and setting the option to Allow Domino Data Source to be either Views Only or Views and Documents.
When this option is set this results in a field called $AllowRestDbAPI in the Icon design document to be set to a value of 1 (Views Only) or 2 (Views and Documents)
To access the contents of views via REST it is also necessary to enable DDS for each and every View. This is done via the View Properties.
When this option is checked the $WebFlags field on the view design document is appended with the value “A”. I am not aware of any other uses for $WebFlags but just like the $Flags field you should consider the possibility this field may contain any number of characters of which “A” is reserved for this specific purpose.
The above logic can be implemented using a range of programming languages, including LotusScript, SSJS, or Java based upon your preferences and the exact needs you have for enabling DDS. The example below shows a modernized version of the Nifty Fifty application Contract Library. As a standard part of any application we like to make available a series of views for Developers that allow them to manage the application without the need for code changes. This includes a view that displays a list of views in the current database. As you can see we have added a column to quickly show which views currently have DDS enabled. Using the InView Edit capabilities of Notes we can make this column a toggle so simply clicking on the column will enable/disable DDS for that view by calling LotusScript code to set the flags outlined above.