mutation CreateTraining($input: CreateTrainingInput!) {
createTraining(input: $input) {
anchor
assignedGroups {
createdAt
id
name
users {
allowedLocations {
__typename
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
}
assignedUsers {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
followup {
__typename
}
id
materials {
id
kind
scormScoCount
scormVersion
sourceFileName
status
}
}
}{
"input": {}
}{
"data": {
"createTraining": {
"anchor": "string",
"assignedGroups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"allowedLocations": [
{
"__typename": "Location"
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
}
]
}
],
"assignedUsers": [
{
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
]
}
],
"followup": {
"__typename": "Training"
},
"id": "id",
"materials": [
{
"id": "id",
"kind": "string",
"scormScoCount": 1,
"scormVersion": "string",
"sourceFileName": "string",
"status": "string"
}
]
}
}
}createTraining
Creates a draft training and returns it. With id, returns the existing draft of that training or creates a new draft version from its latest published version.
createTraining(input: CreateTrainingInput!): Training!Arguments
The training to create, or the id of an existing training to draft a new version of.
Returns
How occurrences are scheduled: one of 'CALENDAR' (once, by due date), 'DUE' (yearly after the initial training's due date) or 'RRULE' (yearly on a set date).
Groups the training is assigned to. Empty if there are no groups.
Users the training is assigned to individually rather than through a group. Empty if there are no individually assigned users.
The refresher that follows this training.
Id of the training, shared by all of its versions.
Content of the training. Empty if there are no materials.
Id of the organization the training belongs to.
The quiz learners complete at the end of the training.
Recurrence of a refresher as an iCalendar rule, for example 'FREQ=YEARLY' or 'FREQ=YEARLY;BYMONTH=3;BYMONTHDAY=15'.
Names of the sites the training is restricted to. Empty if the training is available at every site.
One of 'DRAFT' (Draft) or 'PUBLISHED' (Published).
Title of the training.
One of 'ONLINE' (Online) or 'IN_PERSON' (In person).
When this version was last changed.
Version number of the training, starting at 1.
mutation CreateTraining($input: CreateTrainingInput!) {
createTraining(input: $input) {
anchor
assignedGroups {
createdAt
id
name
users {
allowedLocations {
__typename
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
}
assignedUsers {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
followup {
__typename
}
id
materials {
id
kind
scormScoCount
scormVersion
sourceFileName
status
}
}
}{
"input": {}
}{
"data": {
"createTraining": {
"anchor": "string",
"assignedGroups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"allowedLocations": [
{
"__typename": "Location"
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
}
]
}
],
"assignedUsers": [
{
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
]
}
],
"followup": {
"__typename": "Training"
},
"id": "id",
"materials": [
{
"id": "id",
"kind": "string",
"scormScoCount": 1,
"scormVersion": "string",
"sourceFileName": "string",
"status": "string"
}
]
}
}
}