{ "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", "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/roomConfig" } } } }, "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"], "parameters": [ { "in": "path", "name": "roomId", "schema": { "type": "string" }, "required": true } ], "responses": { "204": { "description": "Success" }, "405": { "description": "Room is protected from deletion" }, "500": { "description": "Internal error" } } } }, "/api/groups/{groupId}/join": { "get": { "summary": "Joins a room within a group", "tags": ["API"], "parameters": [ { "in": "path", "name": "groupId", "schema": { "type": "string" }, "required": true } ], "responses": { "302": { "description": "Redirect to an Zoom.Us join URL" }, "404": { "description": "If no rooms are assigned to the group or the group could not be found." } } } }, "/api/clientConfig": { "get": { "summary": "Config for client side rendering", "tags": ["API"], "responses": { "200": { "description": "Config", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/clientConfig" } } } } } } }, "/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/clientConfig": { "patch": { "summary": "Replace the client config", "tags": ["Admin"], "security": [ { "basicAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/clientConfig" } } } }, "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/meeting/{meetingId}/participants": { "get": { "summary": "Get participants for a meeting", "tags": ["API"], "parameters": [ { "in": "path", "name": "meetingId", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/participant" } } } } }, "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": { "clientConfig": { "properties": { "backgroundUrl": { "type": "string", "description": "URL to a background image, must be publicly accessible", "example": "http://bla.blub/example.png" }, "viewMode": { "type": "string", "enum": ["list", "grid"] }, "theme": { "type": "string", "enum": ["blue", "yellow"] } } }, "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" } } }, "groupJoinConfig": { "type": "object", "required": ["minimumParticipantCount", "title", "description"], "properties": { "minimumParticipantCount": { "type": "number", "description": "Minimum number of participants in a room. When this count has been reached, the next one will be filled.", "example": 3 }, "title": { "type": "string", "description": "Title that is displayed as the header of the group join card.", "example": "Coffee Rooms" }, "subtitle": { "type": "string", "description": "Subtitle that is displayed underneath the header of the group join card.", "example": "Lunch" }, "description": { "type": "string", "description": "Description that explains the group join functionality to users.", "example": "You can randomly join one of our coffee rooms." } } }, "date": { "type": "string", "description": "ISO 8601 string", "example": "2016-05-25T09:08:34.123+06:00" }, "group": { "type": "object", "required": ["id", "name"], "properties": { "id": { "type": "string", "example": "1" }, "name": { "type": "string", "example": "Lord of the Rings" }, "disabledAfter": { "$ref": "#/components/schemas/date" }, "disabledBefore": { "$ref": "#/components/schemas/date" }, "joinableAfter": { "$ref": "#/components/schemas/date" }, "groupJoin": { "$ref": "#/components/schemas/groupJoinConfig" } } }, "office": { "type": "object", "required": ["groups", "rooms"], "properties": { "groups": { "type": "array", "items": { "$ref": "#/components/schemas/group" } }, "rooms": { "type": "array", "items": { "$ref": "#/components/schemas/room" } } } }, "roomConfig": { "type": "object", "required": ["meetingId", "name"], "properties": { "meetingId": { "type": "string", "example": "xxxxxxxx" }, "roomId": { "type": "string", "example": "xxxxxxxx" }, "group": { "type": "string", "example": "1" }, "name": { "type": "string", "example": "Coffee Kitchen" }, "subtitle": { "type": "string", "example": "@Cozy Corner" }, "description": { "type": "string", "example": "Come in and chill out" }, "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": { "required": ["roomId"], "allOf": [ { "$ref": "#/components/schemas/roomConfig" } ], "type": "object" }, "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/roomConfig" } } } } } } }