Web Pub Sub - Grant Permission
Grant permission to the connection.
PUT {endpoint}/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}?api-version=2024-01-01
PUT {endpoint}/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}?targetName={targetName}&api-version=2024-01-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
connection
|
path | True |
string |
Target connection Id. |
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: |
permission
|
path | True |
The permission: current supported actions are joinLeaveGroup and sendToGroup. |
|
api-version
|
query | True |
string |
The version of the REST APIs. |
target
|
query |
string |
The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
Error response Headers x-ms-error-code: string |
Examples
WebPubSub_GrantPermission
Sample request
PUT {endpoint}/api/hubs/hub1/permissions/joinLeaveGroup/connections/connection1?targetName=group1&api-version=2024-01-01
Sample response
Definitions
Name | Description |
---|---|
Error |
The error object. |
Inner |
|
Web |
The permission: current supported actions are joinLeaveGroup and sendToGroup. |
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 |
WebPubSubPermission
The permission: current supported actions are joinLeaveGroup and sendToGroup.
Name | Type | Description |
---|---|---|
joinLeaveGroup |
string |
|
sendToGroup |
string |