Anonymousprnt::Y
Click on images to see them in full screen

API for Domino

From Door Tablet V4.4, the Door Tablet server offers an HTTP API which allows you to manipulate calendar appointments in IBM Domino from any remote system, and have these appointment show on the Door Tablet clients. The server must be in either one of these modes:
  1. Stand alone Meeting Centre
  2. Embedded within a corporate Domino Server
Please note that using the API is subject to additional license.

Why is the API needed
Many corporations use ERP or home grown systems to manage special room resources. These often specialist systems which are not linked to corporate messaging system such as Microsoft Exchange, IBM Domino or Google Calendar. All manner of organisations, including hospitals, local authorities, governmental institution, banks use such systems to conduct their core business, often managed entirely separately to their traditional messaging system. The ability to use a simple yet powerful API to update Rooms Displays is a unique capability of the Door Tablet server.
Use cases:

  1. A hospital could use Door Tablet to display details about an operation currently being carried out
  2. A police station could display the fact an interview with suspects is being carried out in a room
  3. An accountancy firm will display the fact an audit for a particular client is taking place in a room
Supported functions
Functions supported by this API:
  1. Create a reservation
  2. Delete a reservation
  3. Update a reservation
  4. Read existing reservations
  5. List locations and rooms (to create these please use the Web UI)
Before you begin
To get the API working on your server you need to prepare it first. If you use the Door Tablet for Windows server you may skip this section, otherwise, please use the following checklist:
  1. Ensure the system ACL (Access Control List) is correctly set (see image 1). You do not need to do this if you use the Door Tablet Windows Server
  2. Sign the doorswebui.nsf database using the Domino Administrator.
  3. Ensure that the signer name (server or user) is included in the list of authorised executors on the server, in the server profile. Please note that if you upgrade Door Tablet the databases will be signed again using the server ID name so please ensure that this name also appears in the list of authorise executors (see image 2)
  4. Update the API ID and provide it to your HTTP API developer (images 3 and 4).
Please note: If you are using the API on a Door Tablet embedded Domino server you must upgrade the design of the Rooms and Resources database we provide.
Image 1 (required for Domino users but not for the Door Tablet for Windows server)
ACL: change the rights for "Anonymous" to "Editor", if it is not set yet.

Image 2
List the signer in the server document

Images 3 and 4: Update the API ID
Using the Web UI...

In the Notes UI:

API Calls
To make calls to the server you make HTTP GET calls. The server always responds with JSONP


General Syntax:
All calls to the http server are made using the following syntax:
http://<server_address>/doortablet/doorswebui.nsf/api.xsp?cmd=<command_name>&apiid=<API_ID>&para=value&para1=value1...&paraN=valueN

Basic parameters:
<server_address> - the address of your server, may be an IP address too. The server must be configured to accept such address.
<command_name> - defines what you want to do. For the list of actions, see below. Not required for inbound SMS submitted from a gateway
<API_ID> - is an API ID code which you must always provide. The code is inserted in the System Profile by you and must be at least 12 chars long
<return> - optional. Specify the only value "json" to return the results of your calls in JSON format instead of JSONP. For example &return=json
Example:
http://192.168.1.10/doortablet/doorswebui.nsf/api.xsp?cmd=reserve&apiid=ABCD1234ABCD

General Return structure:
The Door Tablet API returns response in JSONP format, as showing above. The callback routine name is always "cbk". The response has the following format:
"ok": true or false
"code": error number, negative means error, positive means success
"message": a descriptive message
"time": the time the action have taken place
Additional parameters:
Additional parameters are returned when a reservation is posted OK
"id": the unique ID of the reservation inside Door Tablet
"sourceid":echo of the unique ID you provided when posting the reservation
Example:
"ok":true
"code":1
"message":"Reservation posted OK and validated"
"confirmed":true
"id":"A0BF21A92B1082DE80257CBF006974FE"
"sourceid":"slfdjsfghsdfjvasfiu236b2c2l34234b23"
"time":"19/04/2014 20:11:52 GDT"

Success and Error codes
//success returns
OK_VALIDATED
OK_UNVALIDATED
OK_REMOVED
OK_UPDATED
OK_UNCHANGED
OK_HASRESRVS
OK_NORESRVS

//error returns
ERR_CATCH_ALL
ERR_SYSPROF
ERR_NO_API
ERR_BAD_API
ERR_BAD_IP
ERR_SRV_TYPE
ERR_OWNER
ERR_RES_DB

ERR_ROOMLOC
ERR_NO_ROOM
ERR_NO_ACTIVE
ERR_SRC_ID_IND
ERR_CHECKEDIN

ERR_INP_PARA
ERR_BAD_RES

ERR_NO_ID
ERR_NO_RESERV
= 1; //Reservation posted OK and validated
= 2; //Reservation posted OK but not validated
= 5; //Reservation removed OK
= 10; //Reservation updated OK
= 11; //Reservation not Changed
= 20; //Found reservations for the date
= 21; //No reservations found for the date


= -1; //general API catch error
= -2; //System profile not yet setup
= -3; //API ID parameter not provided
= -4; //API ID mismatch
= -5; //IP not authorised
= -6; //Server type in system profile must be Meeting Center
= -7; //Meetings owner not set in System Profile
= -8; //Reservations Database cannot be opened

= -10; //Location or Room name are blank
= -11; //Cannot get room with key
= -12; //Cannot use inactive room
= -13; //No source ID index in resources DB
= -14; //Cannot replace a checked-in reservation

= -20; //Misc parameter error
= -30; //Reservation Rejected

= -40; //No sourceid or id
= -41; //No reservation found

Available Calls
Reserve - create or reservation
Command:
reserve
Variables:
Mandatory fields
roomRoom name. Taken for the room record, for example: &room=Magnet
locLocation where the room is. Taken for the room record, for example: &loc=HQ1
apiidAPI ID. A 12 chars string from the Door Tablet system profile, for example: &apiid=194756ABCD23
startThe start time of the reservation. Format: <Hour>:<Minutes>, for example: &start=16:00
endThe end time of the reservation. Format: <Hour>:<Minutes>, for example: &end=17:30
purposeThe purpose of the meeting. For example: &purpose=marketing review
capacityThe number of people attending the meeting. Integer. For example: &capacity=8

Optional fields
chairPerson chairing the meeting, default: meetings owner from System Profile. For example: &chair=James+Bond
nowaitTells the API not to wait and validate the reservation, default: n. Set to y if you are setting a lot of appointments and certain that there are no booking conflicts. For example: &nowait=y
dateThe date of the meeting, default is Today. Format: <Year>-<Month>-<day>, for example: &date=2014-7-21. Please note that invalid dates will cause the reservation to be rejected.
sourceidThe unique ID of the booking on the source system. Default: blank. If you provide the ID, the API will first look for a booking with this ID and delete it, then proceed to create a new one. For example:
&sourceid=slfdjsfghsdfjvasfiu236b2c2l34234b23
publicSet this to Y in order to show the reservation on public welcome screens. Default: n. For example: &public=y
welcomeA welcome message for visitors attending the meeting. This will display on welcome screens. Default is blank. For example: &welcome=Welcome+IBM+and+Microsoft+for+the+big+collaboration+day
attendeesNames of Attendees
attendeesOptNames of Optional Attendees

Notes:
1. You cannot replace a reservation that was already checked-in
2. The time zone of the reservations you post using the API are always set to the Door Tablet server time zone, and you do not need to specify it
Example:
http://192.168.1.10/doortablet/doorswebui.nsf/api.xsp?cmd=reserve&room=Victoria&loc=London&apiid=ABCD1234ABCD&start=16:30&purpose=hello world&chair=someone&end=16:40&capacity=7&public=y
Returns:

Remove - removes a reservation
Command:
remove
Variables:
Mandatory fields
sourceidThe unique ID of the booking on the source system. For example:
&sourceid=slfdjsfghsdfjvasfiu236b2c2l34234b23
idUnique ID from the Door Tablet system, which you get when a reservation is made
Note: you have to provide one of the above only
apiidAPI ID. A 12 chars string from the Door Tablet system profile, for example: &apiid=194756ABCD23

Optional fields
roomRoom name. Taken for the room record, for example: &room=Magnet
locLocation where the room is. Taken for the room record, for example: &loc=HQ1
Note: you have to provide the optional fields if you use the API on a Domino Server. If you use Door Tablet as a Meeting Centre and stand alone these parameters are not required.
Example:
http://192.168.1.10/doortablet/doorswebui.nsf/api.xsp?cmd=remove&apiid=ABCD1234ABCD&id=980791475A0C804680257CAD00578329
Returns:

Update - updates a reservation
Command:
update
Variables:
Mandatory fields
sourceidThe unique ID of the booking on the source system. For example:
&sourceid=slfdjsfghsdfjvasfiu236b2c2l34234b23
idUnique ID from the Door Tablet system, which you get when a reservation is made
Note: you have to provide one of the above only
apiidAPI ID. A 12 chars string from the Door Tablet system profile, for example: &apiid=194756ABCD23
purposeIf change needed. The purpose of the meeting. For example: &purpose=marketing review
capacityIf change needed. The number of people attending the meeting. Integer. For example: &capacity=8
chairIf change needed. Person chairing the meeting, default: meetings owner from System Profile. For example: &chair=James+Bond
publicIf change needed. Set this to Y in order to show the reservation on public welcome screens. Default: n. For example: &public=y
welcomeIf change needed. A welcome message for visitors attending the meeting. This will display on welcome screens. Default is blank. For example: &welcome=Welcome+IBM+and+Microsoft+for+the+big+collaboration+day

Optional fields
roomRoom name. Taken for the room record, for example: &room=Magnet
locLocation where the room is. Taken for the room record, for example: &loc=HQ1
Note: you have to provide the optional fields if you use the API on a Domino Server. If you use Door Tablet as a Meeting Centre and stand alone these parameters are not required.
Example:
http://192.168.1.10/doortablet/doorswebui.nsf/api.xsp?cmd=update&apiid=ABCD1234ABCD&id=980791475A0C804680257CAD00578329&welcome=adding%20a%20welcome%20message
Returns:

Read - read reservations
Command:
read
Variables:
Mandatory fields
apiidAPI ID. A 12 chars string from the Door Tablet system profile, for example: &apiid=194756ABCD23

Optional fields
dateOptional. The date for which you wish to list meetings for, default is Today. Format: <Year>-<Month>-<day>, for example: &date=2014-7-21. Please note that invalid dates will cause the listing to be rejected
resdbOptional. Note: you have to provide the optional fields if you use the API on a Domino Server. If you use Door Tablet as a Meeting Centre and stand alone these parameters are not required. For example: &resdb=roomres.nsf
locThe location of the room/resource. If you do not specify the room name all the rooms within the location will be listed. For example: &loc=London
roomRoom/resource name. If you do not specify the location name, all rooms of the same name, across locations, will be listed. &room=board
startStart time. Show reservations that start or end after the start time. Format: hh:mm. If you do not specify the end (below), the API assumes end=23:59. For example: &start=16:30
endEnd time. Show reservations that start or end before the end time. Format: hh:mm. If you do not specify the start (above), the API assumes start=00:01. For example: &end=19:30
If end time is before start time the API reverses the times automatically for you
Example:
http://192.168.1.10/doortablet/doorswebui.nsf/api.xsp?cmd=read&apiid=ABCD1234ABCD&date=2014-04-1
Returns:

Rooms - lists rooms
Command:
rooms
Variables:
Mandatory fields
apiidAPI ID. A 12 chars string from the Door Tablet system profile, for example: &apiid=194756ABCD23

Optional fields
None
Example:
http://192.168.1.10/doortablet/doorswebui.nsf/api.xsp?cmd=rooms&apiid=ABCD1234ABCD
Returns:



Unicode

When you send text to Door Tablet which includes chars outside the ASCII range, Door Tablet would expect you to use the following JavaScript routine output to convert your text to Unicode entities. If you use other languages such as Java to post to the Door Tablet server, the routing below may be converted as long as the output is the same as the JavaScript variant.

function uni2ent(srcTxt) {
var entTxt = '';
var c, hi, lo;
var len = 0;
for (var i=0, code; code=srcTxt.charCodeAt(i); i++) {
var rawChar = srcTxt.charAt(i);
if (code > 255) {
if (0xD800 <= code && code <= 0xDBFF) {
hi = code;
lo = srcTxt.charCodeAt(i+1);
code = ((hi - 0xD800) * 0x400) + (lo - 0xDC00) + 0x10000;
i++;
}
else if (0xDC00 <= code && code <= 0xDFFF) {
hi = srcTxt.charCodeAt(i-1);
lo = code;
code = ((hi - 0xD800) * 0x400) + (lo - 0xDC00) + 0x10000;
}
c = "%u" + Right("000"+code.toString(16).toUpperCase(), 4);
} else {
c = rawChar;
}
entTxt += c;
len++;
}
return entTxt;
}