forked from openbci-archive/OpenBCI_Hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ganglion-api-spec.yaml
139 lines (136 loc) · 3.7 KB
/
ganglion-api-spec.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
---
swagger: '2.0'
info:
version: 1.0.0
title: OpenBCI Ganglion API
################################################################################
# PATHS #
################################################################################
paths:
/s:
get:
description: Scan for Ganglion BLE devices and when found, send their local names to requesting client.
responses:
200:
description: The scan was started
201:
description: A device was discovered.
412:
description: Unable to start scanning
/c:
put:
description: Open a BLE connection
parameters:
- name: port
in: query
description: The name of the BLE device to connect to.
type: string
required: true
responses:
200:
description: Port name connected to
402:
description: Unable to open connection to device
405:
description: Device not found
408:
description: Already connected to a device
413:
description: Timeout connecting to device
/d:
delete:
description: Close an open BLE connection
responses:
200:
description: Closed connection
400:
description: No open BLE device
401:
description: Unable to disconnect from device, try again later.
/k:
put:
description: Send a command to an open BLE device
parameters:
- name: command
in: query
description: The command(s) to send to the BLE device
type: string
required: true
responses:
200:
description: Command sent
400:
description: No open BLE device
406:
description: Command not recognized
/q:
get:
description: Get the connection status
responses:
200:
description: true if connected false if not
/e:
post:
description: Error message from
parameters:
- name: code
in: query
description: The error code
type: integer
required: true
- name: msg
in: query
description: The plain text error message
type: string
responses:
200:
description: Error message
/t:
post:
description: Data from the OpenBCI Ganglion board
responses:
200:
description: Good data packet
500:
description: Bad data packet
/i:
post:
description: Impedance Data from the OpenBCI Ganglion board
parameters:
- name: channelNumber
description: The channel number, either 1, 2, 3, 4 or 0 for reference
in: res
type: integer
required: true
- name: impedance value
description: The impedance value in ohms
in: res
type: integer
required: true
/a:
post:
description: Accel Data from the OpenBCI Ganglion board
parameters:
- name: x axis
description: The raw counts value of the x axis
in: res
type: integer
required: true
- name: y axis
description: The raw counts value of the y axis
in: res
type: integer
required: true
- name: z axis
description: The raw counts value of the z axis
in: res
type: integer
required: true
/l:
post:
description: Log message from the node
parameters:
- name: msg
in: query
description: The plain test log message
type: string