Web Pub Sub - Add Connections To Groups
Add filtered connections to multiple groups.
POST {endpoint}/api/hubs/{hub}/:addToGroups?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: |
api-version
|
query | True |
string |
The version of the REST APIs. |
Request Body
Name | Type | Description |
---|---|---|
filter |
string |
An OData filter which target connections satisfy |
groups |
string[] |
A list of groups which target connections will be added into |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
Error response Headers x-ms-error-code: string |
Examples
WebPubSub_AddConnectionsToGroups
Sample request
POST {endpoint}/api/hubs/hub1/:addToGroups?api-version=2024-01-01
{
"groups": [
"group1",
"group2"
],
"filter": "startswith(userId, 'listener-')"
}
Sample response
Definitions
Name | Description |
---|---|
Add |
The request object containing targets groups and a connection filter |
Error |
The error object. |
Inner |
AddToGroupsRequest
The request object containing targets groups and a connection filter
Name | Type | Description |
---|---|---|
filter |
string |
An OData filter which target connections satisfy |
groups |
string[] |
A list of groups which target connections will be added into |
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 |