{ "openapi": "3.0.1", "info": { "title": "YD_TrainingCompetition_Api", "version": "1.0" }, "paths": { "/api/Competition/session": { "get": { "tags": [ "Competition" ], "responses": { "200": { "description": "OK" } } }, "post": { "tags": [ "Competition" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCompetitionSessionRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CreateCompetitionSessionRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/CreateCompetitionSessionRequest" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Competition/rounds/{roundIndex}/select": { "post": { "tags": [ "Competition" ], "parameters": [ { "name": "roundIndex", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Competition/rounds/next": { "post": { "tags": [ "Competition" ], "responses": { "200": { "description": "OK" } } } }, "/api/Competition/rounds/previous": { "post": { "tags": [ "Competition" ], "responses": { "200": { "description": "OK" } } } }, "/api/Competition/rounds/current/download": { "post": { "tags": [ "Competition" ], "responses": { "200": { "description": "OK" } } } }, "/api/Competition/test/start": { "post": { "tags": [ "Competition" ], "responses": { "200": { "description": "OK" } } } }, "/api/Competition/test/stop": { "post": { "tags": [ "Competition" ], "responses": { "200": { "description": "OK" } } } }, "/api/Competition/test/reset": { "post": { "tags": [ "Competition" ], "responses": { "200": { "description": "OK" } } } }, "/api/Competition/participants/{participantId}/count": { "post": { "tags": [ "Competition" ], "parameters": [ { "name": "participantId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompetitionParticipantCountRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CompetitionParticipantCountRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/CompetitionParticipantCountRequest" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Competition/participants/{participantId}/delta": { "post": { "tags": [ "Competition" ], "parameters": [ { "name": "participantId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompetitionParticipantDeltaRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CompetitionParticipantDeltaRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/CompetitionParticipantDeltaRequest" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Devices": { "get": { "tags": [ "Devices" ], "responses": { "200": { "description": "OK" } } } }, "/api/Devices/{deviceId}": { "get": { "tags": [ "Devices" ], "parameters": [ { "name": "deviceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Devices/ingest": { "post": { "tags": [ "Devices" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceTelemetry" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DeviceTelemetry" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DeviceTelemetry" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Health": { "get": { "tags": [ "Health" ], "responses": { "200": { "description": "OK" } } } }, "/api/Roster/templates": { "get": { "tags": [ "Roster" ], "responses": { "200": { "description": "OK" } } } }, "/api/Roster/load": { "get": { "tags": [ "Roster" ], "parameters": [ { "name": "file", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Roster/apply": { "post": { "tags": [ "Roster" ], "parameters": [ { "name": "file", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Serial/ports": { "get": { "tags": [ "Serial" ], "responses": { "200": { "description": "OK" } } } }, "/api/Serial/status": { "get": { "tags": [ "Serial" ], "responses": { "200": { "description": "OK" } } } }, "/api/Serial/open/{portName}": { "post": { "tags": [ "Serial" ], "parameters": [ { "name": "portName", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Serial/close": { "post": { "tags": [ "Serial" ], "responses": { "200": { "description": "OK" } } } } }, "components": { "schemas": { "CompetitionParticipantCountRequest": { "type": "object", "properties": { "count": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "CompetitionParticipantDeltaRequest": { "type": "object", "properties": { "delta": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "CreateCompetitionParticipantRequest": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "nullable": true }, "name": { "type": "string", "nullable": true }, "projectName": { "type": "string", "nullable": true }, "school": { "type": "string", "nullable": true }, "deviceId": { "type": "string", "nullable": true }, "rfid": { "type": "string", "nullable": true }, "roundIndex": { "type": "integer", "format": "int32", "nullable": true }, "slotIndex": { "type": "integer", "format": "int32", "nullable": true }, "count": { "type": "integer", "format": "int32", "nullable": true } }, "additionalProperties": false }, "CreateCompetitionSessionRequest": { "type": "object", "properties": { "eventId": { "type": "string", "nullable": true }, "eventName": { "type": "string", "nullable": true }, "rosterPath": { "type": "string", "nullable": true }, "totalRounds": { "type": "integer", "format": "int32", "nullable": true }, "testDurationSeconds": { "type": "integer", "format": "int32", "nullable": true }, "roundParticipantCounts": { "type": "array", "items": { "type": "integer", "format": "int32" }, "nullable": true }, "roundNames": { "type": "array", "items": { "type": "string" }, "nullable": true }, "participants": { "type": "array", "items": { "$ref": "#/components/schemas/CreateCompetitionParticipantRequest" }, "nullable": true } }, "additionalProperties": false }, "DeviceTelemetry": { "type": "object", "properties": { "deviceId": { "type": "string", "nullable": true }, "counter": { "type": "integer", "format": "int32" }, "bsName": { "type": "string", "nullable": true }, "athleteName": { "type": "string", "nullable": true }, "school": { "type": "string", "nullable": true }, "errorCount": { "type": "integer", "format": "int32", "nullable": true }, "battery": { "type": "integer", "format": "int32", "nullable": true }, "mode": { "type": "integer", "format": "int32", "nullable": true }, "remainingSeconds": { "type": "integer", "format": "int32", "nullable": true }, "rssi": { "type": "integer", "format": "int32", "nullable": true }, "gatewayId": { "type": "string", "nullable": true }, "timestamp": { "type": "string", "format": "date-time" }, "ingestedAt": { "type": "string", "format": "date-time" } }, "additionalProperties": false } } } }