Examples: Using the Eventing Service

    +

    This page contains examples of how to use the Eventing Service, using the Couchbase Web Console.

    Step by Step Examples

    These tutorial-like guides are ideal for a novice to learn the basics of Eventing, via complete start-to-finish instructions.

    Data Enrichment

    Cascade Delete

    Document Expiry

    Delete v Expiry

    Document Archival

    Cancel or Overwrite Timer

    Recurring Timer

    External REST via cURL GET

    Risk Assessment

    Scriptlets or Terse Examples

    The following Scriptlets are essentially handler only examples, and introduce more use cases. Here we assume the reader has a good understanding of the Eventing System and requires little guidance.

    basicBucketOps

    basicCurlGet

    basicCurlPost

    redactSharedData

    simpleFlatten

    fixEmailDomains

    keepLastN

    docControlledSelfExpiry

    shippingNotifier

    The following Scriptlets demonstrate using N1QL or the Query Service from within an Eventing handler.

    basicN1qlSelectStmt

    basicN1qlPreparedSelectStmt

    The following Scriptlets are more advanced use cases which focus on mutating documents without knowledge of the document’s schema.

    dateToEpochConversion

    deepCloneAndModify

    removeNullsAndEmptys

    genericRename

    genericFlatten