Anonymousprnt::Y
Find:

   |


 
 
Click on images to see them in full screen

API for Google Workspace

From Door Tablet V7.3, the Door Tablet server offers an HTTP API for Google for Work which allows you to manipulate calendar appointments from any remote system, and have these appointments show on the Door Tablet clients. The server must be connected to Google for Work account.

Please note that using the API is subject to additional license and each resource used must be licensed too. You may trial the API for as long as you like. While you evaluate the API, meeting subjects are randomly reversed.

VIDEO: Connecting to Google Workspace

Why is the API needed
Many corporations use ERP or home grown systems to manage special room resources. These are often specialist system which are not linked to corporate messaging system such as Microsoft Exchange. All manner of organisations, including hospitals, local authorities, governmental institutions and 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. Hospitals 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 that 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
Before you begin
To get the API working on your server you need to prepare it first. Please use the following checklist:
  1. Set the Door Tablet server to connect to Exchange or Office 365 and test your connection
  2. Complete the Door Tablet setup by updating resources and activating them
  3. Update the API ID and provide it to your HTTP API developer.

Update the API ID
Using the Web UI...


API Calls
To make calls to the server you make HTTP GET calls. The server always responds with JSONP or JSON (showing JSON below)


General Syntax:
All calls to the http server are made using the following syntax:
http://<server_address>/doortablet/doorswebui.nsf/apigoog.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/apigoog.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
"ver": the API version
"time": the time the action have taken place
Additional parameters:
Additional parameters are returned when a reservation is posted
"id": the unique ID of the reservation inside Door Tablet
"sourceid":echo of the unique ID you provided when posting the reservation
"meetings": a list of meeting for the same day of a post (if you add &list=y)
Example:
"ok":true
"code":1
"message":"Reservation Saved"
"id":"AAMkADE2NWNjYWE3LTIyODctNDljYS04Y2IxLTRhNGQ0MWFhODA3MwBGAAAAAADCN..."
"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_ROOMLOC
ERR_NO_ROOM
ERR_NO_ACTIVE
ERR_CHECKEDIN
ERR_NOT_OWNER

ERR_INP_PARA
ERR_NO_SUBJECT
ERR_NO_DURATION
ERR_DURATION_RANGE
ERR_NO_RESERVED

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 set-up
= -3; //API ID parameter not provided
= -4; //API ID mismatch
= -5; //IP not authorised
= -6; //Server type in system profile must be Microsoft Exchange or Office 365

= -10; //Location or Room name are blank
= -11; //Cannot get room with key
= -12; //Cannot use inactive room
= -14; //Cannot replace a checked-in reservation
= -15; //Not the Reservation owner

= -20; //Misc parameter error
= -21; //No meeting subject
= -22; //No duration provided (minutes)
= -23; //Duration is outside the range error
= -24; //No name or email specified for reserved for person

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

Available Calls
Reserve - create or reservation
Command:
reserve
Variables:
Mandatory fields
emailThe email address of the resource. For example: &email=centralpark@doortablet.onmicrosoft.com
timeThe start time in ISO 8601 format, including date and time zone. If you use this variable the "start" variable above is ignored. For example: &time=2015-10-11T17:00:00Z
durationThe duration in minutes, for example: &duration=60
purposeThe purpose of the meeting. For example: &purpose=marketing review
resforThe name of the person this is reserved for. For example: &resfor=William+Gates
resforemailPerson owning the meeting, in email address format. For example: &resforemail=William.Gates@myCompany.com. To be able to delete or modify a reservation the email address must match with this one. An email will be sent to this address with an invitation to accept the booking (the room is reserved regardless).

Optional fields
roomRequired if room email address was not used. Room name as first part of the room key. For example: &room=Magnet
locRequired if room email address was not used. Location name as second part of the room key. For example: &loc=HQ1
startRequired if start time was not used. The start time of the reservation, assuming today and in UTC. Format: <Hour>:<Minutes>, for example: &start=16:00. If you do not use either "start" or "time" the API will assume now.
authcodeAn authorisation code as listed in the room/resource. If you specify this parameter the call will fail if there is no match
novalidateBy default the API checks that there is no time conflict with your reservation. Set this to Y to skip the schedule validation. For example: &novalidate=y
capacityThe number of people attending the meeting. Integer, default = 2. For example: &capacity=8
sourceidA unique ID of the booking on the source system, if any. Default: blank. If you provide this 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. Use this ID to replace, update or delete the reservation
bodyThe body if the reservation, which shows when attendees are invited. Door Tablet does not currently shows this on tablets. For example &body=Door+Tablet+Meeting
publicSet this to Y in order to show the reservation on public welcome screens. Default: n. For example: &public=y
privateSet this to Y in order to mark this appointment as private. Door Tablet displays will show the meeting but wont show the subject and chair
welcome

list
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
Set this to Y in order to list all the reservations for the day of this reservation. For example: &list=y
reqattendeesRequired attendees. A list of email addresses separated by commas. For example: user1@myCompany.com,user2@myCompany.com,user3@myCompany.com. An invitation will be emailed to these attendees.
optattendeesOptional attendees. A list of email addresses separated by commas. For example: user1@myCompany.com,user2@myCompany.com,user3@myCompany.com. An invitation will be emailed to these attendees.
notifySet this to N if you wish the participants to NOT be notified about the creation of the reservation. By default a notification is sent. Example: &notify=n

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/apigoog.xsp?cmd=reserve&room=Victoria&loc=London&apiid=ABCD1234ABCD&start=16:30&purpose=hello+world&resfor=someone&resforemail=someone@corp.com&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 Exchange/Office 365, which you get when a reservation is made
Note: you have to provide one of the above only

Optional fields
listSet this to Y in order to list all the reservations for the day of this reservation after removal. For example: &list=y
notifySet this to N if you wish the participants to NOT be notified about the removal of the reservation. By default a notification is sent. Example: &notify=n
Example:
http://192.168.1.10/doortablet/doorswebui.nsf/apigoog.xsp?cmd=remove&apiid=ABCD1234ABCD&sourceid=980791475A0C804680257CAD00578329
Returns:

Update - updates a reservation
Command:
update
Note:
Please note that you cannot update the time or duration of the meeting. To do so you will need to Reserve again using either the SourceID or by removing the existing booking and then reserving again.
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
resforemailPerson owning the meeting, in email address format. For example: &resforemail=William.Gates@myCompany.com, as specified when the reservation was created.
Optional fields
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
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
resforThe name of the person this is reserved for. For example: &resfor=William+Gates
Example:
http://192.168.1.10/doortablet/doorswebui.nsf/apigoog.xsp?cmd=update&apiid=ABCD1234ABCD&sourceid=980791475A0C804680257CAD00578329&welcome=adding%20a%20welcome%20message
Returns:

Read - read reservations
Command:
read
Variables:
Mandatory fields
emailThe address of the room. For example: &email=centralpark@doortablet.onmicrosoft.com
locIf email not used. The location of the room/resource. If you do not specify the room name all the rooms within this location will be listed. For example: &loc=London

Optional fields
dateThe 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
daysThe number of days of reservations to get. For a week specify 7, for two weeks 14 etc. Must be positive not exceeding 365. If days is not specified the default is 1. For example: &days=10
roomRequired if room email address was not used. Room/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/apigoog.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/apigoog.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;
}