Query
query TrainingOccurrenceByEvent($dueDate: DateTime!, $trainingId: String!, $userId: String!) {
trainingOccurrenceByEvent(dueDate: $dueDate, trainingId: $trainingId, userId: $userId) {
action {
assigned {
allowedLocations {
__typename
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
assignment {
__typename
}
canChangeStatus
completedDate
createdAt
dueDate
}
actionId
assignment {
actions {
__typename
}
id
latestAction {
assigned {
__typename
}
assignment {
__typename
}
canChangeStatus
completedDate
createdAt
dueDate
}
latestActionId
nextAt
nextTraining {
anchor
assignedGroups {
__typename
}
assignedUsers {
__typename
}
followup {
__typename
}
id
materials {
__typename
}
}
}
assignmentId
present
progressPct
}
}Variables
{
"dueDate": "value",
"trainingId": "string",
"userId": "string"
}Response
{
"data": {
"trainingOccurrenceByEvent": {
"action": {
"assigned": {
"allowedLocations": [
{
"__typename": "Location"
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
},
"assignment": {
"__typename": "ActionToTrainingAssignment"
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
},
"actionId": "id",
"assignment": {
"actions": [
{
"__typename": "ActionToTrainingAssignment"
}
],
"id": "id",
"latestAction": {
"assigned": {
"__typename": "User"
},
"assignment": {
"__typename": "ActionToTrainingAssignment"
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
},
"latestActionId": "id",
"nextAt": "value",
"nextTraining": {
"anchor": "string",
"assignedGroups": [
{
"__typename": "UserGroup"
}
],
"assignedUsers": [
{
"__typename": "User"
}
],
"followup": {
"__typename": "Training"
},
"id": "id",
"materials": [
{
"__typename": "TrainingMaterial"
}
]
}
},
"assignmentId": "id",
"present": true,
"progressPct": 1
}
}
}Queries
trainingOccurrenceByEvent
Returns the occurrence of a training assigned to a user and due on a given date.
QUERY
trainingOccurrenceByEvent(dueDate: DateTime!, trainingId: String!, userId: String!): ActionToTrainingAssignmentArguments
dueDate
DateTime!
required
Due date of the occurrence.
trainingId
String!
required
Id of the training the occurrence belongs to.
userId
String!
required
Id of the user the occurrence is assigned to.
Returns
action
The action that tracks this occurrence.
actionId
ID!
Id of the 'TRAINING' action that tracks this occurrence.
assignment
The training assignment this occurrence was issued under.
assignmentId
ID!
Id of the training assignment this occurrence belongs to.
present
Boolean
Whether the learner was marked as attended, for in-person trainings.
progressPct
Int
How much of the training content the learner has viewed, from 0 to 100.
quizAnswers
JSON
The answers the learner submitted to the training quiz.
scormNotPassed
Boolean!
Whether the SCORM package reported that the learner failed it.
training
The training, at the version the occurrence was issued against.
Query
query TrainingOccurrenceByEvent($dueDate: DateTime!, $trainingId: String!, $userId: String!) {
trainingOccurrenceByEvent(dueDate: $dueDate, trainingId: $trainingId, userId: $userId) {
action {
assigned {
allowedLocations {
__typename
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
assignment {
__typename
}
canChangeStatus
completedDate
createdAt
dueDate
}
actionId
assignment {
actions {
__typename
}
id
latestAction {
assigned {
__typename
}
assignment {
__typename
}
canChangeStatus
completedDate
createdAt
dueDate
}
latestActionId
nextAt
nextTraining {
anchor
assignedGroups {
__typename
}
assignedUsers {
__typename
}
followup {
__typename
}
id
materials {
__typename
}
}
}
assignmentId
present
progressPct
}
}Variables
{
"dueDate": "value",
"trainingId": "string",
"userId": "string"
}Response
{
"data": {
"trainingOccurrenceByEvent": {
"action": {
"assigned": {
"allowedLocations": [
{
"__typename": "Location"
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
},
"assignment": {
"__typename": "ActionToTrainingAssignment"
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
},
"actionId": "id",
"assignment": {
"actions": [
{
"__typename": "ActionToTrainingAssignment"
}
],
"id": "id",
"latestAction": {
"assigned": {
"__typename": "User"
},
"assignment": {
"__typename": "ActionToTrainingAssignment"
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
},
"latestActionId": "id",
"nextAt": "value",
"nextTraining": {
"anchor": "string",
"assignedGroups": [
{
"__typename": "UserGroup"
}
],
"assignedUsers": [
{
"__typename": "User"
}
],
"followup": {
"__typename": "Training"
},
"id": "id",
"materials": [
{
"__typename": "TrainingMaterial"
}
]
}
},
"assignmentId": "id",
"present": true,
"progressPct": 1
}
}
}