This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Mar 24, 2015, 11:25 AM
3 Posts

Creating a document in Domino Data Service(REST api)

  • Category: Calendar
  • Platform: All Platforms
  • Release: 9.0.1
  • Role:
  • Tags: lotus notes 9.0.1,domino
  • Replies: 2

I am trying to create a document in Reservation form using Domino Data Service(REST api), response is showing document is created but when i am trying to access that reservation(xyz's) using Notes client it is not showing up.

URL : http://server/Conf.nsf/api/data/documents?form=Reservation

Payload: { "@authors": ["server","" ], "@form":"Reservation", "From":"xyz", "AltFrom":"xyz", "Chair":"xyz", "AltChair":"xyz", "Principal":"xyz", "SequenceNum":1, "ORGState":"5", "ResourceType":"1", "ResourceName":"BELLA VISTA/Building15", "Room":"BELLA VISTA/Building15", "Capacity":2, "_ViewIcon":133, "AppointmentType":"3", "StartTimeZone":"Z=-3005$DO=0$ZN=India", "EndTimeZone":"Z=-3005$DO=0$ZN=India", "Topic":"Test Meeting", "SendTo":"CN=BELLA VISTA/O=Building15", "Encrypt":"0", "Categories":"", "RouteServers":"server", "StartDate":"2015-03-28T06:30:00Z", "StartTime":"2015-03-28T07:30:00Z", "StartDateTime":"2015-03-28T06:30:00Z", "EndDate":"2015-03-28T07:30:00Z", "EndTime":"2015-03-28T07:30:00Z", "EndDateTime":"2015-03-28T07:30:00Z", "UpdateSeq":1, "Author":"xyz", "ResourceOwner":"", "ReservedFor":"xyz", "ReservedBy":"xyz", "RQStatus":"A", "Purpose":"Test from REST", "NoticeType":"A", "Step":3, "Site":"Building15", "ReserveDate":"2015-03-28T06:30:00Z" }

Mar 24, 2015, 7:28 PM
19 Posts
See the answer on StackOverflow ...
http://stackoverflow.com/questions/29226951/creating-a-document-in-domino-data-servicerest-api

Your comment indicates the document is now showing up, but you get an error when you open the reservation with the Notes client:

"Field:'dStartTime':Incorrect datatype for operator or @Function:Time/Date Expected"

This secondary problem is most likely because the date/time fields are type TEXT instead of DATETIME.  You can modify your POST request to force the fields to be the correct type -- for example:

"StartDateTime": {"data":"2015-03-28T06:30:00Z", "type":"datetime"}

However, as I said on StackOverflow, this could get very complicated.  The reservation database wasn't designed with the data service in mind.  I am not aware of anyone who has successfully created a reservation with the data service.

-- Dave
Mar 25, 2015, 3:18 PM
326 Posts
Suggestion

I would manually create a reservation from a Notes client and check field for field what the property types are from what you are creating with rest and with the one that got created with Notes client.  I am sure besides field types being set wrong you are missing fields.

 

If you can maybe create the doc with a different form name like Rest-Reservation and have a schedule agent run at the server and correct the form name. fix the mismatched field types and add those fields that are missing.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal