Site Tools


Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
api-workplace-fabric

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api-workplace-fabric [2018/07/16 15:28]
hari
api-workplace-fabric [2018/07/17 11:04] (current)
hari [Server to client data stream]
Line 608: Line 608:
  
   - The server checks if the access token is valid for the requesting user. If it's not, then 401 is returned.   - The server checks if the access token is valid for the requesting user. If it's not, then 401 is returned.
 +  - A 404 is returned if any of the requested city, building, floor or department are not found.
   - Next, the server updates the changes in profile in the record in database. A 204 is returned.   - Next, the server updates the changes in profile in the record in database. A 204 is returned.
   - If there are errors / exceptions on the way, 500 is returned.   - If there are errors / exceptions on the way, 500 is returned.
  
-==== Response if  ====+==== Response if the updation is successful ​====
  
 +Headers
 +<​code>​
 +HTTP/1.1 204 DONE
 +</​code>​
  
 +Body: none
 +
 +==== Response if access token is invalid ====
 +
 +Headers
 +<​code>​
 +HTTP/1.1 401 INVALID-TOKEN
 +</​code>​
 +
 +Body: none
 +
 +==== Response if city / building / floor / department does not exist ====
 +
 +Headers
 +<​code>​
 +HTTP/1.1 404 CITY-NOT-FOUND
 +or
 +HTTP/1.1 404 BUILDING-NOT-FOUND
 +or
 +HTTP/1.1 404 FLOOR-NOT-FOUND
 +or
 +HTTP/1.1 404 DEPARTMENT-NOT-FOUND
 +</​code>​
 +
 +Body: none
 +
 +==== Response for some other error / exception ====
 +
 +Headers
 +<​code>​
 +HTTP/1.1 500 ERROR
 +</​code>​
 +
 +Body
 +<​code>​
 +This is a sample error message.
 +</​code>​
 +
 +===== Log out =====
 +
 +==== Request ====
 +
 +API call
 +<​code>​
 +POST https://​apiserver/​freespace/​oauth/​revoke
 +</​code>​
 +
 +Headers
 +<​code>​
 +Authorization:​ Bearer access-token-for-melania
 +</​code>​
 +
 +Body: none
 +
 +==== What the server does between request and response ====
 +
 +The server looks up the bearer token in the database and deletes it, so that the token is invalid from the next time and the user is always redirected to the login page. The response always leads to a 204 response.
 +
 +==== Response ====
 +
 +Headers
 +<​code>​
 +HTTP/1.1 204 DONE
 +</​code>​
 +
 +===== Live occupancy update =====
 +
 +==== Connection ====
 +
 +URL
 +<​code>​
 +ws://​apiserver:​8000/​live-occupancy
 +</​code>​
 +
 +==== Client to server data stream ====
 +
 +None
 +
 +==== Server to client data stream ====
 +
 +<​code>​
 +{
 +  "​spaceId":​ "​uuid-of-the-room/​space-that-is-occupied-or-released",​
 +  "​departmentId":​ "​uuid-of-the-department-where-the-space-is",​
 +  "​floorId":​ "​uuid-of-the-floor-where-the-space-is",​
 +  "​buildingId":​ "​uuid-of-the-building-where-the-space-is",​
 +  "​isOccupied":​ true if occupied, false if release
 +}
 +</​code>​
api-workplace-fabric.1531735090.txt.gz ยท Last modified: 2018/07/16 15:28 by hari