Query
query TrainingAssignments {
trainingAssignments {
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
}
}
}
}Response
{
"data": {
"trainingAssignments": [
{
"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
trainingAssignments
Returns the organization’s training assignments, narrowed to one user when userId is given. Empty if there are no training assignments.
QUERY
trainingAssignments(skipSort: Boolean, userId: String): [TrainingAssignment!]!Arguments
skipSort
Boolean
Set to true to skip sorting the assignments and their occurrences by status and due date.
userId
String
Id of the user whose training assignments 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 TrainingAssignments {
trainingAssignments {
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
}
}
}
}Response
{
"data": {
"trainingAssignments": [
{
"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"
}
]
}
}
]
}
}