Web Pub Sub - User Exists

Check if there are any client connections connected for the given user.

HEAD {endpoint}/api/hubs/{hub}/users/{userId}?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: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$

userId
path True

string

Target user Id.

api-version
query True

string

The version of the REST APIs.

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_UserExists

Sample request

HEAD {endpoint}/api/hubs/hub1/users/user1?api-version=2024-01-01

Sample response