Skip to content

Commit c96043d

Browse files
committed
Add workspace to create session (http, websocket)
- Added field 'workspace' to create session and open websocket operations - Removed message that SystemLink Cloud does not support websockets which is not true anymore
1 parent ef6fe1b commit c96043d

File tree

1 file changed

+44
-2
lines changed

1 file changed

+44
-2
lines changed

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

0 commit comments

Comments
 (0)