Skip to main content

system.kanoa.attribute.addAttributeEvent

Description

Adds an attribute event record.

Syntax

addAttributeEvent(attributeEventInfo, userId)

Parameters:
  • attributeEventInfo (dict): Attribute event information.
  • userId (int): User ID

  • Returns:
  • attributeEventId (int): Newly created attribute event ID
  • Dictionary

    ParameterTypeRequiredNotes
    attributeAssetLinkIdinte.g. 18
    valuestringe.g. 'sausages'
    tStampdatetimee.g. somedate

    Code Examples

    # Example usage
    attributeEventInfo = {
    'attributeAssetLinkId': 18,
    'value': 'sausages',
    'tStamp': somedate
    }
    userId = 123
    attributeEventId = system.kanoa.attribute.addAttributeEvent(attributeEventInfo, userId)
    print(attributeEventId) # Print the attribute event ID