Amazon Interactive Video Service RealTime

2023/05/11 - Amazon Interactive Video Service RealTime - 5 new api methods

Changes  Add methods for inspecting and debugging stages: ListStageSessions, GetStageSession, ListParticipants, GetParticipant, and ListParticipantEvents.

GetParticipant (new) Link ¶

Gets information about the specified participant token.

See also: AWS API Documentation

Request Syntax

client.get_participant(
    participantId='string',
    sessionId='string',
    stageArn='string'
)
type participantId:

string

param participantId:

[REQUIRED]

Unique identifier for the participant. This is assigned by IVS and returned by CreateParticipantToken.

type sessionId:

string

param sessionId:

[REQUIRED]

ID of a session within the stage.

type stageArn:

string

param stageArn:

[REQUIRED]

Stage ARN.

rtype:

dict

returns:

Response Syntax

{
    'participant': {
        'attributes': {
            'string': 'string'
        },
        'firstJoinTime': datetime(2015, 1, 1),
        'participantId': 'string',
        'published': True|False,
        'state': 'CONNECTED'|'DISCONNECTED',
        'userId': 'string'
    }
}

Response Structure

  • (dict) --

    • participant (dict) --

      The participant that is returned.

      • attributes (dict) --

        Application-provided attributes to encode into the token and attach to a stage. Map keys and values can contain UTF-8 encoded text. The maximum length of this field is 1 KB total. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.

        • (string) --

          • (string) --

      • firstJoinTime (datetime) --

        ISO 8601 timestamp (returned as a string) when the participant first joined the stage session.

      • participantId (string) --

        Unique identifier for this participant, assigned by IVS.

      • published (boolean) --

        Whether the participant ever published to the stage session.

      • state (string) --

        Whether the participant is connected to or disconnected from the stage.

      • userId (string) --

        Customer-assigned name to help identify the token; this can be used to link a participant to a user in the customer’s own systems. This can be any UTF-8 encoded text. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.

ListParticipants (new) Link ¶

Lists all participants in a specified stage session.

See also: AWS API Documentation

Request Syntax

client.list_participants(
    filterByPublished=True|False,
    filterByState='CONNECTED'|'DISCONNECTED',
    filterByUserId='string',
    maxResults=123,
    nextToken='string',
    sessionId='string',
    stageArn='string'
)
type filterByPublished:

boolean

param filterByPublished:

Filters the response list to only show participants who published during the stage session. Only one of filterByUserId, filterByPublished, or filterByState can be provided per request.

type filterByState:

string

param filterByState:

Filters the response list to only show participants in the specified state. Only one of filterByUserId, filterByPublished, or filterByState can be provided per request.

type filterByUserId:

string

param filterByUserId:

Filters the response list to match the specified user ID. Only one of filterByUserId, filterByPublished, or filterByState can be provided per request. A userId is a customer-assigned name to help identify the token; this can be used to link a participant to a user in the customer’s own systems.

type maxResults:

integer

param maxResults:

Maximum number of results to return. Default: 50.

type nextToken:

string

param nextToken:

The first participant to retrieve. This is used for pagination; see the nextToken response field.

type sessionId:

string

param sessionId:

[REQUIRED]

ID of the session within the stage.

type stageArn:

string

param stageArn:

[REQUIRED]

Stage ARN.

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'participants': [
        {
            'firstJoinTime': datetime(2015, 1, 1),
            'participantId': 'string',
            'published': True|False,
            'state': 'CONNECTED'|'DISCONNECTED',
            'userId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      If there are more rooms than maxResults, use nextToken in the request to get the next set.

    • participants (list) --

      List of the matching participants (summary information only).

      • (dict) --

        Summary object describing a participant that has joined a stage.

        • firstJoinTime (datetime) --

          ISO 8601 timestamp (returned as a string) when the participant first joined the stage session.

        • participantId (string) --

          Unique identifier for this participant, assigned by IVS.

        • published (boolean) --

          Whether the participant ever published to the stage session.

        • state (string) --

          Whether the participant is connected to or disconnected from the stage.

        • userId (string) --

          Customer-assigned name to help identify the token; this can be used to link a participant to a user in the customer’s own systems. This can be any UTF-8 encoded text. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.

GetStageSession (new) Link ¶

Gets information for the specified stage session.

See also: AWS API Documentation

Request Syntax

client.get_stage_session(
    sessionId='string',
    stageArn='string'
)
type sessionId:

string

param sessionId:

[REQUIRED]

ID of a session within the stage.

type stageArn:

string

param stageArn:

[REQUIRED]

ARN of the stage for which the information is to be retrieved.

rtype:

dict

returns:

Response Syntax

{
    'stageSession': {
        'endTime': datetime(2015, 1, 1),
        'sessionId': 'string',
        'startTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • stageSession (dict) --

      The stage session that is returned.

      • endTime (datetime) --

        ISO 8601 timestamp (returned as a string) when the stage session ended. This is null if the stage is active.

      • sessionId (string) --

        ID of the session within the stage.

      • startTime (datetime) --

        ISO 8601 timestamp (returned as a string) when this stage session began.

ListParticipantEvents (new) Link ¶

Lists events for a specified participant that occurred during a specified stage session.

See also: AWS API Documentation

Request Syntax

client.list_participant_events(
    maxResults=123,
    nextToken='string',
    participantId='string',
    sessionId='string',
    stageArn='string'
)
type maxResults:

integer

param maxResults:

Maximum number of results to return. Default: 50.

type nextToken:

string

param nextToken:

The first participant to retrieve. This is used for pagination; see the nextToken response field.

type participantId:

string

param participantId:

[REQUIRED]

Unique identifier for this participant. This is assigned by IVS and returned by CreateParticipantToken.

type sessionId:

string

param sessionId:

[REQUIRED]

ID of a session within the stage.

type stageArn:

string

param stageArn:

[REQUIRED]

Stage ARN.

rtype:

dict

returns:

Response Syntax

{
    'events': [
        {
            'errorCode': 'INSUFFICIENT_CAPABILITIES',
            'eventTime': datetime(2015, 1, 1),
            'name': 'JOINED'|'LEFT'|'PUBLISH_STARTED'|'PUBLISH_STOPPED'|'SUBSCRIBE_STARTED'|'SUBSCRIBE_STOPPED'|'PUBLISH_ERROR'|'SUBSCRIBE_ERROR'|'JOIN_ERROR',
            'participantId': 'string',
            'remoteParticipantId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • events (list) --

      List of the matching events.

      • (dict) --

        An occurrence during a stage session.

        • errorCode (string) --

          If the event is an error event, the error code is provided to give insight into the specific error that occurred. If the event is not an error event, this field is null. INSUFFICIENT_CAPABILITIES indicates that the participant tried to take an action that the participant’s token is not allowed to do. For more information about participant capabilities, see the capabilities field in CreateParticipantToken.

        • eventTime (datetime) --

          ISO 8601 timestamp (returned as a string) for when the event occurred.

        • name (string) --

          The name of the event.

        • participantId (string) --

          Unique identifier for the participant who triggered the event. This is assigned by IVS.

        • remoteParticipantId (string) --

          Unique identifier for the remote participant. For a subscribe event, this is the publisher. For a publish or join event, this is null. This is assigned by IVS.

    • nextToken (string) --

      If there are more rooms than maxResults, use nextToken in the request to get the next set.

ListStageSessions (new) Link ¶

Gets all sessions for a specified stage.

See also: AWS API Documentation

Request Syntax

client.list_stage_sessions(
    maxResults=123,
    nextToken='string',
    stageArn='string'
)
type maxResults:

integer

param maxResults:

Maximum number of results to return. Default: 50.

type nextToken:

string

param nextToken:

The first stage to retrieve. This is used for pagination; see the nextToken response field.

type stageArn:

string

param stageArn:

[REQUIRED]

Stage ARN.

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'stageSessions': [
        {
            'endTime': datetime(2015, 1, 1),
            'sessionId': 'string',
            'startTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      If there are more rooms than maxResults, use nextToken in the request to get the next set.

    • stageSessions (list) --

      List of matching stage sessions.

      • (dict) --

        Summary information about a stage session.

        • endTime (datetime) --

          ISO 8601 timestamp (returned as a string) when the stage session ended. This is null if the stage is active.

        • sessionId (string) --

          ID of the session within the stage.

        • startTime (datetime) --

          ISO 8601 timestamp (returned as a string) when this stage session began.