2014-08-27 10:41:19 -04:00
|
|
|
{
|
|
|
|
"apiVersion": "1.0.0",
|
|
|
|
"swaggerVersion": "1.2",
|
2014-09-03 05:47:00 -04:00
|
|
|
"basePath": "http://localhost:8008/_matrix/client/api/v1",
|
2014-08-27 10:41:19 -04:00
|
|
|
"resourcePath": "/directory",
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"apis": [
|
|
|
|
{
|
|
|
|
"path": "/directory/room/{roomAlias}",
|
|
|
|
"operations": [
|
|
|
|
{
|
|
|
|
"method": "GET",
|
|
|
|
"summary": "Get the room ID corresponding to this room alias.",
|
2014-09-03 11:27:01 -04:00
|
|
|
"notes": "Volatile: This API is likely to change.",
|
2014-08-27 10:41:19 -04:00
|
|
|
"type": "DirectoryResponse",
|
|
|
|
"nickname": "get_room_id_for_alias",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "roomAlias",
|
|
|
|
"description": "The room alias.",
|
|
|
|
"required": true,
|
|
|
|
"type": "string",
|
|
|
|
"paramType": "path"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"method": "PUT",
|
|
|
|
"summary": "Create a new mapping from room alias to room ID.",
|
2014-09-03 11:27:01 -04:00
|
|
|
"notes": "Volatile: This API is likely to change.",
|
2014-08-27 10:41:19 -04:00
|
|
|
"type": "void",
|
|
|
|
"nickname": "add_room_alias",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "roomAlias",
|
|
|
|
"description": "The room alias to set.",
|
|
|
|
"required": true,
|
|
|
|
"type": "string",
|
|
|
|
"paramType": "path"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "body",
|
|
|
|
"description": "The room ID to set.",
|
|
|
|
"required": true,
|
|
|
|
"type": "RoomAliasRequest",
|
|
|
|
"paramType": "body"
|
|
|
|
}
|
|
|
|
]
|
2014-10-06 04:23:19 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"method": "DELETE",
|
|
|
|
"summary": "Removes a mapping of room alias to room ID.",
|
|
|
|
"notes": "Only privileged users can perform this action.",
|
|
|
|
"type": "void",
|
|
|
|
"nickname": "remove_room_alias",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "roomAlias",
|
|
|
|
"description": "The room alias to remove.",
|
|
|
|
"required": true,
|
|
|
|
"type": "string",
|
|
|
|
"paramType": "path"
|
|
|
|
}
|
|
|
|
]
|
2014-08-27 10:41:19 -04:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"models": {
|
|
|
|
"DirectoryResponse": {
|
|
|
|
"id": "DirectoryResponse",
|
|
|
|
"properties": {
|
|
|
|
"room_id": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "The fully-qualified room ID.",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
"servers": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "string"
|
|
|
|
},
|
|
|
|
"description": "A list of servers that know about this room.",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"RoomAliasRequest": {
|
|
|
|
"id": "RoomAliasRequest",
|
|
|
|
"properties": {
|
|
|
|
"room_id": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "The room ID to map the alias to.",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|