swagger: '2.0'
info:
title: Microsoft Azure Azure Web PubSub Service REST API
version: 2021-08-01-preview
x-ms-parameterized-host:
hostTemplate: '{Endpoint}'
useSchemePrefix: false
parameters:
- $ref: '#/parameters/Endpoint'
paths:
/api/health:
head:
tags:
- General
summary: 'Microsoft Azure Get Service Health Status'
operationId: microsoftAzureHealthapiGetservicestatus
parameters:
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: The service is healthy
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/:generateToken:
post:
tags:
- Webpubsub
summary: 'Microsoft Azure Generate Token For The Client To Connect Azure Web Pubsub Service'
operationId: microsoftAzureWebpubsubGenerateclienttoken
produces:
- text/plain
- application/json
- text/json
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: query
name: userId
description: User Id.
type: string
default: ''
- in: query
name: role
description: Roles that the connection with the generated token will have.
type: array
items:
type: string
collectionFormat: multi
- in: query
name: minutesToExpire
description: The expire time of the generated token.
type: integer
format: int32
default: 60
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
schema:
$ref: '#/definitions/ClientTokenResponse'
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/:send:
post:
tags:
- Webpubsub
summary: >-
Microsoft Azure Broadcast Content Inside Request Body To All The Connected Client Connections
operationId: microsoftAzureWebpubsubSendtoall
consumes:
- application/octet-stream
- text/plain
- application/json
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: query
name: excluded
description: Excluded connection Ids.
type: array
items:
type: string
collectionFormat: multi
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
- in: body
name: message
description: The payload body.
required: true
schema:
format: binary
type: string
responses:
'202':
description: >-
The message is accepted. The service follows fire-and-forget pattern
when sending messages.
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/connections/{connectionId}:
head:
tags:
- Webpubsub
summary: 'Microsoft Azure Check If The Connection With The Given Connectionid Exists'
operationId: microsoftAzureWebpubsubConnectionexists
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: connectionId
description: The connection Id.
required: true
type: string
minLength: 1
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
'404':
description: Not Found
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
delete:
tags:
- Webpubsub
summary: 'Microsoft Azure Close The Client Connection'
operationId: microsoftAzureWebpubsubCloseconnection
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: connectionId
description: Target connection Id.
required: true
type: string
minLength: 1
- in: query
name: reason
description: The reason closing the client connection.
type: string
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/connections/{connectionId}/:send:
post:
tags:
- Webpubsub
summary: 'Microsoft Azure Send Content Inside Request Body To The Specific Connection'
operationId: microsoftAzureWebpubsubSendtoconnection
consumes:
- application/octet-stream
- text/plain
- application/json
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: connectionId
description: The connection Id.
required: true
type: string
minLength: 1
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
- in: body
name: message
description: The payload body.
required: true
schema:
format: binary
type: string
responses:
'202':
description: Success
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/groups/{group}:
head:
tags:
- Webpubsub
summary: Microsoft Azure Check If There Are Any Client Connections Inside The Given Group
operationId: microsoftAzureWebpubsubGroupexists
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: group
description: >-
Target group name, which length should be greater than 0 and less
than 1025.
required: true
type: string
maxLength: 1024
minLength: 1
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
'404':
description: Not Found
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/groups/{group}/:send:
post:
tags:
- Webpubsub
summary: 'Microsoft Azure Send Content Inside Request Body To A Group Of Connections'
operationId: microsoftAzureWebpubsubSendtogroup
consumes:
- application/octet-stream
- text/plain
- application/json
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: group
description: >-
Target group name, which length should be greater than 0 and less
than 1025.
required: true
type: string
maxLength: 1024
minLength: 1
- in: query
name: excluded
description: Excluded connection Ids
type: array
items:
type: string
collectionFormat: multi
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
- in: body
name: message
description: The payload body.
required: true
schema:
format: binary
type: string
responses:
'202':
description: Success
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/groups/{group}/connections/{connectionId}:
put:
tags:
- Webpubsub
summary: 'Microsoft Azure Add A Connection To The Target Group'
operationId: microsoftAzureWebpubsubAddconnectiontogroup
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: group
description: >-
Target group name, which length should be greater than 0 and less
than 1025.
required: true
type: string
maxLength: 1024
minLength: 1
- in: path
name: connectionId
description: Target connection Id
required: true
type: string
minLength: 1
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
'404':
description: Not Found
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
delete:
tags:
- Webpubsub
summary: 'Microsoft Azure Remove A Connection From The Target Group'
operationId: microsoftAzureWebpubsubRemoveconnectionfromgroup
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: group
description: >-
Target group name, which length should be greater than 0 and less
than 1025.
required: true
type: string
maxLength: 1024
minLength: 1
- in: path
name: connectionId
description: Target connection Id.
required: true
type: string
minLength: 1
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/users/{userId}:
head:
tags:
- Webpubsub
summary: 'Microsoft Azure Check If There Are Any Client Connections Connected For The Given User'
operationId: microsoftAzureWebpubsubUserexists
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: userId
description: Target user Id.
required: true
type: string
minLength: 1
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
'404':
description: Not Found
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/users/{userId}/:send:
post:
tags:
- Webpubsub
summary: 'Microsoft Azure Send Content Inside Request Body To The Specific User'
operationId: microsoftAzureWebpubsubSendtouser
consumes:
- application/octet-stream
- text/plain
- application/json
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: userId
description: The user Id.
required: true
type: string
minLength: 1
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
- in: body
name: message
description: The payload body.
required: true
schema:
format: binary
type: string
responses:
'202':
description: Success
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/users/{userId}/groups/{group}:
put:
tags:
- Webpubsub
summary: 'Microsoft Azure Add A User To The Target Group'
operationId: microsoftAzureWebpubsubAddusertogroup
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: group
description: >-
Target group name, which length should be greater than 0 and less
than 1025.
required: true
type: string
maxLength: 1024
minLength: 1
- in: path
name: userId
description: Target user Id.
required: true
type: string
minLength: 1
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
'404':
description: Not Found
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
delete:
tags:
- Webpubsub
summary: 'Microsoft Azure Remove A User From The Target Group'
operationId: microsoftAzureWebpubsubRemoveuserfromgroup
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: group
description: >-
Target group name, which length should be greater than 0 and less
than 1025.
required: true
type: string
maxLength: 1024
minLength: 1
- in: path
name: userId
description: Target user Id.
required: true
type: string
minLength: 1
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/users/{userId}/groups:
delete:
tags:
- Webpubsub
summary: 'Microsoft Azure Remove A User From All Groups'
operationId: microsoftAzureWebpubsubRemoveuserfromallgroups
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: userId
description: Target user Id.
required: true
type: string
minLength: 1
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: The user is deleted.
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}:
put:
tags:
- Webpubsub
summary: 'Microsoft Azure Grant Permission To The Connection'
operationId: microsoftAzureWebpubsubGrantpermission
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: permission
description: >-
The permission: current supported actions are joinLeaveGroup and
sendToGroup.
required: true
type: string
enum:
- sendToGroup
- joinLeaveGroup
x-ms-enum:
name: WebPubSubPermission
modelAsString: true
- in: path
name: connectionId
description: Target connection Id.
required: true
type: string
minLength: 1
- in: query
name: targetName
description: >-
The meaning of the target depends on the specific permission. For
joinLeaveGroup and sendToGroup, targetName is a required parameter
standing for the group name.
type: string
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
delete:
tags:
- Webpubsub
summary: 'Microsoft Azure Revoke Permission For The Connection'
operationId: microsoftAzureWebpubsubRevokepermission
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: permission
description: >-
The permission: current supported actions are joinLeaveGroup and
sendToGroup.
required: true
type: string
enum:
- sendToGroup
- joinLeaveGroup
x-ms-enum:
name: WebPubSubPermission
modelAsString: true
- in: path
name: connectionId
description: Target connection Id.
required: true
type: string
minLength: 1
- in: query
name: targetName
description: >-
The meaning of the target depends on the specific permission. For
joinLeaveGroup and sendToGroup, targetName is a required parameter
standing for the group name.
type: string
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
head:
tags:
- Webpubsub
summary: 'Microsoft Azure Check If A Connection Has Permission To The Specified Action'
operationId: microsoftAzureWebpubsubCheckpermission
parameters:
- in: path
name: hub
description: >-
Target hub name, which should start with alphabetic characters and
only contain alpha-numeric characters or underscore.
required: true
type: string
pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
- in: path
name: permission
description: >-
The permission: current supported actions are joinLeaveGroup and
sendToGroup.
required: true
type: string
enum:
- sendToGroup
- joinLeaveGroup
x-ms-enum:
name: WebPubSubPermission
modelAsString: true
- in: path
name: connectionId
description: Target connection Id.
required: true
type: string
minLength: 1
- in: query
name: targetName
description: >-
The meaning of the target depends on the specific permission. For
joinLeaveGroup and sendToGroup, targetName is a required parameter
standing for the group name.
type: string
- in: query
name: api-version
description: The version of the REST APIs.
type: string
default: 2021-05-01-preview
responses:
'200':
description: Success
'404':
description: Not Found
default:
description: Error response
x-ms-error-response: true
description: Needs a more full description created.
definitions:
ClientTokenResponse:
type: object
properties:
token:
type: string
parameters:
Endpoint:
name: Endpoint
description: HTTP or HTTPS endpoint for the Web PubSub service instance.
x-ms-parameter-location: client
required: true
type: string
in: path
x-ms-skip-url-encoding: true
tags:
- name: General
- name: Webpubsub