{ "openapi": "3.0.1", "info": { "title": "Virtual Office", "description": "This is the API documentation for Virtual Office", "version": "0.1" }, "servers": [ { "url": "/" } ], "tags": [ { "name": "Monitoring" }, { "name": "API" }, { "name": "Zoom.us" }, { "name": "Admin" } ], "paths": { "/api/monitoring/health": { "get": { "summary": "Health", "tags": ["Monitoring"], "responses": { "200": { "description": "Healthy" }, "500": { "description": "Unhealthy" } } } }, "/api/office": { "get": { "summary": "Get the whole office incl. rooms with participants", "tags": ["API"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/office" } } } }, "500": { "description": "Internal error" } } } }, "/api/rooms": { "post": { "summary": "Create a user-specific temporary room", "tags": ["API"], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/roomCreation" } } } }, "responses": { "204": { "description": "Success" }, "405": { "description": "Room creation requires a valid user" }, "409": { "description": "Room with same id already exists" }, "500": { "description": "Internal error" } } } }, "/api/rooms/{roomId}": { "delete": { "summary": "Delete a temporary room", "tags": ["API"], "responses": { "204": { "description": "Success" }, "405": { "description": "Room is protected from deletion" }, "500": { "description": "Internal error" } } } }, "/api/zoomus/webhook": { "post": { "summary": "Webhook for zoom.us calls", "tags": ["Zoom.us"], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/zoomusEvent" } } } }, "responses": { "200": { "description": "Success" }, "500": { "description": "Internal error" } } } }, "/api/admin/rooms/{roomId}": { "delete": { "summary": "Delete all room's users", "tags": ["Admin"], "security": [ { "basicAuth": [] } ], "parameters": [ { "in": "path", "name": "roomId", "schema": { "type": "string" }, "required": true, "description": "id of the room that should be deleted" } ], "responses": { "200": { "description": "Success" }, "500": { "description": "Internal error" } } } }, "/api/admin/rooms/{roomId}/{userId}": { "delete": { "summary": "Delete a user in a room", "tags": ["Admin"], "security": [ { "basicAuth": [] } ], "parameters": [ { "in": "path", "name": "roomId", "schema": { "type": "string" }, "required": true, "description": "if of the room" }, { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "id of the user" } ], "responses": { "200": { "description": "Success" }, "500": { "description": "Internal error" } } } }, "/api/admin/replaceOffice": { "post": { "summary": "Replace office (until the next server restart)", "tags": ["Admin"], "security": [ { "basicAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/officeConfiguration" } } } }, "responses": { "200": { "description": "Success" } } } } }, "components": { "securitySchemes": { "basicAuth": { "type": "http", "scheme": "basic" } }, "schemas": { "zoomusEvent": { "properties": { "event": { "type": "string", "example": "meeting.participant_joined", "enum": ["meeting.participant_joined", "meeting.participant_left", "meeting.ended"] }, "payload": { "type": "object", "properties": { "object": { "type": "object", "properties": { "id": { "type": "string", "example": "123456", "description": "Zoom.us meeting id" }, "participant": { "type": "object", "properties": { "id": { "type": "string", "example": "4566", "description": "unique zoom user id" }, "user_name": { "type": "string", "example": "Hans Example", "description": "Name of the user (which she/he entered upon joining the meeting)" } } } } } } } } }, "participant": { "required": ["username"], "properties": { "username": { "type": "string", "example": "hans.example" }, "name": { "type": "string", "example": "Hans Example" }, "email": { "type": "string", "example": "hans.example@example.com" }, "profileImage": { "type": "string", "example": "http://my.image.com/bla.png" } } }, "link": { "required": ["href", "text"], "properties": { "href": { "type": "string", "example": "http://www.google.de" }, "text": { "type": "string", "example": "Google" }, "icon": { "type": "string", "example": "http://example.com/bla.png" } } }, "group": { "type": "object", "required": ["id", "name"], "properties": { "id": { "type": "string", "example": "1" }, "name": { "type": "string", "example": "Lord of the Rings" } } }, "office": { "type": "object", "required": ["groups", "rooms"], "properties": { "groups": { "type": "array", "items": { "$ref": "#/components/schemas/group" } }, "rooms": { "type": "array", "items": { "$ref": "#/components/schemas/room" } } } }, "roomCreation": { "type": "object", "required": ["id", "name"], "properties": { "id": { "type": "string", "example": "xxxxxxxx" }, "group": { "type": "string", "example": "1" }, "name": { "type": "string", "example": "Coffee Kitchen" }, "joinUrl": { "type": "string", "example": "https://zoom.us/j/xxxxxxxx" }, "temporary": { "type": "boolean", "example": "false" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/link" } }, "icon": { "type": "string", "example": "http://example.com/myRoomIcon.png" } } }, "room": { "allOf": [ { "$ref": "#/components/schemas/roomCreation" } ], "type": "object", "properties": { "participants": { "type": "array", "items": { "$ref": "#/components/schemas/participant" } } } }, "rooms": { "type": "array", "items": { "$ref": "#/components/schemas/room" } }, "officeConfiguration": { "type": "object", "properties": { "groups": { "type": "array", "items": { "$ref": "#/components/schemas/group" } }, "rooms": { "type": "array", "items": { "$ref": "#/components/schemas/roomCreation" } } } } } } }