Developer docs

De Pluvo API geeft je programmatische toegang tot je leeromgeving. Beheer gebruikers, groepen, trainingen, inschrijvingen en certificaten vanuit je eigen systemen.

De API is gebaseerd op GraphQL. Je bepaalt zelf welke data je opvraagt of muteert, zonder overbodige velden. Authenticatie verloopt via OAuth 2.0 met client credentials. Webhooks houden je systemen real-time op de hoogte van wijzigingen.

Learning journeys

Use Cases

What is known in the Pluvo user interface as a learning journey is designated in the API as a Training. All actions related to learning journeys are handled through the Training entity in the GraphQL API.

Get single training

Retrieves one specific training via id or ref.

query {
  training(id: "uuid-here") {
    id
    title
    ref
    isActive
    archived
    startDate
    endDate
    subtitle
    introduction
  }
}

Get list

Use paginatedTrainings to retrieve trainings with filtering, pagination, and sorting.

query {
  paginatedTrainings(q: "safety", first: 10, archived: false) {
    edges {
      node {
        id
        title
        ref
        isActive
        archived
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
    count
  }
}

Create training

Creates a new training with title and optionally other metadata.

mutation {
  createTraining(training: {
    title: "Introduction to Safe Working"
    isActive: true
    ref: "safety-2024"
    subtitle: "Mandatory annual training"
    startDate: "2024-01-01T00:00:00Z"
    endDate: "2024-12-31T00:00:00Z"
    showParticipants: true
    enableChat: false
  }) {
    training {
      id
      title
      ref
    }
  }
}

Update training

Modifies data of an existing training. You can identify the training by id or ref.

mutation {
  updateTraining(
    ref: "safety-2024"
    training: {
      title: "Updated Title"
      isActive: false
    }
  ) {
    training {
      id
      title
      isActive
    }
  }
}

Archive/deactivate

Sets the training to archived. Archived trainings are hidden from users.

mutation {
  updateTraining(
    id: "uuid-here"
    training: {
      archived: true
    }
  ) {
    training {
      id
      archived
    }
  }
}

GraphQL Definitions

Type

type Training {
  id: UUID!
  title: String!
  subtitle: String
  introduction: String
  ref: String
  isActive: Boolean!
  archived: Boolean!
  overviewImage: File
  startDate: Date
  endDate: Date
  estimatedTimeSpent: String
  showParticipants: Boolean
  showSharedFiles: Boolean
  enableChat: Boolean
  portfolioItem: PortfolioItemListItem
  participants(...): TrainingUserConnection!
  trainers(...): TrainingUserConnection!
  modules: [Module!]!
}

Queries

training(id: UUID, ref: String): Training
trainings(query: String): [TrainingListItem!] @deprecated(reason: "Use paginatedTrainings")
paginatedTrainings(
  q: String
  active: Boolean
  archived: Boolean
  first: Int
  after: String
  offset: Int
  sortBy: TrainingSortByInput
): TrainingListItemConnection

Mutations

createTraining(training: CreateTrainingInput!): CreateTraining
updateTraining(id: UUID, ref: String, training: UpdateTrainingInput!): UpdateTraining

CreateTrainingInput

FieldTypeRequiredDescription
titleStringYesTraining title
refStringNoExternal reference
subtitleStringNoSubtitle displayed below the title
introductionStringNoIntroduction text (HTML)
isActiveBooleanNoWhether the training is visible
startDateDateTimeNoTraining start date
endDateDateTimeNoTraining end date
estimatedTimeSpentStringNoEstimated time to complete
passThresholdFloatNoMinimum score to pass
showParticipantsBooleanNoShow participant list
showSharedFilesBooleanNoShow shared files section
enableChatBooleanNoEnable chat functionality
extraFieldsJSONStringNoLegacy extra fields

UpdateTrainingInput additionally supports archived (Boolean).

Notes

  • Use paginatedTrainings for list views — trainings is deprecated.
  • No deleteTraining mutation — use archiving via updateTraining with archived: true.
  • Both archived and isActive exist for backward compatibility. Prefer archived.
  • The ref field is your anchor for synchronization — always set it for externally managed trainings.