Skip to main content

UserContentItems

Returns the content that the user has access to. The results of this query can be affected by providing an authToken header to set a user for the operation. This query has an additional cost of 3 points.

UserContentItems(
query: String
kind: [ContentKind!]
sortColumn: SortColumn
sortDirection: SortDirection
sort: String
): [Content!]

Directives

complexity

This has an additional cost of 3 points.

authAccess

This requires the current user to be in STUDENT role.

Arguments

UserContentItems.query ● String scalar

This query argument allows you to filter content on various fields such as tags, authors, and custom content fields. Some example queries are: tags:"Premium Package", difficulty:Easy, authors:"Jack". See documentation here: https://support.thoughtindustries.com/hc/en-us/articles/360046307253-Writing-a-Search-Query

UserContentItems.kind ● [ContentKind!] list enum

UserContentItems.sortColumn ● SortColumn enum

UserContentItems.sortDirection ● SortDirection enum

Type

Content object

Examples

Run in Postman

Query:

UserContentItems(
$query: String,
$kind: [ContentKind!],
$sortColumn: SortColumn,
$sortDirection: SortDirection,
$sort: String
) {
UserContentItems(
query: $query,
kind: $kind,
sortColumn: $sortColumn,
sortDirection: $sortDirection,
sort: $sort
) {
id
createdAt
updatedAt
expiresAt
courseGroup
title
sessionTitle
ribbon {
...RibbonFragment
}
slug
kind
metaTitle
language
metaDescription
displayCourse
displayCourseSlug
displayDate
availabilityStatus
asset
assetAltText
freeWithRegistration
priceInCents
suggestedRetailPriceInCents
alternativePricingType
alternativePricingRef
rating
description
sku
hasChildren
tags {
...TagFragment
}
status
customFields
authors
authorsAndInstructors
contentTypeLabel
contentTypeAssetAspectRatio
waitlistCount
seatsLimit
enrollmentCount
source
publishDate
courseStartDate
courseEndDate
enrollmentStartDate
enrollmentEndDate
timeZone
meetingStartDate
coursePresold
courseGracePeriodEnded
currentUserMayReschedule
isActive
embeddedEnabled
altDescriptionBody
hideCourseDescription
currentUserUnmetCoursePrerequisites
currentUserUnmetLearningPathPrerequisites
currentUserDueDate
url
waitlistingEnabled
waitlistingTriggered
canAddToQueue
bulkPurchasingEnabled
location {
...LocationFragment
}
state
acceptBadgeUrl
issuedAt
badgeUrl
credlyBadgeExpiresAt
imageUrl
badgeName
}
}

Variables:

{
"query": "abc123",
"kind": [
"courseGroup"
],
"sortColumn": "updatedAt",
"sortDirection": "asc",
"sort": "abc123"
}

Response:

{
"data": {
"UserContentItems": [
{
"id": "ab740d4e-f094-4810-b491-319dff54bdd2",
"createdAt": "2024-08-21T18:16:47.178Z",
"updatedAt": "2024-02-21T18:16:47.178Z",
"expiresAt": "2024-08-21T18:16:47.178Z",
"courseGroup": "abc123",
"title": "abc123",
"sessionTitle": "abc123",
"ribbon": "Ribbon",
"slug": "Slug",
"kind": "courseGroup",
"metaTitle": "xyz789",
"language": "abc123",
"metaDescription": "abc123",
"displayCourse": "ab740d4e-f094-4810-b491-319dff54bdd2",
"displayCourseSlug": "Slug",
"displayDate": "2024-08-21T18:16:47.178Z",
"availabilityStatus": "xyz789",
"asset": "xyz789",
"assetAltText": "abc123",
"freeWithRegistration": true,
"priceInCents": 447,
"suggestedRetailPriceInCents": 447,
"alternativePricingType": "membership",
"alternativePricingRef": 447,
"rating": 447,
"description": "abc123",
"sku": "abc123",
"hasChildren": true,
"tags": [
"Tag"
],
"status": "draft",
"customFields": "{}",
"authors": [
"abc123"
],
"authorsAndInstructors": [
"xyz789"
],
"contentTypeLabel": "xyz789",
"contentTypeAssetAspectRatio": "abc123",
"waitlistCount": 447,
"seatsLimit": 447,
"enrollmentCount": 447,
"source": "abc123",
"publishDate": "2024-02-21T18:16:47.178Z",
"courseStartDate": "2024-02-21T18:16:47.178Z",
"courseEndDate": "2024-08-21T18:16:47.178Z",
"enrollmentStartDate": "2024-08-21T18:16:47.178Z",
"enrollmentEndDate": "2024-02-21T18:16:47.178Z",
"timeZone": "abc123",
"meetingStartDate": "2024-02-21T18:16:47.178Z",
"coursePresold": true,
"courseGracePeriodEnded": false,
"currentUserMayReschedule": true,
"isActive": true,
"embeddedEnabled": true,
"altDescriptionBody": "abc123",
"hideCourseDescription": true,
"currentUserUnmetCoursePrerequisites": [
"ab740d4e-f094-4810-b491-319dff54bdd2"
],
"currentUserUnmetLearningPathPrerequisites": [
"ab740d4e-f094-4810-b491-319dff54bdd2"
],
"currentUserDueDate": "2024-02-21T18:16:47.178Z",
"url": "AbsoluteOrRelativeURL",
"waitlistingEnabled": true,
"waitlistingTriggered": true,
"canAddToQueue": false,
"bulkPurchasingEnabled": false,
"location": "Location",
"state": "xyz789",
"acceptBadgeUrl": "abc123",
"issuedAt": "2024-08-21T18:16:47.178Z",
"badgeUrl": "abc123",
"credlyBadgeExpiresAt": "2024-08-21T18:16:47.178Z",
"imageUrl": "xyz789",
"badgeName": "xyz789"
}
]
}
}