Query
query TrainingsHistory($userId: String!) {
trainingsHistory(userId: $userId) {
actions {
action {
assigned {
__typename
}
assignment {
__typename
}
canChangeStatus
completedDate
createdAt
dueDate
}
actionId
assignment {
__typename
}
assignmentId
present
progressPct
}
id
latestAction {
assigned {
allowedLocations {
__typename
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
assignment {
action {
__typename
}
actionId
assignment {
__typename
}
assignmentId
present
progressPct
}
canChangeStatus
completedDate
createdAt
dueDate
}
latestActionId
nextAt
nextTraining {
anchor
assignedGroups {
createdAt
id
name
users {
__typename
}
}
assignedUsers {
allowedLocations {
__typename
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
followup {
__typename
}
id
materials {
id
kind
scormScoCount
scormVersion
sourceFileName
status
}
}
}
}Variables
{
"userId": "string"
}Response
{
"data": {
"trainingsHistory": [
{
"actions": [
{
"action": {
"assigned": {
"__typename": "User"
},
"assignment": {
"__typename": "ActionToTrainingAssignment"
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
},
"actionId": "id",
"assignment": {
"__typename": "TrainingAssignment"
},
"assignmentId": "id",
"present": true,
"progressPct": 1
}
],
"id": "id",
"latestAction": {
"assigned": {
"allowedLocations": [
{
"__typename": "Location"
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
},
"assignment": {
"action": {
"__typename": "Action"
},
"actionId": "id",
"assignment": {
"__typename": "TrainingAssignment"
},
"assignmentId": "id",
"present": true,
"progressPct": 1
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
},
"latestActionId": "id",
"nextAt": "value",
"nextTraining": {
"anchor": "string",
"assignedGroups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
],
"assignedUsers": [
{
"allowedLocations": [
{
"__typename": "Location"
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
}
],
"followup": {
"__typename": "Training"
},
"id": "id",
"materials": [
{
"id": "id",
"kind": "string",
"scormScoCount": 1,
"scormVersion": "string",
"sourceFileName": "string",
"status": "string"
}
]
}
}
]
}
}Queries
trainingsHistory
Returns the training assignments of a user that have completed occurrences, each carrying only its completed occurrences. Empty if there are no completed training occurrences.
QUERY
trainingsHistory(userId: String!): [TrainingAssignment!]!Arguments
userId
String!
required
Id of the user whose training history to return.
Returns
actions
Occurrences of the training issued under this assignment. Empty if there are no occurrences.
id
ID!
Id of the assignment.
latestAction
The action that tracks the latest occurrence.
latestActionId
ID
Id of the action that tracks the latest occurrence.
nextAt
DateTime
When the next occurrence will be issued to the user.
nextTraining
The training version the next occurrence will use.
userId
ID!
Id of the user the training is assigned to.
Query
query TrainingsHistory($userId: String!) {
trainingsHistory(userId: $userId) {
actions {
action {
assigned {
__typename
}
assignment {
__typename
}
canChangeStatus
completedDate
createdAt
dueDate
}
actionId
assignment {
__typename
}
assignmentId
present
progressPct
}
id
latestAction {
assigned {
allowedLocations {
__typename
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
assignment {
action {
__typename
}
actionId
assignment {
__typename
}
assignmentId
present
progressPct
}
canChangeStatus
completedDate
createdAt
dueDate
}
latestActionId
nextAt
nextTraining {
anchor
assignedGroups {
createdAt
id
name
users {
__typename
}
}
assignedUsers {
allowedLocations {
__typename
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
followup {
__typename
}
id
materials {
id
kind
scormScoCount
scormVersion
sourceFileName
status
}
}
}
}Variables
{
"userId": "string"
}Response
{
"data": {
"trainingsHistory": [
{
"actions": [
{
"action": {
"assigned": {
"__typename": "User"
},
"assignment": {
"__typename": "ActionToTrainingAssignment"
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
},
"actionId": "id",
"assignment": {
"__typename": "TrainingAssignment"
},
"assignmentId": "id",
"present": true,
"progressPct": 1
}
],
"id": "id",
"latestAction": {
"assigned": {
"allowedLocations": [
{
"__typename": "Location"
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
},
"assignment": {
"action": {
"__typename": "Action"
},
"actionId": "id",
"assignment": {
"__typename": "TrainingAssignment"
},
"assignmentId": "id",
"present": true,
"progressPct": 1
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
},
"latestActionId": "id",
"nextAt": "value",
"nextTraining": {
"anchor": "string",
"assignedGroups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
],
"assignedUsers": [
{
"allowedLocations": [
{
"__typename": "Location"
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
}
],
"followup": {
"__typename": "Training"
},
"id": "id",
"materials": [
{
"id": "id",
"kind": "string",
"scormScoCount": 1,
"scormVersion": "string",
"sourceFileName": "string",
"status": "string"
}
]
}
}
]
}
}