Loop/Architecture/Context: Difference between revisions

Jump to navigation Jump to search
Line 183: Line 183:


=== GET /rooms ===
=== GET /rooms ===
List all rooms associated with account
GET /rooms?version=<version> HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Host: localhost:5000
* '''version''' - Optional; if present, indicates the version received from the simple push server; the server will limit results to those rooms that have changed on or after this time.
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 30
Content-Type: application/json; charset=utf-8
Date: Wed, 16 Jul 2014 13:23:04 GMT
ETag: W/"1e-2896316483"
Timestamp: 1405516984
[
    {
        "roomToken": "_nxD4V4FflQ",
        "context": {
          "value": "PWjHj89HBS-...ICUX3Iqd9ZsfDNLoUeAb5KGJgEtDy-7ag52rYY5mGgP2GQ==",
          "alg": "AES-GCM",
          "wrappedKey": "KLPCJEy8vewUeHFFLtvMNA"
        },
        "roomUrl": "http://localhost:3000/rooms/_nxD4V4FflQ",
        "roomOwner": "Alexis",
        "maxSize": 2,
        "creationTime": 1405517546,
        "ctime": 1405517546,
        "expiresAt": 1405534180,
        "participants": []
    },
    {
        "roomToken": "QzBbvGmIZWU",
        "context": {
          "value": "7s-v8S37f_wpltgN9oA...wdNnoLZGxNkPJp72B8_rG-JKLi1Gd0Ar0La_2jIxbfbV5ztNXVTVjf==",
          "alg": "AES-GCM",
          "wrappedKey": "vB--kjDi837BSwbZpQzkHg"
        },
        "roomUrl": "http://localhost:3000/rooms/QzBbvGmIZWU",
        "roomOwner": "Alexis",
        "maxSize": 2,
        "creationTime": 1405517546,
        "ctime": 1405517546,
        "expiresAt": 1405534180,
        "participants": []
    },
    { 
        "roomToken": "3jKS_Els9IU",
        "context": {
          "value": "nF6F9fp4kg7...ps4zAiBh6Bat9qMfdKSlLhHCG-9BYorTos4p4doT3So3kXQDeLHp==",
          "alg": "AES-GCM",
          "wrappedKey": "cKnAvMBgA75QhANh04sT3g"
        },
        "roomUrl": "http://localhost:3000/rooms/3jKS_Els9IU",
        "roomOwner": "Alexis",
        "maxSize": 2,
        "clientMaxSize": 2,
        "creationTime": 1405517546,
        "ctime": 1405517818,
        "expiresAt": 1405534180,
        "participants": [
            { "displayName": "Alexis", "account": "alexis@example.com", "roomConnectionId": "2a1787a6-4a73-43b5-ae3e-906ec1e763cb" },
            { "displayName": "Adam", "roomConnectionId": "781f012b-f1ea-4ce1-9105-7cfc36fb4ec7" }
          ]
    },
    { 
        "roomToken": "z9Hg4Bk19_Z",
        "deleted": true
    }
]
This body is an array of rooms, each of which is formatted as described in [[#GET_.2Frooms.2F.7Btoken.7D]].
Additionally, if a "?version=<version>" parameter is included, then the list will include the rooms that have been deleted since that version. These entries will simply include the roomToken, plus a field "deleted" with a value of "true". None of the other fields need to be included for deleted rooms.
Confirmed users
632

edits

Navigation menu