title | description | author | ms.author | ms.service | ms.topic | ms.date |
---|---|---|---|---|---|---|
Azure SignalR service data plane REST API reference - v20220601 |
Describes REST APIs version v20220601 Azure SignalR service supports to manage the connections and send messages to them. |
vwxyzh |
zhyan |
signalr |
reference |
02/22/2023 |
API | Path |
---|---|
Get service health status. | HEAD /api/health |
Close all of the connections in the hub. | POST /api/hubs/{hub}/:closeConnections |
Broadcast a message to all clients connected to target hub. | POST /api/hubs/{hub}/:send |
Check if the connection with the given connectionId exists | HEAD /api/hubs/{hub}/connections/{connectionId} |
Close the client connection | DELETE /api/hubs/{hub}/connections/{connectionId} |
Send message to the specific connection. | POST /api/hubs/{hub}/connections/{connectionId}/:send |
Check if there are any client connections inside the given group | HEAD /api/hubs/{hub}/groups/{group} |
Close connections in the specific group. | POST /api/hubs/{hub}/groups/{group}/:closeConnections |
Broadcast a message to all clients within the target group. | POST /api/hubs/{hub}/groups/{group}/:send |
Add a connection to the target group. | PUT /api/hubs/{hub}/groups/{group}/connections/{connectionId} |
Remove a connection from the target group. | DELETE /api/hubs/{hub}/groups/{group}/connections/{connectionId} |
Remove a connection from all groups | DELETE /api/hubs/{hub}/connections/{connectionId}/groups |
Check if there are any client connections connected for the given user | HEAD /api/hubs/{hub}/users/{user} |
Close connections for the specific user. | POST /api/hubs/{hub}/users/{user}/:closeConnections |
Broadcast a message to all clients belong to the target user. | POST /api/hubs/{hub}/users/{user}/:send |
Check whether a user exists in the target group. | HEAD /api/hubs/{hub}/users/{user}/groups/{group} |
Add a user to the target group. | PUT /api/hubs/{hub}/users/{user}/groups/{group} |
Remove a user from the target group. | DELETE /api/hubs/{hub}/users/{user}/groups/{group} |
Remove a user from all groups. | DELETE /api/hubs/{hub}/users/{user}/groups |
Get service health status.
HEAD /api/health
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description |
---|---|
200 | The service is healthy |
default | Error response |
Close all of the connections in the hub.
POST /api/hubs/{hub}/:closeConnections
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
excluded | query | Exclude these connectionIds when closing the connections in the hub. | No | [ string ] |
reason | query | The reason closing the client connections. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
204 | Success | |
default | Error response | ErrorDetail |
Broadcast a message to all clients connected to target hub.
POST /api/hubs/{hub}/:send
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
excluded | query | Excluded connection Ids | No | [ string ] |
api-version | query | The version of the REST APIs. | Yes | string |
message | body | The payload message. | Yes | PayloadMessage |
Code | Description | Schema |
---|---|---|
202 | Success | ServiceResponse |
default | Error response | ErrorDetail |
Check if the connection with the given connectionId exists
HEAD /api/hubs/{hub}/connections/{connectionId}
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
connectionId | path | The connection Id. | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
200 | Success | ServiceResponse |
default | Error response | ErrorDetail |
Close the client connection
DELETE /api/hubs/{hub}/connections/{connectionId}
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
connectionId | path | The connection Id. | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
reason | query | The reason of the connection close. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
200 | Success | ServiceResponse |
default | Error response | ErrorDetail |
Send message to the specific connection.
POST /api/hubs/{hub}/connections/{connectionId}/:send
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
connectionId | path | The connection Id. | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
message | body | The payload message. | Yes | PayloadMessage |
Code | Description | Schema |
---|---|---|
202 | Success | ServiceResponse |
default | Error response | ErrorDetail |
Check if there are any client connections inside the given group
HEAD /api/hubs/{hub}/groups/{group}
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
group | path | Target group name, which length should be greater than 0 and less than 1025. | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
200 | Success | ServiceResponse |
404 | Not Found | |
default | Error response | ErrorDetail |
Close connections in the specific group.
POST /api/hubs/{hub}/groups/{group}/:closeConnections
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
group | path | Target group name, which length should be greater than 0 and less than 1025. | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
excluded | query | Exclude these connectionIds when closing the connections in the hub. | No | [ string ] |
reason | query | The reason closing the client connections. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
204 | Success | |
default | Error response | ErrorDetail |
Broadcast a message to all clients within the target group.
POST /api/hubs/{hub}/groups/{group}/:send
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
group | path | Target group name, which length should be greater than 0 and less than 1025. | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
excluded | query | Excluded connection Ids | No | [ string ] |
api-version | query | The version of the REST APIs. | Yes | string |
message | body | The payload message. | Yes | PayloadMessage |
Code | Description | Schema |
---|---|---|
202 | Success | ServiceResponse |
default | Error response | ErrorDetail |
Add a connection to the target group.
PUT /api/hubs/{hub}/groups/{group}/connections/{connectionId}
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
group | path | Target group name, which length should be greater than 0 and less than 1025. | Yes | string |
connectionId | path | Target connection Id | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
200 | Success | ServiceResponse |
404 | Not Found | |
default | Error response | ErrorDetail |
Remove a connection from the target group.
DELETE /api/hubs/{hub}/groups/{group}/connections/{connectionId}
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
group | path | Target group name, which length should be greater than 0 and less than 1025. | Yes | string |
connectionId | path | Target connection Id | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
200 | Success | ServiceResponse |
404 | Not Found | |
default | Error response | ErrorDetail |
Remove a connection from all groups
DELETE /api/hubs/{hub}/connections/{connectionId}/groups
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
connectionId | path | Target connection Id | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
200 | Success | ServiceResponse |
default | Error response | ErrorDetail |
Check if there are any client connections connected for the given user
HEAD /api/hubs/{hub}/users/{user}
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
user | path | The user Id. | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
200 | Success | ServiceResponse |
404 | Not Found | |
default | Error response | ErrorDetail |
Close connections for the specific user.
POST /api/hubs/{hub}/users/{user}/:closeConnections
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
user | path | The user Id. | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
excluded | query | Exclude these connectionIds when closing the connections in the hub. | No | [ string ] |
reason | query | The reason closing the client connections. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
204 | Success | |
default | Error response | ErrorDetail |
Broadcast a message to all clients belong to the target user.
POST /api/hubs/{hub}/users/{user}/:send
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
user | path | The user Id. | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
message | body | The payload message. | Yes | PayloadMessage |
Code | Description | Schema |
---|---|---|
202 | Success | ServiceResponse |
default | Error response | ErrorDetail |
Check whether a user exists in the target group.
HEAD /api/hubs/{hub}/users/{user}/groups/{group}
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
group | path | Target group name, which length should be greater than 0 and less than 1025. | Yes | string |
user | path | Target user Id | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
200 | Success | ServiceResponse |
404 | Not Found | |
default | Error response | ErrorDetail |
Add a user to the target group.
PUT /api/hubs/{hub}/users/{user}/groups/{group}
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
group | path | Target group name, which length should be greater than 0 and less than 1025. | Yes | string |
user | path | Target user Id | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
ttl | query | Specifies the seconds that the user exists in the group. If not set, the user lives in the group for 1 year at most. If a user is added to some groups without ttl limitation, only the latest updated 100 groups will be reserved among all groups the user joined without TTL. If ttl = 0, only the current connected connections of the target user will be added to the target group. | No | integer |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
200 | Success | ServiceResponse |
default | Error response | ErrorDetail |
Remove a user from the target group.
DELETE /api/hubs/{hub}/users/{user}/groups/{group}
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
group | path | Target group name, which length should be greater than 0 and less than 1025. | Yes | string |
user | path | Target user Id | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
204 | Success | |
default | Error response | ErrorDetail |
Remove a user from all groups.
DELETE /api/hubs/{hub}/users/{user}/groups
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hub | path | Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | Yes | string |
user | path | Target user Id | Yes | string |
application | query | Target application name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. | No | string |
api-version | query | The version of the REST APIs. | Yes | string |
Code | Description | Schema |
---|---|---|
204 | Success | |
default | Error response | ErrorDetail |
The error object.
Name | Type | Description | Required |
---|---|---|---|
code | string | One of a server-defined set of error codes. | No |
message | string | A human-readable representation of the error. | No |
target | string | The target of the error. | No |
details | [ ErrorDetail ] | An array of details about specific errors that led to this reported error. | No |
inner | InnerError | No |
Name | Type | Description | Required |
---|---|---|---|
code | string | A more specific error code than was provided by the containing error. | No |
inner | InnerError | No |
Name | Type | Description | Required |
---|---|---|---|
target | string | Yes | |
arguments | [ ] | No |
Name | Type | Description | Required |
---|---|---|---|
code | string | No | |
level | string | Enum: "Info" , "Warning" , "Error" |
No |
scope | string | Enum: "Unknown" , "Request" , "Connection" , "User" , "Group" |
No |
errorKind | string | Enum: "Unknown" , "NotExisted" , "NotInGroup" , "Invalid" |
No |
message | string | No | |
jsonObject | No | ||
isSuccess | boolean | No |