Skip to main content

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

    player_uuid uuidrequired

Query Parameters

    max_page_size Max Page Size

    Possible values: >= 1 and <= 100

    Default value: 10

    Max number of entries to return at one time

    exclude_before Exclude Before

    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

    offset_reset_strategy any

    When exclude_before is not found in the stream or not given, begin streaming messages from the earliest/latest message

    deadline Deadline

    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

Successful Response

Schema

    notifications

    object[]

    List of notifications

  • Array [

  • message Message (string)required

    Possible values: <= 4096 characters

    Base Message for the notification

    rh_url Rh Url (string)

    Possible values: non-empty and <= 4096 characters

    Path to get additional data about this notification

    custom_data

    object

    Custom values for the notification

    property name* string
    etag Etag (string)

    Possible values: non-empty

    ETag for the resource at rh_url at the time of this notification

    notification_id Notification Id (string)required

    Unique Identifier for the notification. You cannot depend on the format of this string, and it must be considered opaque

    created date-timerequired

    When this notification was added

  • ]

  • cursor Cursor (string)required

    Cursor to use for the next request

Loading...