Skip to content

Commit 366e6f3

Browse files
committed
Merge changes from subtree
1 parent dc0f7d6 commit 366e6f3

File tree

5 files changed

+767
-47
lines changed

5 files changed

+767
-47
lines changed

auth/niauth.yaml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ securityDefinitions:
1414
in: header
1515
security:
1616
- ApiKeyAuth: []
17-
schemes:
18-
- https
1917
paths:
2018
/auth:
2119
get:
@@ -32,25 +30,6 @@ paths:
3230
default:
3331
$ref: '#/responses/Error'
3432

35-
/session-keys:
36-
post:
37-
tags:
38-
- keys
39-
summary: Creates temporary API Keys
40-
description: Create a temporary session key which is valid for 1 hour. The caller needs a whitelisted API key to issue session keys.
41-
operationId: create-session-key
42-
parameters:
43-
- $ref: '#/parameters/CreateSessionKeyRequest'
44-
responses:
45-
200:
46-
$ref: '#/responses/CreateSessionKeyResponse'
47-
400:
48-
$ref: '#/responses/ValidationError'
49-
401:
50-
$ref: '#/responses/Unauthorized'
51-
default:
52-
$ref: '#/responses/Error'
53-
5433
/keys:
5534
get:
5635
tags:
@@ -411,6 +390,25 @@ paths:
411390
default:
412391
$ref: '#/responses/Error'
413392

393+
/session-keys:
394+
post:
395+
tags:
396+
- whitelisted operations
397+
summary: Creates temporary API Keys
398+
description: Create a temporary session key which is valid for 1 hour. The caller needs a whitelisted API key to issue session keys.
399+
operationId: create-session-key
400+
parameters:
401+
- $ref: '#/parameters/CreateSessionKeyRequest'
402+
responses:
403+
200:
404+
$ref: '#/responses/CreateSessionKeyResponse'
405+
400:
406+
$ref: '#/responses/ValidationError'
407+
401:
408+
$ref: '#/responses/Unauthorized'
409+
default:
410+
$ref: '#/responses/Error'
411+
414412
definitions:
415413
AuthStatement:
416414
type: object

message/nimessage.yml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ responses:
3030
WWW_Authenticate:
3131
description: Information for how to authenticate (sent only from SystemLink Server).
3232
type: string
33+
34+
ValidationError:
35+
description: Invalid input data
36+
schema:
37+
description: Error response
38+
title: ErrorResponse
39+
type: object
40+
properties:
41+
error:
42+
$ref: '#/definitions/Error'
43+
3344
Error:
3445
description: Error
3546
schema:
@@ -47,6 +58,21 @@ parameters:
4758
description: Unique session ID
4859
type: string
4960
required: true
61+
CreateSessionRequest:
62+
in: body
63+
name: createSessionRequest
64+
description: Request to create a new session
65+
schema:
66+
title: Create Session Request
67+
description: Creates a message session with the server to send and receive messages.
68+
type: object
69+
properties:
70+
workspace:
71+
type: string
72+
description: The ID of the workspace used by this session.
73+
example: 8472777d-8e2f-4c42-bceb-7901ede23085
74+
example:
75+
workspace: 8472777d-8e2f-4c42-bceb-7901ede23085
5076

5177
paths:
5278
/v1/sessions:
@@ -56,11 +82,15 @@ paths:
5682
summary: Create a session
5783
description: Creates a message session with the server to send and receive messages.
5884
operationId: CreateSession
85+
parameters:
86+
- $ref: '#/parameters/CreateSessionRequest'
5987
responses:
6088
200:
6189
schema:
6290
$ref: '#/definitions/SessionToken'
6391
description: Success
92+
400:
93+
$ref: '#/responses/ValidationError'
6494
401:
6595
$ref: '#/responses/Unauthorized'
6696
403:
@@ -228,13 +258,19 @@ paths:
228258
/v1/websocket:
229259
get:
230260
tags:
231-
- webSocket (SystemLink Server only)
261+
- webSocket
232262
summary: Open a WebSocket session
233263
description: Opens a persistent connection to the web server that allows two-way communication using a JSON
234264
protocol. After you open a connection, you can publish messages and subscribe or unsubscribe to topics.
235-
Refer to the *Models* section to access the schema for these actions. SystemLink Cloud does not support WebSocket connections.
265+
Refer to the *Models* section to access the schema for these actions.
236266
operationId: OpenWebSocketSession
237267
parameters:
268+
- in: query
269+
name: workspace
270+
description: The ID of the workspace used by this session.
271+
type: string
272+
required: false
273+
x-example: c04c612b-0ba8-4c8e-a8af-a7f314c44715
238274
- in: header
239275
name: Upgrade
240276
type: string
@@ -264,6 +300,12 @@ paths:
264300
Sec-WebSocket-Accept:
265301
description: Used in the WebSocket opening handshake. Set to a value derived from the Sec-WebSocket-Key header.
266302
type: string
303+
400:
304+
$ref: '#/responses/ValidationError'
305+
401:
306+
$ref: '#/responses/Unauthorized'
307+
403:
308+
description: Reached the maximum number of sessions
267309
426:
268310
description: Upgrade Required
269311

tdm-reader/nitdmreader.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ definitions:
359359
properties:
360360
x:
361361
$ref: '#/definitions/OneChannelData'
362-
y:
362+
'y':
363363
type: array
364364
description: Array of y channels
365365
items:

user/niuser.yaml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,7 @@ securityDefinitions:
1414
in: header
1515
security:
1616
- ApiKeyAuth: []
17-
schemes:
18-
- https
1917
paths:
20-
'/orgs/{name}':
21-
get:
22-
tags:
23-
- orgs
24-
summary: 'Get organization'
25-
operationId: get-org
26-
description: Returns the organization with the given name
27-
parameters:
28-
- in: path
29-
required: true
30-
name: name
31-
description: The org name, e.g. 'SystemLink Server'
32-
type: string
33-
responses:
34-
200:
35-
$ref: '#/responses/GetOrgResponse'
36-
404:
37-
$ref: '#/responses/NotFound'
38-
default:
39-
$ref: '#/responses/Error'
40-
4118
'/users/query':
4219
post:
4320
tags:
@@ -305,6 +282,27 @@ paths:
305282
default:
306283
$ref: '#/responses/Error'
307284

285+
'/orgs/{name}':
286+
get:
287+
tags:
288+
- whitelisted operations
289+
summary: 'Get organization'
290+
operationId: get-org
291+
description: Returns the organization with the given name. The caller needs a whitelisted API key to read organizations.
292+
parameters:
293+
- in: path
294+
required: true
295+
name: name
296+
description: The org name, e.g. 'SystemLink Server'
297+
type: string
298+
responses:
299+
200:
300+
$ref: '#/responses/GetOrgResponse'
301+
404:
302+
$ref: '#/responses/NotFound'
303+
default:
304+
$ref: '#/responses/Error'
305+
308306
'/websocket':
309307
get:
310308
tags:

0 commit comments

Comments
 (0)