What is known in the Pluvo user interface as a learning path is designated in the API as a Training
. All actions related to learning paths—such as creating, editing, connecting participants, or adding modules—are therefore handled through the Training
entity in the GraphQL API.
Retrieves one specific training via id
or ref
. Often used to fetch details and modules of a training.
query {
training(id: "uuid-here") {
id
title
ref
isActive
portfolioItem {
id
}
}
}
Use paginatedTrainings
to retrieve trainings with filtering, pagination, and sorting.
query {
paginatedTrainings(q: "safety", first: 10) {
edges {
node {
id
title
isActive
}
}
}
Creates a new training with title and optionally other metadata such as start date and ref.
mutation {
createTraining(training: {
title: "Introduction to Safe Working"
isActive: true
ref: "safety-2024"
}) {
training {
id
title
ref
}
}
}
Modifies data of an existing training such as title, visibility, or metadata.
mutation {
updateTraining(
id: "uuid-here"
training: {
title: "Updated Title"
archived: true
}
) {
training {
id
title
archived
}
}
}
Sets the training to archived or inactive. Useful for hiding old trainings.
mutation {
updateTraining(
id: "uuid-here"
training: {
isActive: false
archived: true
}
) {
training {
id
isActive
archived
}
}
}
The Training
type contains the structure of a learning path, including metadata, visibility, and relationships to users, files, and modules.
type Training {
id: UUID!
title: String!
subtitle: String
introduction: String
ref: String
isActive: Boolean!
archived: Boolean!
overviewImage: File
startDate: Date
endDate: Date
estimatedTimeSpent: String
portfolioItem: PortfolioItemListItem
users: [User!]
participants(...): TrainingUserConnection!
trainers(...): TrainingUserConnection!
modules: [Module!]!
}
Use the following queries to retrieve trainings:
training(id: UUID, ref: String): Training
trainings(query: String): [TrainingListItem!] @deprecated
paginatedTrainings(q: String, active: Boolean, archived: Boolean): TrainingListItemConnection
For creating and modifying trainings:
createTraining(training: CreateTrainingInput!): CreateTraining
updateTraining(id: UUID, ref: String, training: UpdateTrainingInput!): UpdateTraining
paginatedTrainings
for list views with filters.archived
and isActive
are present for management.deleteTraining
mutation — use archiving instead.