Web Pub Sub - Check Permission

Check if a connection has permission to the specified action.

HEAD {endpoint}/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}?api-version=2024-01-01
HEAD {endpoint}/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}?targetName={targetName}&api-version=2024-01-01

URI Parameters

Name In Required Type Description
connectionId
path True

string

minLength: 1

Target connection Id.

endpoint
path True

string (url)

HTTP or HTTPS endpoint for the Web PubSub service instance.

hub
path True

string

pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$

Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

permission
path True

WebPubSubPermission

The permission: current supported actions are joinLeaveGroup and sendToGroup.

api-version
query True

string

The version of the REST APIs.

targetName
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

404 Not Found

Not Found

Other Status Codes

Error response

Headers

x-ms-error-code: string

Examples

WebPubSub_CheckPermission

Sample request

HEAD {endpoint}/api/hubs/hub1/permissions/joinLeaveGroup/connections/connection1?targetName=group1&api-version=2024-01-01

Sample response

Definitions

WebPubSubPermission

The permission: current supported actions are joinLeaveGroup and sendToGroup.

Value Description
joinLeaveGroup
sendToGroup