Web Pub Sub - Close User Connections
Close connections for the specific user.
POST {endpoint}/api/hubs/{hub}/users/{userId}/:closeConnections?api-version=2024-01-01
POST {endpoint}/api/hubs/{hub}/users/{userId}/:closeConnections?excluded={excluded}&reason={reason}&api-version=2024-01-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string url |
HTTP or HTTPS endpoint for the Web PubSub service instance. |
hub
|
path | True |
string |
Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. Regex pattern: |
user
|
path | True |
string |
The user Id. |
api-version
|
query | True |
string |
The version of the REST APIs. |
excluded
|
query |
string[] |
Exclude these connectionIds when closing the connections for the user. |
|
reason
|
query |
string |
The reason closing the client connection. |
Responses
Name | Type | Description |
---|---|---|
204 No Content |
No Content |
|
Other Status Codes |
Error response Headers x-ms-error-code: string |
Examples
WebPubSub_CloseUserConnections
Sample request
POST {endpoint}/api/hubs/hub1/users/user1/:closeConnections?reason=Close reason&api-version=2024-01-01
Sample response
Definitions
Name | Description |
---|---|
Error |
The error object. |
Inner |
ErrorDetail
The error object.
Name | Type | Description |
---|---|---|
code |
string |
One of a server-defined set of error codes. |
details |
An array of details about specific errors that led to this reported error. |
|
inner | ||
message |
string |
A human-readable representation of the error. |
target |
string |
The target of the error. |
InnerError
Name | Type | Description |
---|---|---|
code |
string |
A more specific error code than was provided by the containing error. |
inner |