px_core.rest

Proximie REST API types and services.

Module Contents

Classes

Facility

Facility details

Facilities

Facilities

Room

Room details

Rooms

Rooms

OrganisationWithId

Organisation details

Organisations

Organisations

Role

A role in an organisation

UserWithId

User details

OrganisationUserMember

User as an organisation member

OrganisationMembers

Organisation members

OrganisationMembership

Details of an organisation's membership

OrganisationUserMembership

User with their membership in an organisation

ProximieServices

A helper class to call certain Proximie REST APIs from SDK applications.

RestErrorDetail

Error details for failed REST API requests

RestError

Error details for failed REST API requests

SessionOwner

Defines a session owner and their details

SessionType

Defines the session type

SessionAccess

Defines the session access type

SessionParticipant

Defines a session's participant

Session

A given session appointment details

SessionWithUrlAndId

Full session details, including appointment, organisation and media session

Sessions

Payload with a list of sessions

GetSessionResponse

Response payload when requesting a session's details

CreateSessionRequest

Request parameters for creating a session

CreateSessionResponse

Response to a create session request

SessionConnectionServer

Media server connection details

IceServerSettings

ICE server settings

CallStatsProxies

CallStats proxy details

DcpBroker

Proximie DCP broker details

SessionConnectionSettings

Details for a media session's session, services and connection parameters

SessionStatus

Helper class for session status strings

Stream

A media session stream's details

SessionFeedIdRequest

Server-generated feed ID for a stream to be added to a session

SessionFeedIdResponse

Server-generated feed ID for stream

Taxonomy

Taxonomy details

class px_core.rest.Facility

Facility details

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property id: str
property name: str
property is_removable: bool | None
class px_core.rest.Facilities

Facilities

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property facilities: list[Facility] | None
class px_core.rest.Room

Room details

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property id: str
property name: str
property is_removable: bool | None
class px_core.rest.Rooms

Rooms

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property rooms: list[Room] | None
class px_core.rest.OrganisationWithId

Organisation details

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property id: str
property name: str
property type: str
property country_iso: str
property allow_image_overlay: bool
property allow_public_visibility: bool
property allow_recording: bool
property allow_quick_reschedule: bool
property allow_start_now: bool
property allow_video_sharing: bool
property allow_wearables: bool
property allow_analytics: bool | None
property allow_session_creation: bool | None
class px_core.rest.Organisations

Organisations

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property organisations: list[OrganisationWithId] | None
class px_core.rest.Role

A role in an organisation

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property name: str
class px_core.rest.UserWithId

User details

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property id: str
property email: str
property has_accepted_terms: bool
property name: str | None
property phone: str | None
property user_title: str | None
property speciality: str | None
property country_iso: str | None
property city: str | None
class px_core.rest.OrganisationUserMember

Bases: UserWithId

User as an organisation member

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property invited_at: str
property roles: list[Role]
class px_core.rest.OrganisationMembers

Organisation members

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property members: list[OrganisationUserMember]
class px_core.rest.OrganisationMembership

Details of an organisation’s membership

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property id: str
property name: str
property role: str
property invited_at: str
class px_core.rest.OrganisationUserMembership

Bases: UserWithId

User with their membership in an organisation

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property organisation_memberships: list[OrganisationMembership] | None
class px_core.rest.ProximieServices(context: px_core.core.ProximieContext, settings: ProximieServices.ServiceSettings, reqFields: px_core.utility.HttpFetch.RequestFields = ...)
class px_core.rest.ProximieServices(context: px_core.core.ProximieContext, settings: ProximieServices.ServiceSettings, taskExecution: px_core.core.SdkTaskExecution, reqFields: px_core.utility.HttpFetch.RequestFields = ...)

A helper class to call certain Proximie REST APIs from SDK applications.

Provides convenient, typed access to a selection of the Proximie REST APIs, such as querying users, organisations and sessions.

class ApiVer

Bases: enum.IntEnum

Proximie APIs are versioned for API updates and releases

v1: int = 1
v2: int = 2
class ServiceSettings

Service settings that are used for all API calls for the object

property host: str
property port: int

Interface

request_fields() px_core.utility.HttpFetch.RequestFields

Access the fields used for each request.

If the caller changes the values, they will be using in subsequent requests

get_this_user() OrganisationUserMembership

Get the details of the current user See: https://docs.proximie.net/reference/getmyuser

Returns the result directly; raises SdkError on failure.

get_specialities() Taxonomy

Get the specialities for the authorised user See: https://docs.proximie.net/reference/getsessionspecialitiestaxonomy

Returns the result directly; raises SdkError on failure.

get_organisations() Organisations

Get all organisations that the authorised user is a member of See: https://docs.proximie.net/reference/getorganisations

Returns the result directly; raises SdkError on failure.

get_organisation(orgId: str) OrganisationWithId

Get an organisation’s details See: https://docs.proximie.net/reference/getorganisation

Returns the result directly; raises SdkError on failure.

get_organisation_members(orgId: str) OrganisationMembers

Get all members for a given organisation See: https://docs.proximie.net/reference/getmembers

Returns the result directly; raises SdkError on failure.

get_facilities(orgId: str) Facilities

Get an organisation’s facilities See: https://docs.proximie.net/reference/getfacilities

Returns the result directly; raises SdkError on failure.

get_facility_rooms(orgId: str, facilityId: str) Rooms

Get an organisation’s facility’s rooms See: https://docs.proximie.net/reference/getrooms

Returns the result directly; raises SdkError on failure.

get_non_room_notations() Rooms

Get available notations for “non-rooms” Non-rooms are used when a room is unknown or N/A See https://docs.proximie.net/reference/getnonroomnotationstaxonomy

Returns the result directly; raises SdkError on failure.

create_session(orgId: str, session: CreateSessionRequest) CreateSessionResponse

Create a session in an organisation See: https://docs.proximie.net/reference/createsession

Returns the result directly; raises SdkError on failure.

get_surgical_types() Taxonomy

Get the session surgical types available See: https://docs.proximie.net/reference/getsurgicaltypestaxonomy

Returns the result directly; raises SdkError on failure.

get_session_accesses() Taxonomy

Get the session access types available See: https://docs.proximie.net/reference/getsessionaccessestaxonomy

Returns the result directly; raises SdkError on failure.

get_session(sessionId: str) GetSessionResponse

Given a session ID, request the details for that session See: https://docs.proximie.net/reference/getsession

Returns the result directly; raises SdkError on failure.

get_sessions() Sessions

Return all available sessions See: https://docs.proximie.net/reference/getsessions

Returns the result directly; raises SdkError on failure.

delete_session(sessionId: str) None

Delete a session See: https://docs.proximie.net/reference/deletesession

Returns the result directly; raises SdkError on failure.

session_connection_settings(sessionId: str) SessionConnectionSettings

Given a session ID, return the connection settings to access that media session on the remote media server

Returns the result directly; raises SdkError on failure.

class px_core.rest.RestErrorDetail

Error details for failed REST API requests

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property status_code: int
property error_code: str
property message: str
property timestamp: str
property version: str
property correlation_id: str | None
class px_core.rest.RestError

Error details for failed REST API requests

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property error: RestErrorDetail
class px_core.rest.SessionOwner

Defines a session owner and their details

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property id: str
property name: str
property email: str
class px_core.rest.SessionType

Defines the session type

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property name: str
property weighting: float
class px_core.rest.SessionAccess

Defines the session access type

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property name: str
class px_core.rest.SessionParticipant

Defines a session’s participant

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property id: str
property role: str | None
class px_core.rest.Session

A given session appointment details

status_is(statusEnum: SessionStatus.Enum) bool

Helper to test the payload’s status (string) value

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property title: str
property owner: SessionOwner
property scheduled_at: str | None
property estimated_duration: int
property created_at: str
property updated_at: str
property type: SessionType
property access: SessionAccess
property status: str
property url: str | None
property description: str | None
property deleted_at: str | None
property surgical_type: str | None
property participants: list[SessionParticipant] | None
class px_core.rest.SessionWithUrlAndId

Full session details, including appointment, organisation and media session

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property id: str
property stream: Stream | None
property organisation: OrganisationWithId
property session: Session
class px_core.rest.Sessions

Payload with a list of sessions

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property sessions: list[SessionWithUrlAndId]
class px_core.rest.GetSessionResponse

Response payload when requesting a session’s details

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property id: str
property session: Session
property stream: Stream | None
property facility: Facility | None
property room: Room | None
property organisation: OrganisationWithId | None
class px_core.rest.CreateSessionRequest

Request parameters for creating a session

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property title: str
property scheduled_at: str
property estimated_duration: int
property speciality: str
property access: str
property facility: str
property room: str
property surgical_type: str | None
property description: str | None
property owner: str | None
property participants: list[SessionParticipant] | None
property status: str | None
class px_core.rest.CreateSessionResponse

Response to a create session request

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property id: str
property session: Session
class px_core.rest.SessionConnectionServer

Media server connection details

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property url: str
property http_url: str
property api_key: str
class px_core.rest.IceServerSettings

ICE server settings

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property username: str
property credential: str
property urls: str
class px_core.rest.CallStatsProxies

CallStats proxy details

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property app_settings_url: str
property auth_service_url: str
property collector_url: str
property csio_internal_api_url: str
property rest_event_url: str
property rest_stats_url: str
property ws_url: str
class px_core.rest.DcpBroker

Proximie DCP broker details

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property wss_url: str
property mqtts_url: str
class px_core.rest.SessionConnectionSettings

Details for a media session’s session, services and connection parameters

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property started_at: str
property username: str
property user_id: str
property credential: str
property audio_server: SessionConnectionServer
property video_server: SessionConnectionServer
property ice_servers: list[IceServerSettings]
property dcp_home_broker: DcpBroker
property dcp_session_broker: DcpBroker
property new_relic_log_url: str
class px_core.rest.SessionStatus

Helper class for session status strings

class Enum

Bases: enum.IntEnum

Session status enumeration

SCHEDULED: int = 0
LAUNCHING: int = 1
ACTIVE: int = 2
CLOSING: int = 3
CLOSED: int = 4
static string_from(statusEnum: SessionStatus.Enum) str

Helper to obtain the string representation from a status enumeration

static status_is(statusString: str, statusEnum: SessionStatus.Enum) bool

Helper to test a status (string) value

class px_core.rest.Stream

A media session stream’s details

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property id: str
property url: str
class px_core.rest.SessionFeedIdRequest

Server-generated feed ID for a stream to be added to a session

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property media_type: px_core.media.MediaSessionFeedType.Enum
property existing_feed_id: str | None
class px_core.rest.SessionFeedIdResponse

Server-generated feed ID for stream

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property feed_id: str
property order: str
class px_core.rest.Taxonomy

Taxonomy details

serialize(serializer: px_core.utility.JsonSerializer) None

Serialize with JsonSerializer

property taxonomy_types: list[str]