Live session represents offline or online meeting that can be a part of the learning path. Live sessions are not a part of a learning path navigation, they don’t affect score and progress, but they can be used as a required condition to pass a training and achieve a certificate.Live sessions can be added to advanced learning path as a part of the live sessions bucket. A user who has an individual membership in the dedicated learning path can be registered to the only one live session in the bucket.Users can register to a live session that is added to the bucket with the open registration by themselves or they can be registered by users with the dedicated permission (Opigno administrator).
Queries to retrieve live sessions and buckets information
You can use getLiveSession query to retrieve the information about the session by its ID:
Copy
Ask AI
query getLiveSession { getLiveSession(liveSessionId: 1) { id bucketId title description startDate endDate address url status cta { title actionId arguments { key value } metadata { key value } } }}
To get all live sessions that relate to one bucket, use getLiveSessions query.There are several arguments that can be used in this query:
Argument
Type
Description
Default
bucketId
ID
Required argument; ID of the bucket to get live sessions for.
—
status
LiveSessionStatus, possible options: - DISABLED - PUBLISHED
Allows to filter by the live session status. Disabled live sessions are not available for registration.
—
reverse
Boolean
Allows to change the order of the sorting to DESC.
false
sortKey
LiveSessionSortKey, possible options: - ID - START
Allows to change the default sorting (by the start date).
START
Copy
Ask AI
query getLiveSessions { getLiveSessions(bucketId: 1) { id startDate endDate address url status cta { title actionId arguments { key value } metadata { key value } } }}
As an alternative to this query, you can use getLiveSessionBucket query to retrieve the information about the bucket in addition to the list of sessions.
In getLiveSessionBucket query there is no possibility to sort live sessions.
Copy
Ask AI
query getLiveSessionBucket { getLiveSessionBucket(bucketId: 1) { id learningPathId title description type registration sessions { id startDate endDate address url status cta { title actionId arguments { key value } metadata { key value } } } status }}
Retrieve information about live sessions in context of the learning path
The list of the related live sessions can be accessed from the LearningPath object:
Copy
Ask AI
query learningPath { getLearningPath(lpId: 92) { liveActivities { type status relatedEntity { id bucketId title description startDate endDate address url status isBucketRequired cta { title actionId arguments { key value } metadata { key value } } } } }}
Or as an alternative getLiveSessionBuckets can be used if you need the list of related buckets.Here is the list of arguments that can be used:
Argument
Type
Description
Default
lpId
ID
Required argument; ID of the learning path to get buckets for.
—
status
LiveSessionStatus, possible options: - DISABLED - PUBLISHED
Allows to filter by the bucket status. Live sessions that relate to the disabled buckets are not available for registration.
—
reverse
Boolean
Allows to change the order of the sorting to DESC.
false
sortKey
LiveSessionBucketSortKeys, possible options: - ID - TITLE
Allows to change the default sorting.
TITLE
Copy
Ask AI
query getLiveSessionBuckets { getLiveSessionBuckets(lpId: 92) { id learningPathId title description type registration status sessions { id startDate endDate address url status } }}
There are two available types of live session buckets:
Open - available for registration for all users who are enrolled to the related learning path;
Admin-signed - will be visible to a user only after registration by admin.
In both cases the same mutation registerToLiveSession is used.
Argument
Type
Description
liveSessionId
ID
Required argument; ID of the live session to register for.
userContextId
ID
Optional; if set, the user with the given API context will be registered to the live session if it’s possible. Otherwise the current user will be registered (if possible).