Skip to content

Latest commit

 

History

History
2321 lines (1773 loc) · 44.9 KB

api.md

File metadata and controls

2321 lines (1773 loc) · 44.9 KB

Content Service API

Table of Contents

Query

Field Argument Type Description
contentsByCourseIds [[Content!]!]

Retrieves all existing contents for a given course. 🔒 The user must have access to the courses with the given ids to access their contents, otherwise an error is thrown.

courseIds [UUID!]!
_internal_noauth_contentsByCourseIds [[Content!]!]

Retrieves all existing contents for a given course. ⚠️ This query is only accessible internally in the system and allows the caller to fetch contents without any permissions check and should not be called without any validation of the caller's permissions. ⚠️

courseIds [UUID!]!
contentsByIds [Content!]!

Get contents by ids. Throws an error if any of the ids are not found. 🔒 The user must have access to the courses containing the contents with the given ids to access their contents, otherwise an error is thrown.

ids [UUID!]!
findContentsByIds [Content]!

Get contents by ids. If any of the given ids are not found, the corresponding element in the result list will be null. 🔒 The user must have access to the courses containing the contents with the given ids, otherwise null is returned for the respective contents.

ids [UUID!]!
contentsByChapterIds [[Content!]!]!

Get contents by chapter ids. Returns a list containing sublists, where each sublist contains all contents associated with that chapter 🔒 The user must have access to the courses containing the chapters with the given ids, otherwise an error is thrown.

chapterIds [UUID!]!
_internal_noauth_contentsByChapterIds [[Content!]!]!

Get contents by chapter ids. Returns a list containing sublists, where each sublist contains all contents associated with that chapter ⚠️ This query is only accessible internally in the system and allows the caller to fetch sections without any permissions check and should not be called without any validation of the caller's permissions. ⚠️

chapterIds [UUID!]!
_internal_noauth_sectionsByChapterIds [[Section!]!]!

Retrieves all existing sections for multiple chapters. ⚠️ This query is only accessible internally in the system and allows the caller to fetch sections without any permissions check and should not be called without any validation of the caller's permissions. ⚠️

chapterIds [UUID!]!
_internal_noauth_progressByChapterIds [CompositeProgressInformation!]!

Retrieve progress for multiple chapters ⚠️ This query is only accessible internally in the system and allows the caller to fetch chapter progress without any permissions check and should not be called without any validation of the caller's permissions. ⚠️

chapterIds [UUID!]!
suggestionsByChapterIds [Suggestion!]!
Generates user specific suggestions for multiple chapters.

Only content that the user can access will be considered.
The contents will be ranked by suggested date, with the most overdue or most urgent content first.

🔒 The user must have access to the courses containing the chapters with the given ids, otherwise an error is thrown.
chapterIds [UUID!]!

The ids of the chapters for which suggestions should be generated.

amount Int!

The amount of suggestions to generate in total.

skillTypes [SkillType!]!

Only suggestions for these skill types will be generated. If no skill types are given, suggestions for all skill types will be generated, also containing suggestions for media content (which do not have a skill type).

_internal_noauth_achievableSkillTypesByChapterIds [[SkillType!]!]!

Retrieves all skill types that are achievable for the given chapters. Each chapter will have its own list of skill types (batching query). ⚠️ This query is only accessible internally in the system and allows the caller to fetch without any permissions check and should not be called without any validation of the caller's permissions. ⚠️

chapterIds [UUID!]!
_internal_noauth_contentWithNoSectionByChapterIds [[Content!]!]!

Retrieves all Content that is currently not part of any section within chapters. ⚠️ This query is only accessible internally in the system and allows the caller to fetch content without any permissions check and should not be called without any validation of the caller's permissions. ⚠️

chapterIds [UUID!]!

Mutation

Field Argument Type Description
_internal_createMediaContent MediaContent!

Create new media content ️⚠️ This mutation is only accessible internally in the system ⚠️ 🔒 The user must have admin access to the course containing the section to perform this action.

courseId UUID!
input CreateMediaContentInput!
_internal_createAssessment Assessment!

Create a new Assessment ⚠️ This mutation is only accessible internally in the system ⚠️ 🔒 The user must have admin access to the course containing the section to perform this action.

courseId UUID!
input CreateAssessmentInput!
mutateContent ContentMutation!

Modify Content 🔒 The user must have admin access to the course containing the section to perform this action.

contentId UUID!
_internal_createSection Section!

Create new Section ⚠️ This mutation is only accessible internally in the system ⚠️ 🔒 The user must have admin access to the course containing the section to perform this action.

courseId UUID!
input CreateSectionInput!
mutateSection SectionMutation!

Modify the section with the given id. 🔒 The user must have admin access to the course containing the section to perform this action.

sectionId UUID!

Objects

AssessmentMetadata

Field Argument Type Description
skillPoints Int!

Number of skill points a student receives for completing this content

skillTypes [SkillType!]!

Type of the assessment

initialLearningInterval Int

The initial learning interval for the assessment in days. This is the interval that is applied after the assessment is completed the first time. Following intervals are calculated based on the previous interval and the user's performance. If this is null, the assessment will never be scheduled for review, which is useful for assessments that are not meant to be repeated.

CompositeProgressInformation

Field Argument Type Description
progress Float!

percentage of completedContents/totalContents

completedContents Int!

absolut number of completed content

totalContents Int!

absolut number of total content

ContentMetadata

Field Argument Type Description
name String!

Name of the content

type ContentType!

Content type

suggestedDate DateTime!

Suggested date when the content should be done

rewardPoints Int!

Number of reward points a student receives for completing this content

chapterId UUID!

ID of the chapter this content is associated with

courseId UUID!

ID of the course this content is associated with

tagNames [String!]!

TagNames this content is tagged with

ContentMutation

Field Argument Type Description
contentId UUID!

Identifier of Content

updateMediaContent MediaContent!

Update an existing Content

input UpdateMediaContentInput!
updateAssessment Assessment!

Update an existing Assessment

input UpdateAssessmentInput!
deleteContent UUID!

Delete an existing Content, throws an error if no Content with the given id exists

addTagToContent Content!

Add a tag to an existing content

tagName String
removeTagFromContent Content!

Remove a tag from an existing content

tagName String

ContentPayload

Field Argument Type Description
elements [Content!]!

the contents

pageInfo PaginationInfo!

pagination info

FlashcardSetAssessment

A set of flashcards, flashcard related fields are stored in the flashcard service.

Field Argument Type Description
assessmentMetadata AssessmentMetadata!

Assessment metadata

id UUID!

ID of the content

metadata ContentMetadata!

Metadata of the content

userProgressData UserProgressData!

Progress data of the content for the current user.

progressDataForUser UserProgressData!

Progress data of the specified user.

userId UUID!

MediaContent

Field Argument Type Description
id UUID!

ID of the content

metadata ContentMetadata!

Metadata of the content

userProgressData UserProgressData!

Progress data of the content for the current user.

progressDataForUser UserProgressData!

Progress data of the specified user.

userId UUID!

PaginationInfo

Return type for information about paginated results.

Field Argument Type Description
page Int!

The current page number.

size Int!

The number of elements per page.

totalElements Int!

The total number of elements across all pages.

totalPages Int!

The total number of pages.

hasNext Boolean!

Whether there is a next page.

ProgressLogItem

Field Argument Type Description
timestamp DateTime!

The date the user completed the content item.

success Boolean!

Whether the user completed the content item successfully.

correctness Float!

Value between 0 and 1 representing the user's correctness on the content item. Can be null as some contents cannot provide a meaningful correctness value.

hintsUsed Int!

How many hints the user used to complete the content item.

timeToComplete Int

Time in milliseconds it took the user to complete the content item. Can be null for contents that do not measure completion time.

QuizAssessment

A quiz, quiz related fields are stored in the quiz service.

Field Argument Type Description
assessmentMetadata AssessmentMetadata!

Assessment metadata

id UUID!

ID of the content

metadata ContentMetadata!

Metadata of the content

userProgressData UserProgressData!

Progress data of the content for the current user.

progressDataForUser UserProgressData!

Progress data of the specified user.

userId UUID!

Section

Representation of a Section

Field Argument Type Description
id UUID!

Unique identifier of the Section Object

courseId UUID!

Id of the Course the Section is located in.

name String!

Name of the Section

chapterId UUID!

Chapter the Section is located in

stages [Stage!]!

List of Stages contained in a Section

SectionMutation

Field Argument Type Description
sectionId UUID!

Identifier of the section

updateSectionName Section!

update the name of a Section

name String!
deleteSection UUID!

delete a Section by ID

createStage Stage!

create new Stage in Section

input CreateStageInput
updateStage Stage!

Update Content of Stage

input UpdateStageInput
deleteStage UUID!

delete Stage by ID

id UUID!
updateStageOrder Section!

update Order of Stages within a Section

stages [UUID!]!

Stage

Representation of a Stage

Field Argument Type Description
id UUID!

Unique identifier of the Stage Object

position Int!

Position of the Stage within the Section

requiredContents [Content!]!

List of Content that is labeled as required content

requiredContentsProgress Float!

Percentage of User Progress made to required Content

optionalContents [Content!]!

List of Content that is labeled as optional content

optionalContentsProgress Float!

Percentage of Progress made to optional Content

Suggestion

Represents a suggestion for a user to learn new content or review old content.

Field Argument Type Description
content Content!

The content that is suggested to the user.

type SuggestionType!

The type of suggestion.

UserProgressData

Represents a user's progress on a content item. See https://meitrex.readthedocs.io/en/latest/dev-manuals/gamification/userProgress.html

Field Argument Type Description
userId UUID!

The user's id.

contentId UUID!

The id of the content item.

log [ProgressLogItem]!

A list of entries each representing the user completing the content item. Sorted by date in descending order.

learningInterval Int

The learning interval in days for the content item. If null, the content item is not scheduled for learning.

nextLearnDate DateTime

The next time the content should be learned. Calculated using the date the user completed the content item and the learning interval. This is null if the user has not completed the content item once.

lastLearnDate DateTime

The last time the content was learned successfully. This is null if the user has not completed the content item once.

isLearned Boolean!

True if the user has completed the content item at least once successfully.

isDueForReview Boolean!

True if the assessment is due for review.

Inputs

AssessmentMetadataInput

Field Type Description
skillPoints Int!

Number of skill points a student receives for completing this content

skillTypes [SkillType!]!

Type of the assessment

initialLearningInterval Int

The initial learning interval for the assessment in days. This is the interval that is applied after the assessment is completed the first time. Following intervals are calculated based on the previous interval and the user's performance. If this is null, the assessment will never be scheduled for review, which is useful for assessments that are not meant to be repeated.

CreateAssessmentInput

Field Type Description
metadata CreateContentMetadataInput!

Metadata for the new Content

assessmentMetadata AssessmentMetadataInput!

Assessment metadata

CreateContentMetadataInput

Field Type Description
name String!

Name of the content

type ContentType!

Type of the content

suggestedDate DateTime!

Suggested date when the content should be done

rewardPoints Int!

Number of reward points a student receives for completing this content

chapterId UUID!

ID of the chapter this content is associated with

tagNames [String!]!

TagNames this content is tagged with

CreateMediaContentInput

Input for creating new media content. Media specific fields are stored in the Media Service.

Field Type Description
metadata CreateContentMetadataInput!

Metadata for the new Content

CreateSectionInput

Field Type Description
chapterId UUID!

Chapter Section will belong to

name String!

name given to Section

CreateStageInput

Field Type Description
requiredContents [UUID!]!

updated List of UUIDs for content labeled as required in this Stage

optionalContents [UUID!]!

updated List of UUIDs for content labeled as optional in this Stage

DateTimeFilter

Filter for date values. If multiple filters are specified, they are combined with AND.

Field Type Description
after DateTime

If specified, filters for dates after the specified value.

before DateTime

If specified, filters for dates before the specified value.

IntFilter

Filter for integer values. If multiple filters are specified, they are combined with AND.

Field Type Description
equals Int

An integer value to match exactly.

greaterThan Int

If specified, filters for values greater than to the specified value.

lessThan Int

If specified, filters for values less than to the specified value.

Pagination

Specifies the page size and page number for paginated results.

Field Type Description
page Int!

The page number, starting at 0. If not specified, the default value is 0. For values greater than 0, the page size must be specified. If this value is larger than the number of pages, an empty page is returned.

size Int!

The number of elements per page.

StringFilter

Filter for string values. If multiple filters are specified, they are combined with AND.

Field Type Description
equals String

A string value to match exactly.

contains String

A string value that must be contained in the field that is being filtered.

ignoreCase Boolean!

If true, the filter is case-insensitive.

UpdateAssessmentInput

Field Type Description
metadata UpdateContentMetadataInput!

Metadata for the new Content

assessmentMetadata AssessmentMetadataInput!

Assessment metadata

UpdateContentMetadataInput

Field Type Description
name String!

Name of the content

suggestedDate DateTime!

Date when the content should be done

rewardPoints Int!

Number of reward points a student receives for completing this content

chapterId UUID!

ID of the chapter this content is associated with

tagNames [String!]!

TagNames this content is tagged with

UpdateMediaContentInput

Field Type Description
metadata UpdateContentMetadataInput!

Metadata for the new Content

UpdateStageInput

Field Type Description
id UUID!

Identifier of the Stage

requiredContents [UUID!]!

updated List of UUIDs for content labeled as required in this Stage

optionalContents [UUID!]!

updated List of UUIDs for content labeled as optional in this Stage

Enums

ContentType

Type of the content

Value Description
MEDIA
FLASHCARDS
QUIZ

SkillType

Type of the assessment

Value Description
REMEMBER
UNDERSTAND
APPLY
ANALYZE

SortDirection

Specifies the sort direction, either ascending or descending.

Value Description
ASC
DESC

SuggestionType

Value Description
NEW_CONTENT
REPETITION

Scalars

Boolean

Built-in Boolean

Date

An RFC-3339 compliant Full Date Scalar

DateTime

A slightly refined version of RFC-3339 compliant DateTime Scalar

Float

Built-in Float

Int

Built-in Int

LocalTime

24-hour clock time value string in the format hh:mm:ss or hh:mm:ss.sss.

String

Built-in String

Time

An RFC-3339 compliant Full Time Scalar

UUID

A universally unique identifier compliant UUID Scalar

Url

A Url scalar

Interfaces

Assessment

Field Argument Type Description
assessmentMetadata AssessmentMetadata!

Assessment metadata

id UUID!

ID of the content

metadata ContentMetadata!

Metadata of the content

userProgressData UserProgressData!

Progress data of the content for the current user.

progressDataForUser UserProgressData!

Progress data of the specified user.

userId UUID!

Content

Field Argument Type Description
id UUID!

ID of the content

metadata ContentMetadata!

Metadata of the content

userProgressData UserProgressData!

Progress data of the content for the current user.

progressDataForUser UserProgressData!

Progress data of the specified user.

userId UUID!