Confirmed users
632
edits
No edit summary |
|||
Line 18: | Line 18: | ||
== Loop Server API Changes == | == Loop Server API Changes == | ||
=== POST /rooms === | === POST /rooms === | ||
This generates a new room and returns the associated URL that can be used to join the room. | |||
POST /rooms HTTP/1.1 | |||
Accept: application/json | |||
Accept-Encoding: gzip, deflate | |||
Authorization: <stripped> | |||
Content-Type: application/json; charset=utf-8 | |||
Host: localhost:5000 | |||
{ | |||
"context": "PWjHj89HBS-Hnd4YBoOXFlnqnJ3iqPPIX8XCnjEWT7Zc8Yhv7nch1aGA5kBlDwM0tvByMqHdbTthvEqRMUv60tnORRYOgRK-N3evEHCajcraSAU_BlItizKh68nQHO4P1A5vUTcvkbly4p1mRYKsVoSXti2zG7cFUqX1Iid7vpzq9t7kNXzxb7Ik9Hs1iXKOfVWPQZg6mRoH_-bTh_EMehxPgDCnMDLTDrqpa1-xuE9RDWNLgCMQmeFvE1rtYOGVPRt_WP6ivyJsmYv9fMTZxvcISwHcgadkdhQB8GXwsz8HTigFZk_bRDL-UykzRVPtce_FA2VkCmiF5nPCE4_kRcvs5PLwC3OJ0vjt1pG0_DQmudxpcuV-uYCxLG9pmXkWEFzshJRkir4OxC1485jh8ubINdweDzTb-KBp4y69G2lyT8A7GsC5o4kIhgLfSsEJ6UmeZeyMICUX3Iqd9ZsfDNLoUeAb5KGJgEtDy-7ag52rYY5mGgP2GQ==", | |||
"algo": "AES-GCM", | |||
"key": "KLPCJEy8vewUeHFFLtvMNA", | |||
"expiresIn": 5, | |||
"roomOwner": "Alexis", | |||
"maxSize": 2 | |||
} | |||
* '''context''' - The room context information, encrypted and Base64 encoded. | |||
* '''algo''' - The encryption algorithm used to encrypt the context information. | |||
* '''key''' - The room key ('''kR'''), wrapped by the user's application-specific key '''kBr'''. | |||
* '''expiresIn''' - The number of hours for which the room will exist. | |||
* '''roomOwner''' - The user-friendly display name indicating the name of the room's owner. | |||
* '''maxSize''' - The maximum number of users allowed in the room at one time. | |||
'''''NOTE: the roomName parameter no longer appears in the message; it has been moved into the "context" portion of the message.''''' | |||
HTTP/1.1 200 OK | |||
Connection: keep-alive | |||
Content-Type: application/json; charset=utf-8 | |||
Date: Wed, 16 Jul 2014 13:09:40 GMT | |||
Server-Authorization: <stripped> | |||
{ | |||
"roomToken": "_nxD4V4FflQ", | |||
"roomUrl": "http://localhost:3000/rooms/_nxD4V4FflQ", | |||
"expiresAt": 1405534180 | |||
} | |||
* '''roomToken''' - The token used to identify this room. | |||
* '''roomUrl''' - A URL that can be given to other users to allow them to join the room. Note that the user must append the room key '''kR''' as a url fragment before using this URL. | |||
* '''expiresAt''' - The date after which the room will no longer be valid (in seconds since the Unix epoch). | |||
''Server implementation note: The Loop server should contact the TokBox servers and retrieve a sessionId for the room at room creation time. This sessionId should be stored persistently with rest of the information associated with the room.'' | |||
=== PATCH /rooms/{token} === | === PATCH /rooms/{token} === | ||
=== GET /rooms/{token} === | === GET /rooms/{token} === | ||
=== GET /rooms === | === GET /rooms === |