Skip to content

Commit 8ed50be

Browse files
authored
Add more APIs in SignalR Service v1
Add more APIs supported and minor updates 1. Add/Remove/Send/Close connection 2. Remove user from all groups 3. Service health 4. Add response code for GET methods 5. Minor uniform expression
1 parent 58caad9 commit 8ed50be

File tree

1 file changed

+74
-4
lines changed

1 file changed

+74
-4
lines changed

articles/azure-signalr/signalr-quickstart-rest-api.md

Lines changed: 74 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,17 @@ API | `1.0-preview` | `1.0`
125125
[Broadcast to all](#broadcast) | **✓** | **✓**
126126
[Broadcast to a group](#broadcast-group) | **✓** | **✓**
127127
Broadcast to some groups | **✓** (Deprecated) | `N / A`
128-
[Send to specific users](#send-user) | **✓** | **✓**
128+
[Send to a user](#send-user) | **✓** | **✓**
129129
Send to some users | **✓** (Deprecated) | `N / A`
130130
[Adding a user to a group](#add-user-to-group) | `N / A` | **✓**
131131
[Removing a user from a group](#remove-user-from-group) | `N / A` | **✓**
132+
[Check user existence](#check-user-existence) | `N / A` | **✓**
133+
[Remove a user from all groups](#remove-user-from-all-groups) | `N / A` | **✓**
134+
[Send to a connection](#send-connection) | `N / A` | **✓**
135+
[Add a connection to a group](#add-connection-to-group) | `N / A` | **✓**
136+
[Remove a connection from a group](#remove-connection-from-group) | `N / A` | **✓**
137+
[Close a client connection](#close-connection) | `N / A` | **✓**
138+
[Service Health](#service-health) | `N / A` | **✓**
132139
133140
<a name="broadcast"> </a>
134141
### Broadcast to everyone
@@ -147,7 +154,7 @@ Version | API HTTP Method | Request URL | Request body
147154
`1.0` | `POST` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/groups/<group-name>` | Same as above
148155
149156
<a name="send-user"> </a>
150-
### Sending to specific users
157+
### Sending to a user
151158
152159
Version | API HTTP Method | Request URL | Request body
153160
--- | --- | --- | ---
@@ -159,14 +166,77 @@ Version | API HTTP Method | Request URL | Request body
159166
160167
Version | API HTTP Method | Request URL
161168
--- | --- | ---
162-
`1.0` | `PUT` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/groups/<group-name>/users/<userid>`
169+
`1.0` | `PUT` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/groups/<group-name>/users/<user-id>`
163170
164171
<a name="remove-user-from-group"> </a>
165172
### Removing a user from a group
166173
167174
Version | API HTTP Method | Request URL
168175
--- | --- | ---
169-
`1.0` | `DELETE` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/groups/<group-name>/users/<userid>`
176+
`1.0` | `DELETE` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/groups/<group-name>/users/<user-id>`
177+
178+
<a name="check-user-existence"> </a>
179+
### Check user existence in a group
180+
181+
API Version | API HTTP Method | Request URL
182+
---|---|---
183+
`1.0` | `GET` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/users/<user-id>/groups/<group-name>`
184+
`1.0` | `GET` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/groups/<group-name>/users/<user-id>`
185+
186+
Response Status Code | Description
187+
---|---
188+
`200` | User exists
189+
`404` | User not exists
190+
191+
<a name="remove-user-from-all-groups"> </a>
192+
### Remove a user from all groups
193+
194+
API Version | API HTTP Method | Request URL
195+
---|---|---
196+
`1.0` | `DELETE` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/users/<user-id>/groups`
197+
198+
<a name="send-connection"> </a>
199+
### Send message to a connection
200+
201+
API Version | API HTTP Method | Request URL | Request Body
202+
---|---|---|---
203+
`1.0` | `POST` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/connections/<connection-id>` | `{ "target":"<method-name>", "arguments":[ ... ] }`
204+
205+
<a name="add-connection-to-group"> </a>
206+
### Add a connection to a group
207+
208+
API Version | API HTTP Method | Request URL
209+
---|---|---
210+
`1.0` | `PUT` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/groups/<group-name>/connections/<connection-id>`
211+
`1.0` | `PUT` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/connections/<connection-id>/groups/<group-name>`
212+
213+
<a name="remove-connection-from-group"> </a>
214+
### Remove a connection from a group
215+
216+
API Version | API HTTP Method | Request URL
217+
---|---|---
218+
`1.0` | `DELETE` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/groups/<group-name>/connections/<connection-id>`
219+
`1.0` | `DELETE` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/connections/<connection-id>/groups/<group-name>`
220+
221+
<a name="close-connection"> </a>
222+
### Close a client connection
223+
224+
API Version | API HTTP Method | Request URL
225+
---|---|---
226+
`1.0` | `DELETE` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/connections/<connection-id>`
227+
`1.0` | `DELETE` | `https://<instance-name>.service.signalr.net/api/v1/hubs/<hub-name>/connections/<connection-id>?reason=<close-reason>`
228+
229+
<a name="service-health"> </a>
230+
### Service Health
231+
232+
API Version | API HTTP Method | Request URL
233+
---|---|---
234+
`1.0` | `GET` | `https://<instance-name>.service.signalr.net/api/v1/health`
235+
236+
Response Status Code | Description
237+
---|---
238+
`200` | Service Good
239+
`503` | Service Unavailable
170240
171241
[!INCLUDE [Cleanup](includes/signalr-quickstart-cleanup.md)]
172242

0 commit comments

Comments
 (0)