255 lines
4.9 KiB
JSON
255 lines
4.9 KiB
JSON
{
|
|
"openapi": "3.0.1",
|
|
"info": {
|
|
"title": "YD_TrainingCompetition_Api",
|
|
"version": "1.0"
|
|
},
|
|
"paths": {
|
|
"/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": {
|
|
"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
|
|
},
|
|
"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
|
|
}
|
|
}
|
|
}
|
|
} |