我一直在嘗試使用Domino數據服務REST API創建客房預訂,但我似乎錯過了一個技巧。使用Domino數據服務創建客房預訂REST API
發送POST請求發送到文檔端點我可以提交和創造出現在的房間和資源視圖,但底層的房間預訂文件仍然顯示在Notes客戶端可用。
這裏是請求主體的樣本:
{
"@authors": [
"CN=Andrew Jones/O=MyCorp",
""
],
"@form": "Reservation",
"From": "CN=Andrew Jones/O=MyCorp",
"Chair": "CN=Andrew Jones/O=MyCorp",
"AltChair": "CN=Andrew Jones/O=MyCorp",
"Principal": "CN=Andrew Jones/O=MyCorp",
"SequenceNum": 1,
"OrgState": "5",
"ResourceType": "1",
"ResourceName": "Room/Office",
"ROOM": "Room/[email protected]",
"Capacity": 1,
"AppointmentType": "3",
"StartTimeZone": "Z=0$DO=1$DL=3 -1 1 10 -1 1$ZX=47$ZN=GMT",
"EndTimeZone": "Z=0$DO=1$DL=3 -1 1 10 -1 1$ZX=47$ZN=GMT",
"TOPIC": "Test",
"SendTo": "CN=Room/O=Office",
"SelectedRR": "CN=Room/O=Office",
"$BusyName":"CN=Room/O=Office",
"Encrypt": "0",
"Categories": "",
"RouteServers": "CN=dominonode/O=MyCorp",
"DeliveredDate": { "data":"2017-03-09T12:38:34Z","type":"datetime"},
"StartDate": {"data":"2017-03-09T20:00:00Z","type":"datetime"},
"StartTime": {"data":"2017-03-09T20:00:00Z","type":"datetime"},
"StartDateTime": {"data":"2017-03-09T20:00:00Z","type":"datetime"},
"EndDate": {"data":"2017-03-09T21:00:00Z","type":"datetime"},
"EndTime": {"data":"2017-09-03T21:00:00Z","type":"datetime"},
"EndDateTime": {"data":"2017-03-09T21:00:00Z","type":"datetime"},
"CalendarDateTime": {"data":"2017-03-09T20:00:00Z","type":"datetime"},
"UpdateSeq": 1,
"Author": "CN=Andrew Jones/O=MyCorp",
"ResourceOwner": "",
"ReservedFor": "CN=Andrew Jones/O=MyCorp",
"ReservedBy": "CN=Andrew Jones/O=MyCorp",
"RQStatus": "A",
"Purpose": "API Test",
"NoticeType": "A",
"Step": 3,
"Site": "Office",
"ReserveDate": {"data":"2017-03-09T20:00:00Z","type":"datetime"}
}
This question建議我應該改爲嘗試創建日曆事件,但一切我送似乎變得不好的請求被拒絕,其中包括sample
我也看過another question這表明我需要創建一個約會,然後爲該房間的通知文件,但雖然我可以創建這些文件,但它似乎並沒有創建一個保留。
有沒有人嘗試這樣做,得到它的工作還是我剛剛加盟了大象的墓地?
我需要更好地理解你的用例。如果您嘗試在用戶的日曆上創建事件,則日曆API很有意義。您可以預訂房間作爲創建此類事件的副作用,但請求將爲「POST/{database}/api/calendar/events」,其中{database}是用戶的郵件文件。我不認爲{數據庫}可以成爲預訂數據庫本身。當你說所有的東西都會被「拒絕並且請求不好」時,你使用了什麼樣的數據庫? –
我們的目的是在我們辦公室的每個房間的外面安裝平板電腦設備。平板電腦將顯示當天房間的時間表。如果沒有預定的房間,用戶應該能夠立即預訂下一個30分鐘,1小時等的房間。所以我期望通過向某個終端發送POST請求來完成此操作。我使用的是resource.nsf,所以我應該使用與房間的郵件文件相對應的數據庫? –
一個房間本身沒有郵件文件,但我認爲有一個答案可以幫你。敬請關注。我會稍後發佈答案。 –