Skip to main content

system.kanoa.event.addPerformanceEvent

Description

Adds a new performance event

Syntax

addPerformanceEvent(performanceEventInfo, userId)

Parameters:
  • performanceEventInfo (dict)
  • userId (int)

  • Returns:
  • data (pyDataset)
  • Dictionary

    ParameterTypeRequiredNotes
    modeEventIdint
    startDatedatetime
    endDatedatetime
    performanceStateIdint
    valuefloat
    notestring

    Code Examples

    # Example Usage:
    userId = 18
    performanceEventInfo = {
    'modeEventId': 5,
    'startDate': 2025-05-01 00:00:00,
    'endDate': 2025-05-01 08:00:00,
    'performanceStateId': 7,
    'value': 0.1,
    'note': 'Approved'
    }
    addPerformanceEvent(performanceEventInfo, userId)
    >
    45, None
    >>>