Skip to main content

CreateLearningPath

Creates a new learning path with the data provided. The results of this mutation can be affected by providing an authToken header to set a user for the operation.

CreateLearningPath(
name: String!
language: String
clientId: ID
milestones: [MilestoneInput!]!
): LearningPath!

Directives

authAccess

This requires the current user to be in MANAGER role.

Arguments

CreateLearningPath.name ● String! non-null scalar

CreateLearningPath.language ● String scalar

CreateLearningPath.clientId ● ID scalar

CreateLearningPath.milestones ● [MilestoneInput!]! non-null input

Type

LearningPath object

Examples

Run in Postman

Query:

CreateLearningPath(
$name: String!,
$language: String,
$clientId: ID,
$milestones: [MilestoneInput!]!
) {
CreateLearningPath(
name: $name,
language: $language,
clientId: $clientId,
milestones: $milestones
) {
id
layoutId
layout {
...LayoutFragment
}
learnerLayoutId
learnerLayout {
...LayoutFragment
}
name
sku
ribbon {
...RibbonFragment
}
slug
client {
...ClientFragment
}
createdAt
metaTitle
metaDescription
asset
assetAltText
detailAsset
detailAssetAltText
heroAsset
heroAssetAltText
priceInCents
suggestedRetailPriceInCents
alternativePricingType
alternativePricingRef
accessDays
shortDescription
longDescription
tags {
...TagFragment
}
status
freeWithRegistration
hasMultipleCurrencies
prices {
...ItemPriceFragment
}
customFields
contentType
confirmationHtml
startDate
endDate
enrollmentStartDate
enrollmentEndDate
milestones {
...MilestoneFragment
}
availabilityStatus
currentUserStartActionDate
isPayAsYouGo
language
futurePublishDate
purchasable
taxable
fulfillmentCenter {
...FulfillmentCenterFragment
}
taxCategory
currentUserPendingCertificate
currentUserEarnedCertificate
currentUserDueDate
bulkPurchasingEnabled
seatTiers {
...SeatTierFragment
}
seatPackages {
...SeatPackageFragment
}
lastTierPriceInCents
prerequisiteCourses {
...CourseFragment
}
prerequisiteLearningPaths {
...LearningPathFragment
}
resourceType
seatsLimit
videoAsset
relatedQuery
relatedQuerySignature
source
authors
publishDate
externalDetailUrl
kind
tabs {
...LearningPathTabsFragment
}
updatedAt
dueDate
dueDateDays
authoringClient
}
}

Variables:

{
"name": "abc123",
"language": "abc123",
"clientId": "ab740d4e-f094-4810-b491-319dff54bdd2",
"milestones": [
"MilestoneInput"
]
}

Response:

{
"data": {
"CreateLearningPath": {
"id": "ab740d4e-f094-4810-b491-319dff54bdd2",
"layoutId": "ab740d4e-f094-4810-b491-319dff54bdd2",
"layout": "Layout",
"learnerLayoutId": "ab740d4e-f094-4810-b491-319dff54bdd2",
"learnerLayout": "Layout",
"name": "xyz789",
"sku": "xyz789",
"ribbon": "Ribbon",
"slug": "Slug",
"client": "client-1",
"createdAt": "2024-08-21T18:16:47.178Z",
"metaTitle": "xyz789",
"metaDescription": "abc123",
"asset": "URL",
"assetAltText": "abc123",
"detailAsset": "URL",
"detailAssetAltText": "abc123",
"heroAsset": "URL",
"heroAssetAltText": "xyz789",
"priceInCents": 447,
"suggestedRetailPriceInCents": 447,
"alternativePricingType": "membership",
"alternativePricingRef": 447,
"accessDays": 447,
"shortDescription": "abc123",
"longDescription": "abc123",
"tags": [
"Tag"
],
"status": "draft",
"freeWithRegistration": false,
"hasMultipleCurrencies": true,
"prices": [
"ItemPrice"
],
"customFields": "{}",
"contentType": "abc123",
"confirmationHtml": "abc123",
"startDate": "2024-02-21T18:16:47.178Z",
"endDate": "2024-02-21T18:16:47.178Z",
"enrollmentStartDate": "2024-08-21T18:16:47.178Z",
"enrollmentEndDate": "2024-08-21T18:16:47.178Z",
"milestones": [
"Milestone"
],
"availabilityStatus": "abc123",
"currentUserStartActionDate": "2024-08-21T18:16:47.178Z",
"isPayAsYouGo": false,
"language": "abc123",
"futurePublishDate": "2024-02-21T18:16:47.178Z",
"purchasable": false,
"taxable": true,
"fulfillmentCenter": "FulfillmentCenter",
"taxCategory": "ab740d4e-f094-4810-b491-319dff54bdd2",
"currentUserPendingCertificate": true,
"currentUserEarnedCertificate": true,
"currentUserDueDate": "2024-08-21T18:16:47.178Z",
"bulkPurchasingEnabled": false,
"seatTiers": [
"SeatTier"
],
"seatPackages": [
"SeatPackage"
],
"lastTierPriceInCents": 447,
"prerequisiteCourses": [
"Course"
],
"prerequisiteLearningPaths": [
"LearningPath"
],
"resourceType": "abc123",
"seatsLimit": 447,
"videoAsset": "ab740d4e-f094-4810-b491-319dff54bdd2",
"relatedQuery": "abc123",
"relatedQuerySignature": "abc123",
"source": "xyz789",
"authors": [
"xyz789"
],
"publishDate": "2024-08-21T18:16:47.178Z",
"externalDetailUrl": "xyz789",
"kind": "xyz789",
"tabs": "LearningPathTabs",
"updatedAt": "2024-02-21T18:16:47.178Z",
"dueDate": "2024-02-21T18:16:47.178Z",
"dueDateDays": 447,
"authoringClient": "ab740d4e-f094-4810-b491-319dff54bdd2"
}
}
}