{ "openapi": "3.0.0", "info": { "version": "1.0", "title": "VEL Connect API", "description": "This API provides an interface with the database for pairing and controlling headsets while within a VEL app." }, "servers": [ { "url": "https://connect.vel.workers.dev/api/" } ], "tags": [ { "name": "Read" }, { "name": "Write" } ], "paths": { "/get_all_headsets": { "get": { "summary": "Get all headset data", "description" : "Gets a list of all headset data that has been stored", "tags": ["Read"], "parameters": [ ] } }, "/pair_headset/{pairing_code}": { "get": { "summary": "Pair a headset by code", "description" : "Tries to pair to a headset with a supplied pairing code. Returns the hw_id if successfully paired. Used by the website for pairing.", "tags": ["Write"], "parameters": [ { "name": "pairing_code", "example": "1234", "in": "path", "description": "Pairing Code", "required": true, "schema": { "type": "integer" } } ] } }, "/update_pairing_code": { "post": { "summary": "Update Pairing Code", "description": "This is called by the VR application on login or when the pairing code is reset. If this is the first time this headset is seen, it also creates this headset in the database. A JSON body must be submitted with hw_id and pairing_code defined.", "tags": ["Write"], "parameters": [ ] } }, "/get_headset_details/{hw_id}": { "get": { "summary": "Get Headset Details", "description" : "Gets the info associated with a specific hardware id.", "tags": ["Read"], "parameters": [ { "name": "hw_id", "example": "123456789", "in": "path", "description": "Hardware id of the device", "required": true, "schema": { "type": "string" } } ] } }, "/get_room_details/{room_id}": { "get": { "summary": "Get Room Details", "description" : "Gets the info associated with a specific room id. Used by the website to show initial data, and polled often by the headset.", "tags": ["Read"], "parameters": [ { "name": "room_id", "example": "1234", "in": "path", "description": "Room id", "required": true, "schema": { "type": "string" } } ] } }, "/update_room/{room_id}": { "post": { "summary": "Update Room Details", "description" : "Sets the info associated with a specific room id. The room id is specified in the url and the data is specified in the JSON body. Used by both the website and headset.", "tags": ["Write"], "parameters": [ { "name": "room_id", "example": "1234", "in": "path", "description": "Room id", "required": true, "schema": { "type": "string" } } ] } } }, "components": { "schemas": { }, "securitySchemes": { "api_key": { "type": "apiKey", "name": "x-api-key", "in": "query" } } }, "security": [ { "BasicAuth": [] } ] }