Long Poll For Notifications
GET/notification/v1/player/:player_uuid/stream/notification/lp
This endpoint will return notifications newer than exclude_before. This endpoint returns notifications
from older to newer, which is the opposite of the paging API. The returned cursor value can be used as
exclude_before in subsequent polls to ensure you only receive new notifications.
This operation is a long-poll. That means we will keep the connection open until we get any notification or until the passed in deadline (to the best of our ability). Once one of these happens, we will return the notifications found.
This version can be used for any client provided its id (with proper permissions)
Required Permissions:
-
For any player (including themselves) any of:
notification:player:*,notification:player:read -
For the player themselves any of:
notification:player:self:*,notification:player:self:read
Request
Path Parameters
Query Parameters
Possible values: >= 1 and <= 100
Default value: 10
Max number of entries to return at one time
All notifications including and before this (chronologically) provided id will be ignored when returning results. You cannot depend on the format of this string, and it must be considered opaque
When exclude_before is not found in the stream or not given, begin streaming messages from the earliest/latest message
Possible values: <= 900
Default value: 30
We will try to the best of our ability to return by this deadline, even when we have no notifications. Value should be in seconds
Responses
- 200
- 400
- 403
- 409
- 422
- 503
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
notifications
object[]
List of notifications
Possible values: <= 4096 characters
Base Message for the notification
Possible values: non-empty and <= 4096 characters
Path to get additional data about this notification
custom_data
object
Custom values for the notification
Possible values: non-empty
ETag for the resource at rh_url at the time of this notification
Unique Identifier for the notification. You cannot depend on the format of this string, and it must be considered opaque
When this notification was added
Cursor to use for the next request
{
"notifications": [
{
"message": "string",
"rh_url": "string",
"custom_data": {},
"etag": "string",
"notification_id": "string",
"created": "2024-07-29T15:51:28.071Z"
}
],
"cursor": "string"
}
Error Codes:
-
bad_id- Passed client id is not a valid id
- application/json
- Schema
- Example (from schema)
Schema
Default value: true
{
"auth_success": true,
"error_code": "string",
"desc": "string"
}
Error Codes:
-
auth_invalid_key_id- Invalid Authorization - Invalid Key ID in Access Token -
auth_invalid_version- Invalid Authorization - version -
auth_malformed_access- Invalid Authorization - malformed access token -
auth_not_jwt- Invalid Authorization -
auth_token_expired- Token is expired -
auth_token_format- Invalid Authorization - {} -
auth_token_invalid_claim- Token contained invalid claim value: {} -
auth_token_invalid_type- Invalid Authorization - Invalid Token Type -
auth_token_sig_invalid- Token Signature is invalid -
auth_token_unknown- Failed to parse token -
insufficient_permissions- Insufficient Permissions
- application/json
- Schema
- Example (from schema)
Schema
Default value: true
{
"auth_success": true,
"error_code": "string",
"desc": "string"
}
Error Codes:
-
too_many_listening_to_single_client- An enumeration.
- application/json
- Schema
- Example (from schema)
Schema
Default value: true
{
"auth_success": true,
"error_code": "string",
"desc": "string"
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
Error Codes:
-
connection_limit_reached- An enumeration.
- application/json
- Schema
- Example (from schema)
Schema
Default value: true
{
"auth_success": true,
"error_code": "string",
"desc": "string"
}