Room
Resource description
The world resource contains the following public fields:
Field |
Type |
Description |
---|---|---|
id |
string |
The world’s ID |
name |
string |
A title for the room |
description |
string |
A markdown-compatible description of the room |
module_config |
list |
Room content configuration |
permission_config |
object |
Permission rules mapping permission keys to lists of traits |
sorting_priority |
integer |
An arbitrary integer used for sorting |
Endpoints
- GET /api/v1/worlds/(world_id)/rooms/
Returns all rooms in the world (that you are allowed to see)
Example request:
GET /api/v1/worlds/sample/rooms/ HTTP/1.1 Accept: application/json, text/javascript
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "count": 1, "next": null, "previous": null, "results": [ { "id": "eaa91024-1278-468d-8f24-31479817b073", "name": "Forum", "description": "Main room", "module_config": [ { "type": "chat.native" } ], "permission_config": {}, "domain": "sample.venueless.events" } ] }
- Status Codes:
200 OK – no error
401 Unauthorized – Authentication failure
403 Forbidden – The world or room does not exist or you have no permission to view it.
- GET /api/v1/worlds/(world_id)/rooms/(room_id)/
Returns details on a specific room
Example request:
GET /api/v1/worlds/sample/rooms/eaa91024-1278-468d-8f24-31479817b073/ HTTP/1.1 Accept: application/json, text/javascript
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "id": "eaa91024-1278-468d-8f24-31479817b073", "name": "Forum", "description": "Main room", "module_config": [ { "type": "chat.native" } ], "permission_config": {}, "domain": "sample.venueless.events" }
- Status Codes:
200 OK – no error
401 Unauthorized – Authentication failure
403 Forbidden – The world or room does not exist or you have no permission to view it.
- POST /api/v1/worlds/(world_id)/rooms/
Creates a room
Example request:
POST /api/v1/worlds/sample/ HTTP/1.1 Accept: application/json, text/javascript Content-Type: application/json { "name": "Quiet room", "description": "Main room", "module_config": [ { "type": "chat.native" } ], "permission_config": {}, "domain": "sample.venueless.events" }
Example response:
HTTP/1.1 201 Created Vary: Accept Content-Type: application/json { "id": "eaa91024-1278-468d-8f24-31479817b073", "name": "Quiet room", "description": "Main room", "module_config": [ { "type": "chat.native" } ], "permission_config": {}, "domain": "sample.venueless.events" }
- Status Codes:
200 OK – no error
400 Bad Request – The world could not be updated due to invalid submitted data.
401 Unauthorized – Authentication failure
403 Forbidden – The requested world does not exist or you have no permission to create this resource.
- PATCH /api/v1/worlds/(world_id)/rooms/(room_id)/
Updates a room
Example request:
PATCH /api/v1/worlds/sample/ HTTP/1.1 Accept: application/json, text/javascript Content-Type: application/json { "name": "Quiet room" }
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "id": "eaa91024-1278-468d-8f24-31479817b073", "name": "Quiet room", "description": "Main room", "module_config": [ { "type": "chat.native" } ], "permission_config": {}, "domain": "sample.venueless.events" }
- Status Codes:
200 OK – no error
400 Bad Request – The world could not be updated due to invalid submitted data.
401 Unauthorized – Authentication failure
403 Forbidden – The requested world/room does not exist or you have no permission to update this resource.
- DELETE /api/v1/worlds/(world_id)/rooms/(room_id)/
Deletes a room
Example request:
PATCH /api/v1/worlds/sample/ HTTP/1.1 Accept: application/json, text/javascript Content-Type: application/json { "name": "Quiet room" }
Example response:
HTTP/1.1 204 No Content Vary: Accept
- Status Codes:
200 OK – no error
401 Unauthorized – Authentication failure
403 Forbidden – The requested world/room does not exist or you have no permission to delete this resource.