Authentication API

URL: https://eusfuncapp01.azurewebsites.net/api/Authentication

TYPE: POST

Body:

  • OrganizationId (string): Unique customer ID provided by Embrava.
  • SecretKey (string): Secret key provided by Embrava to authenticate customer.


Response:

  • Token (string): secure token to be used in the authorization header when calling other Embrava DMS API functions. Expiry of the token is 6 hours from the created time.
  • TimeCreated (string): The time when the token generated.

The purpose of the Authentication function is to allow a 3rd party system to securely access the various functions of the Embrava DMS API. The token generated from this function is to be used in the authorization header when calling other Embrava DMS API functions.

Example:

POST https://eusfuncapp01.azurewebsites.net/api/Authentication

{

"OrganizationId":"32f5b2eb-77d9-4e92-ae95-75b3712339c2",

"SecretKey":"86A03FB7-634A-48B1-A3FE-5351DE9233D9"

}

Response:

{

"Token":"OiavVPdinKhLembOLjRKjeVW3HGjm3l/fQnVaFeKZThJuCe7RdznYTw1l174pyUD/ljYx/Qc5WwK64d6g4qQlZOKuu~dnRdFX1igF0v8LprQsb9gg5fQld/zv18df5R~Y9e6XlcY8AI=",

"TimeCreated":"2019-07-12T23:57:16.50041Z"

}

Note: Token lifetime is 6 hours.

URL:
Paste your API URL below:



Method:
Select your API method:



Headers:
Add custom headers (key:value) separated by commas:



Body:
Paste your JSON body here (optional for GET)


Response

Response will appear here
Authentication API

URL: https://eusfuncapp01.azurewebsites.net/api/Authentication

TYPE: POST

Body:

  • OrganizationId (string): Unique customer ID provided by Embrava.
  • SecretKey (string): Secret key provided by Embrava to authenticate customer.


Response:

  • Token (string): secure token to be used in the authorization header when calling other Embrava DMS API functions. Expiry of the token is 6 hours from the created time.
  • TimeCreated (string): The time when the token generated.

The purpose of the Authentication function is to allow a 3rd party system to securely access the various functions of the Embrava DMS API. The token generated from this function is to be used in the authorization header when calling other Embrava DMS API functions.

Example:

POST https://eusfuncapp01.azurewebsites.net/api/Authentication

{

"OrganizationId":"32f5b2eb-77d9-4e92-ae95-75b3712339c2",

"SecretKey":"86A03FB7-634A-48B1-A3FE-5351DE9233D9"

}

Response:

{

"Token":"OiavVPdinKhLembOLjRKjeVW3HGjm3l/fQnVaFeKZThJuCe7RdznYTw1l174pyUD/ljYx/Qc5WwK64d6g4qQlZOKuu~dnRdFX1igF0v8LprQsb9gg5fQld/zv18df5R~Y9e6XlcY8AI=",

"TimeCreated":"2019-07-12T23:57:16.50041Z"

}

Note: Token lifetime is 6 hours.

Webhook API

The purpose of the Webhook API is to allow 3rd party systems to register their APIs for the Embrava DMS to send events and receive workspace information.

URL: https://eusfuncapp01.azurewebsites.net/api/hook

Type: POST

Header:

  • Dms-Signature-token: Derived from Authentication API.

Body

  • url (string): Endpoint the Embrava DMS will post events to.
  • secret (string): Authentication key so only the Embrava DMS can call this API.
  • type (string): Webhook Type -
    • EVENT: Specifies the endpoint the Embrava DMS will use to send events to the 3rd party system.
    • WORKSPACE: The 3rd party system should hold Desk Sign to workspace mappings mappings the Desk Sign ID. The WORKSPACE webhook is used by the Embrava DMS to fetch workspace details from the 3rd party system using a Desk Sign ID.

Response:

  • Id (int): 0 = success, 1 = error
  • Message (string): used to display error message if applicable.
  • data (string array): details of captured hook
Example:

Register API to receive events from Embrava DMS

POST https://eusfuncapp01.azurewebsites.net/api/hook

{

"url":"https://customerAPIURL.com/eventsfunctionName",

"secret":"A099F668-6A36-4541-B0BD-C63CD10E4E82",

“type”:”EVENT”

}

Response:

{

"Id":0,

"Message":"EVENT API registered successfully",

"data":

[{

"id":52,"organization_id":"ZZADE60F3-C3D21E-4A01-A0A7-CEA79F36DC2B",

"url":"https://customerAPIURL.com/eventsfunctionName", "secret":"A099F668-6A36-4541-B0BD-C63CD10E4E82", "type":"EVENT"

}]

}

Register an API the Embrava DMS should use to lookup

workspace details:

POST https://eusfuncapp01.azurewebsites.net/api/hook

{

"url":"https://customerAPIURL.com/workspacefunctionName",

"secret":"A099F668-6A36-4541-B0BD-C63CD10E4E82",

“type”:”WORKSPACE”

}

Response:

{

"Id":0,

"Message":"WORKSPACE API registered successfully",

"data":

[{

"id":53,"organization_id":"ZZADE60F3-C3D21E-4A01-A0A7-CEA79F36DC2B",

"url":"https://customerAPIURL.com/workspacefunctionName",

"secret":"A099F668-6A36-4541-B0BD-C63CD10E4E82",

"type":"WORKSPACE"

}]

}

Get all Webhooks

URL: https://eusfuncapp01.azurewebsites.net/api/hook

Type: GET

Header:

  • Dms-Signature-token: derived from Authentication API.

Response:

  • Id (int): 0 = success, 1 = error
  • Message (string): used to display error message if applicable.
  • data (string array): details of captured webhook
    • Id: webhook unique identifier.
    • organization_id: identifier of organization webhook belongs to.
    • url: endpoint of the webhook
    • secret: secure token to use with webhook
    • type: webhook category
Example:

Get all webhooks for an organization

GET https://eusfuncapp01.azurewebsites.net/api/hook

Response:

{

"Id":0,

"Message":"Retrieved successfully",

"data":[

{

"id":52,

"organization_id":"ZZADE60F3-C3D21E-4A01-A0A7-CEA79F36DC2B",

"url":"https://customerAPIURL.com/eventfunctionName",

"secret":"A099F668-6A36-4541-B0BD-C63CD10E4E82",

"type":"EVENT"

},

{

"id":53,

"organization_id":"ZZADE60F3-C3D21E-4A01-A0A7-CEA79F36DC2B",

"url":"https://customerAPIURL.com/workspacefunctionName",

"secret":"A099F668-6A36-4541-B0BD-C63CD10E4E82",

"type":"WORKSPACE"

}

]

}

Delete a webhook

URL: https://eusfuncapp01.azurewebsites.net/api/hook/{id}

Type: DELETE

Header:

  • Dms-Signature-token: derived from Authentication API.

Response:

  • ResponseCode (int): 0 = success, 1 = error
  • Message (string): used to display error message if applicable.
  • data (string array): details of delete webhook
Example:

Delete a webhook

DELETE https://eusfuncapp01.azurewebsites.net/api/hook/52

Response:

{

"Id":0,

"Message":"Deleted successfully",

"data":[

{

"id":52,

"organization_id":"ZZADE60F3-C3D21E-4A01-A0A7-CEA79F36DC2B",

"url":"https://customerAPIURL.com/eventfunctionName", "secret":"A099F668-6A36-4541-B0BD-C63CD10E4E82", "type":"EVENT"

}

]

}

Event API

The purpose of this section is to describe the Event payload structure that is posted to a customer endpoint that was registered using the EVENT webhook.

URL: Specified by customer using EVENT webhook.

Type: POST

Header:

  • secret: Specified by customer using EVENT webhook.

Body

  • dateCreated (string) – the date and time (UTC) the event was created.
  • DeskSignID (string) – unique identifier of the Desk Sign.
  • booking – details of booking
    • ID (string) – booking ID from 3rd party system.
    • startTime (string) – the start date and time (UTC) of a booking.
    • endTime (string) – the end date and time (UTC) of a booking.
    • badgeNumber (string) – security badge of the user associated to the booking.
    • employeeID (string) – personnel number of the user associated to the booking.
    • Action (string) – booking event. Values: “CREATE”, “UPDATE”, “CHECKIN”, “CHECKOUT”, “CLEANED”
  • Status – user availability details
    • state: User status name. Values: “AVAILABLE”, “AWAY”, “BUSY”, “DND”, “ONCALL”, “OFFLINE"
    • value: Status identifier: Values: 1 =AVAILABLE, 2 = AWAY, 3 = BUSY, 4= DND, 5 = ONCALL, 0 = OFFLINE

Response:

  • ID (int): 0 = success, 1 = error
  • Message (string): Used to display error message if applicable.

Example:

Send CREATE event to register Event webhook

POST https://customerAPIURL.com/eventfunctionName

{

"dateCreated":"2020-02-29T12:50:23.5350748+00:00",

"DeskSignID":"3196300003",

"booking":{

"ID":"0",

"startTime":"2020-02-29T18:20:18Z", "endTime":"2020-02-29T18:20:18Z",

"badgeNumber":"1894842368", "employeeID":"",

"Action":"CREATE",

"deskId":"a74f0349-67f7-46df-a5f4-3e590499cdc5"

},

"status":null

}

Response:

{

"ID":0,

"Message": "Workspace event successfully received"

}

Send OFFLINE User Availability event to customer:

POST https://customerAPIURL.com/eventFunctionName

{

"dateCreated":"2020-01 12T13:23:28.5915546+05:30", "DeskSignID":"3196100032",

"booking":null, "status":

{

"state":"OFFLINE",

"value":"0"

}

}

Response:

{

"ID":0,

"Message": "User Status event successfully received"

}

Workspace API

The purpose of this section is to describe the Workspace API the Embrava DMS will use to look-up workspace details from a 3rd party system.

URL: Specified by customer using WORKSPACE webhook.

TYPE: POST

Header:

  • secret: Specified by customer using WORKSPACE webhook.

Body

  • DeskSignID (string) – unique identifier of the Desk Sign. This ID should be mapped to a workspace in the 3rd party system.

Response:

  • DeskID (string) - ID of workspace in 3rd party system.
  • DeskName (string) - name of workspace in 3rd party system.
  • Neighborhood (string) - name of group the workspace belongs to.
  • Floor (string) - name of floor the workspace belongs to.
  • Building (string) - name of building the workspace belongs to.
  • Timezone (string) - IANA timezone name.
  • Sun (string array) - {‘boolean”,”hh:mm”,”hh:mm”} – workspace availability on Sunday.
  1. Boolean describes if space can be booked on this day or not
  2. Start time when workspace is available
  3. End time when workspace in unavailable.
  • Mon (string array) - {“boolean”,”hh:mm”,”hh:mm”}
  • Tue (string array) - {“boolean”,”hh:mm”,”hh:mm”}
  • Wed (string array) - {“boolean”,”hh:mm”,”hh:mm”}
  • Thu (string array) - {“boolean”,”hh:mm”,”hh:mm”}
  • Fri (string array) - {“boolean”,”hh:mm”,”hh:mm”}
  • Sat (string array) - {“boolean”,”hh:mm”,”hh:mm”}
Example:

Embrava DMS requests the details of a workspace managed by

Desk Sign 3196100023

POST https://customerAPIURL.com/workspacefunctionName

{

“DeskSignID”: “3196100023”

}

Response:

{

"DeskID":"ba9ed829-5e58-4349-9e7a-cdf86cce5b3b",

"DeskName":"22-03A",

"Neighborhood":"Workplace Strategy",

"Floor":"22",

"Building":"23 Downing",

"Timezone":" America/New_York",

"Mon":["true","07:00:00","21:00:00"],

"Tue":["true","07:00:00","21:00:00"],

"Wed":["true","07:00:00","21:00:00"],

"Thu":["true","07:00:00","21:00:00"],

"Fri":["true","07:00:00","21:00:00"],

"Sat":["false","00:00:00","00:00:00"],

"Sun":["false","00:00:00","00:00:00"]

}

Create a booking

The purpose of the Booking API is to allow 3rd party systems to create a booking to be displayed on the Desk Sign and to also get a list of bookings currently assigned to a Desk Sign.

URL: https://eusfuncapp01.azurewebsites.net/api/Booking

TYPE: POST

Header:

  • Dms-Signature-token: Derived from Authentication API.

Body:

  • DeskSignID (string): Unique ID of Desk Sign stored against the workspace within the resource management system.
  • BookingID (string): Unique ID of the booking within the resource management system.
  • FirstName (string): First name of the user who created the booking.
  • LastName (string): Last name of the user who created the booking.
  • StartTime (datetime): Start date and time of the booking (UTC). Should be in format “yyyy- MM-ddTHH:mm:ssZ”.
  • EndTime (datetime): End date and time of the booking (UTC). Should be in format “yyyy- MM-ddTHH:mm:ssZ”.
  • CheckedIn (byte): If the booking has been checked-in. 0 = not checked-in, 1 = checked-in.
  • Cancel (byte): Set to 1 to cancel the booking.
  • BadgeNumber (string): Badge number of the user assigned to this booking.
  • EmployeeID (string): Employee ID of the user assigned to this booking.

Output:

  • ID (int): 0 = success, 1 = error
  • Message (string): Used to display error message if applicable.
Example:

POST https://eusfuncapp01.azurewebsites.net/api/Booking

{

"DeskSignID": "3196300012",

"BookingID": "4961e61b-23a7-48fd-98a6-db4e3f84ce3b",

"FirstName": "Jennifer",

"LastName": "Citizen",

"StartTime": "2020-02-01T14:50:00Z",

"EndTime": "2020-02-01T15:15:00Z",

"CheckedIn": 0,

"Cancel": 0,

"BadgeNumber": "7376479292",

"EmployeeId": ""

}

Response:

{

"ID":0,

"Message": "Booking successfully received"

}

Get Bookings

URL: https://eusfuncapp01.azurewebsites.net/api/Booking/<DeskSignID>

Type: GET

Header:

  • Dms-Signature-token: derived from Authentication API.

Body:

[empty]

Output:

  • ID (int): Unique ID of booking within the Embrava DMS.
  • RMSBookingID (string): Unique ID of the booking within the resource management system.
  • FirstName (string): First name of the user who created the booking.
  • LastName (string): Last name of the user who created the booking.
  • isCheckedIn (byte): If the booking has been checked-in. 0 = not checked-in, 1 = checked- in.
  • StartTime (datetime): Start date and time of the booking.
  • EndTime (datetime): End date and time of the booking.
  • Timezone (string) - IANA timezone name.
  • BadgeNumber (string): Badge number of the user assigned to this booking.
  • EmployeeID (string): Employee ID of the user assigned to this booking.
  • DeskSignID (string): Unique ID of the Desk Sign the booking belongs to.
Example:

GET https://eusfuncapp01.azurewebsites.net/api/Booking/3196300888

{

}

Response:

{

"ID": 297389022,

"RMSBookingID": "1639003002",

"FirstName": "Jennifer",

"LastName": "Citizen",

“IsCheckedIn”: false,

"StartTime": "2020-02-01T14:50:00",

"EndTime": "2020-02-01T15:15:00",

"Timezone": “America/New_York”,

"BadgeNumber": "7376479292",

"EmployeeId": "323",

“DeskSignID”: “3196300888”

}

Alert API

The purpose of the Alert API is to allow 3rd party systems to send custom alerts to the Desk Sign so that the Desk Sign will display this specific alert on the device.

URL: https://eusfuncapp01.azurewebsites.net/api/Alert

Type: POST

Header:

  • Dms-Signature-token: derived from Authentication API.

Body:

  • DeskSignID (string): Unique ID of Desk Sign stored against the workspace within the resource management system.
  • Type (byte): Display booking alert (Type=0) or custom alert (Type=1). Booking alert will have the device display the current state (Available, Reserved, Checked-In or Ending) based on the bookings stored on the device. Custom alert will display an alert as described by the parameters below.
  • ledColor (string): Hex code of the color to be displayed on the top LED bar.
  • ledMode (byte): 0=solid. 1=pulse.
  • screenColor (string): Hex code of the color to be displayed on the background of the screen.
  • textColor (string): Hex code of the color for the text displayed on screen.
  • textTemplate (number): Template number used to format text on screen as per Text Templates section below.
  • text1 (string): First string to be used in specified text template.
  • text2 (string): Second string to be used in specified text template.
  • text3 (string): Third string to be used in specified text template.
  • text4 (string): Fourth string to be used in specified text template.
  • sound (number): Position of sound stored in device.
  • soundMode (number): 0=play once. 1=repeat.
  • volume (number): 0 (off) to 5 (max).

Output:

  • ID (int): 0 = success, 1 = error
  • Message (string): Used to display error message if applicable.
Example:

POST https://eusfuncapp01.azurewebsites.net/api/Alert

{

"DeskSignID": "3196300012",

"type": 1,

"ledColor": "800080",

"ledMode": 1,

"screenColor": "000000",

"textColor": "FFFFFF",

"textTemplate": 4,

"text1": “EVACUATE”,

"text2": "Please move to your closest emergency exit.",

"text3": "",

“text4": "",

“sound”: 0,

“soundMode”: 0,

“volume”:0

}

Response:

{

"ID":0,

"Message": "Alert successfully received."

}