ec.amqp 0.10.1

This documents all events and commands used in entrecode systems.

  • #PublicAPI
  • #DataManager
  • #Mail/Push Commands
  • #ec.Tasks
  • #AppServer
  • #Account Server Notifications
  • #Customer: DSB
  • #Customer: Dealbunny

Servers

  • cluster1.entrecode.deamqpproduction

    This is the entrecode RabbitMQ broker.

  • cluster1.cachena.entrecode.deamqpstage

    This is the entrecode RabbitMQ broker, staging version.

Operations

  • SUB /{shortID}/{modelTitle}/{entryID}/{entryEventType}

    a Data Manager entry was created, updated or deleted.
    It also contains info about which content has changed on entryUpdated events.
    Example:

    amqp.workerQueue( // or amqp.subscribe(
      'myService',
      'publicAPI',
      ['035af82b.mymodel.*.entryCreated'], // all created entries in mymodel
      async (event, properties, {ack, nack}) => {
        const eventType = properties.type;
        // event is parsed payload
        ack(); // always call ack() or nack()
        nack(10000, true) // call nack after timeout of 10 seconds. This is also the default. Second parameter requeue (default is `false` in contrast to amqplib native behavior), third parameter redirect queue (for dead-letter queues)
      },
      1 // prefetch (default 1)
    );
    
    Operation IDentrySub
    shortID
    required
    string
    must match: ^[0-9a-f]{8}$uid: shortID

    Short ID of the data manager

    modelTitle
    required
    string
    uid: modelTitle

    Title of the model

    entryID
    required
    string
    must match: ^[0-9A-Za-z-_]{7,14}$uid: entryID

    ID of the entry

    entryEventType
    required
    string
    uid: entryEventType

    type of the entry event

      Allowed values:
    • "entryCreated"
    • "entryUpdated"
    • "entryDeleted"
    • #PublicAPI

    Accepts the following message:

    PublicAPIEntryEvent
    object
    object

    Examples

  • SUB /{shortID}/_assets/{assetGroupID}/{assetID}/{assetEventType}

    an asset was created, updated or deleted.

    Operation IDassetSub
    shortID
    required
    string
    must match: ^[0-9a-f]{8}$uid: shortID

    Short ID of the data manager

    assetGroupID
    required
    string
    uid: assetGroupID

    Title of the asset Group

    assetID
    required
    any

    ID of the entry

    assetEventType
    required
    string
    uid: assetEventType

    type of the asset event

      Allowed values:
    • "assetCreated"
    • "assetUpdated"
    • "assetDeleted"
    • #PublicAPI

    Accepts the following message:

    PublicAPIAssetEvent
    object
    object

    Examples

  • SUB /{shortID}/_auth/{accountID}/loggedIn

    a DM User has logged in / got a new access token

    Operation IDloggedInSub
    shortID
    required
    string
    must match: ^[0-9a-f]{8}$uid: shortID

    Short ID of the data manager

    accountID
    required
    string
    format: uuiduid: accountID

    Data Manager User Account ID

    • #PublicAPI

    Accepts the following message:

    PublicAPIUserLoggedInEvent
    object
    object

    Examples

  • SUB /{dataManagerID}/{dataManagerEventType}

    a data manager was created or updated.

    Operation IDdatamanagerSub
    dataManagerID
    required
    string
    format: uuiduid: dataManagerID

    UUID of the Data Manager

    dataManagerEventType
    required
    string
    uid: dataManagerEventType

    type of the dm event. There is no event for Deletion!

      Allowed values:
    • "datamanagerCreated"
    • "datamanagerUpdated"
    • #DataManager

    Accepts the following message:

    ecAPIDataManagerEvent

    Settings of the created or updated data manager. Note that old values are not available on update events.

    object
    object

    Examples

  • SUB /{dataManagerID}/{modelID}/{modelEventType}

    a model was created, updated or deleted.

    Operation IDmodelSub
    dataManagerID
    required
    string
    format: uuiduid: dataManagerID

    UUID of the Data Manager

    modelID
    required
    string
    format: uuiduid: modelID

    UUID of the Model

    modelEventType
    required
    string
    uid: modelEventType

    type of the model event

      Allowed values:
    • "modelCreated"
    • "modelUpdated"
    • "modelDeleted"
    • #DataManager

    Accepts the following message:

    ecAPIModelEvent
    object
    object

    Examples

  • SUB /{dataManagerID}/{assetGroupID}/{assetgroupEventType}

    an assetgroup was created or updated.

    Operation IDassetgroupSub
    dataManagerID
    required
    string
    format: uuiduid: dataManagerID

    UUID of the Data Manager

    assetGroupID
    required
    restricted any
    must match: ^((?!^image$|^video$|^audio$|^plain$|^document$|^spreadsheet$|^archive$)[a-z0-9_-]{1,32})$[ 1 .. 32 ] charactersuid: assetGroupID

    ID/title of the assetgroup

    assetgroupEventType
    required
    string
    uid: assetgroupEventType

    type of the assetgroup event

      Allowed values:
    • "assetgroupCreated"
    • "assetgroupUpdated"
    • #DataManager

    Accepts the following message:

    ecAPIAssetGroupEvent
    object
    object

    Examples

  • SUB /{dataManagerID}/account/{accountID}/deleted

    an DM Account was deleted
    Note that there are currently no events for created or updated DM Accounts.
    Also, there are no events for ec.AccountServer Accounts (ec-Accounts).

    Operation IDaccountSub
    dataManagerID
    required
    string
    format: uuiduid: dataManagerID

    UUID of the Data Manager

    accountID
    required
    string
    format: uuiduid: accountID

    ID/title of the assetgroup

    • #DataManager

    Accepts the following message:

    ecAPIAccountEvent
    object
    object

    Examples

  • PUB /cmd/sendMail/mailgun/{domain}

    send an E-Mail via ec.mail (mailgun)

    Operation IDsendMailMailgunPub
    domain
    required
    string
    uid: domain

    mail domain to use

    Default value:"entrecode.de"
    • #Mail/Push Commands

    Accepts the following message:

    MailMailgunCommand
    object
    object

    Examples

  • PUB /cmd/sendPush/hector/{appsiteID}

    send a push notification for Hector Appsites via Firebase

    Operation IDsendPushHectorPub
    appsiteID
    required
    string
    format: uuiduid: appsiteID

    appsiteID to use (for firebase config)

    • #Mail/Push Commands

    Accepts the following message:

    PushHectorCommand
    object
    object

    Examples

  • PUB /cmd/task/{task}

    start an ec.task. Available tasks are output from ec.tasks API: https://ec-tasks.entrecode.de/

    Operation IDecTaskCommand
    task
    required
    string
    uid: task

    task identifier

    • #ec.Tasks

    Accepts the following message:

    ecTaskCommand
    object

    payload is depending on the task

    object

    Examples

  • PUB /build/{platformType}/run

    start a build at ec.appserver

    Operation IDappserverBuildCommand
    platformType
    required
    string
    uid: platformType

    platformType lowercased

    • #AppServer

    Accepts the following message:

    AppServerBuildCommand
    object

    platform object

    object

    Examples

  • SUB /build/{platformType}/buildEvent

    an event produced by a running build

    Operation IDappserverBuildEvent
    platformType
    required
    string
    uid: platformType

    platformType lowercased

    • #AppServer

    Accepts the following message:

    AppServerBuildEvent
    object
    object

    Examples

  • SUB /build/{platformType}/buildResult

    an event produced by a finished build

    Operation IDappserverBuildResult
    platformType
    required
    string
    uid: platformType

    platformType lowercased

    • #AppServer

    Accepts the following message:

    AppServerBuildResult
    object
    object

    Examples

  • SUB /ecAuth/permissionsUpdated

    Permissions of an ec.account were changed

    Operation IDecAuthPermissionsUpdated
    • #Account Server Notifications

    Accepts the following message:

    ecAuthPermissionsUpdated
    object
    object

    Examples

  • SUB /ecAuth/tokenRevoked

    An auth token was revoked

    Operation IDecAuthTokenRevoked
    • #Account Server Notifications

    Accepts the following message:

    ecAuthTokenRevoked
    object
    object

    Examples

  • SUB /eva_webhook_events/{eventType}

    Subscribe to an DSB EVA webhook event

    Operation IDdsbEvaWebhookEventSub
    eventType
    required
    string
    uid: eventType

    currently only abo_renewed is implemented

    Default value:"abo_renewed"
    • #Customer: DSB

    Accepts the following message:

    DSBEvaWebhookEvent
    object
    object

    Examples

  • SUB /deal/published/{dealID}

    A new Deal is published

    Operation IDdealbunnyDealPublished
    dealID
    required
    any

    ID of the newly published Deal

    • #Customer: Dealbunny

    Accepts the following message:

  • SUB /{accountID}/seen

    An Account has seen its activities

    Operation IDdealbunnyAccountSeen
    accountID
    required
    any

    ID of the Account producing this event

    • #Customer: Dealbunny

    Accepts the following message:

  • SUB /{accountID}/{dealAction}/{dealID}

    An Account has done something on a deal

    Operation IDdealbunnyDealAction
    accountID
    required
    any

    ID of the Account producing this event

    dealAction
    required
    string
    uid: dealAction
      Allowed values:
    • "createdDeal"
    • "likedDeal"
    • "unlikedDeal"
    dealID
    required
    any

    ID of the deal the action was performed on

    • #Customer: Dealbunny

    Accepts the following message:

  • SUB /{accountID}/postedComment/{dealID}{/replyTo}{/parentComment}

    An Account has posted a comment

    Operation IDdealbunnyPostCommentAction
    accountID
    required
    any

    ID of the Account producing this event

    dealID
    required
    any

    ID of the deal the comment was created on

    /replyTo
    required
    string
    uid: /replyTo

    set to 'replyTo' if parentComment is set^

      Allowed values:
    • "replyTo"
    /parentComment
    required
    any
    uid: /parentComment

    a parent comment ID, if this is a reply comment

    • #Customer: Dealbunny

    Accepts the following message:

  • SUB /{accountID}/{commentAction}/{commentID}

    An Account has done something on a comment

    Operation IDdealbunnyCommentAction
    accountID
    required
    any

    ID of the Account producing this event

    commentAction
    required
    string
    uid: commentAction
      Allowed values:
    • "likedDealComment"
    • "dislikedDealComment"
    • "undislikedDealComment"
    • "unlikedDealComment"
    commentID
    required
    any

    ID of the comment the action was performed on

    • #Customer: Dealbunny

    Accepts the following message:

  • SUB /{accountID}/redeemedReward/{rewardID}

    An Account redeemed a reward

    Operation IDdealbunnyRewardRedeem
    accountID
    required
    any

    ID of the Account producing this event

    rewardID
    required
    any

    ID of the reward that was redeemed

    • #Customer: Dealbunny

    Accepts the following message:

  • PUB /expo/dealbunny/ticket

    create a Dealbunny Expo Push Ticket

    Operation IDdealbunnyExpoTicket
    • #Customer: Dealbunny

    Accepts the following message:

    <anonymous-message-23>
    object
    object

    Examples

  • PUB /expo/dealbunny/deleteMessageToken

    command to delete a dealbunny Expo Push Message Token

    Operation IDdealbunnyDeleteMessageTokenCommand
    • #Customer: Dealbunny

    Accepts the following message:

    <anonymous-message-24>
    object
    object

    Examples

Messages

  • #1PublicAPIEntryEvent
    object
    object
  • #2PublicAPIAssetEvent
    object
    object
  • #3PublicAPIUserLoggedInEvent
    object
    object
  • #4ecAPIDataManagerEvent

    Settings of the created or updated data manager. Note that old values are not available on update events.

    object
    object
  • #5ecAPIModelEvent
    object
    object
  • #6ecAPIAssetGroupEvent
    object
    object
  • #7ecAPIAccountEvent
    object
    object
  • #8MailMailgunCommand
    object
    object
  • #9PushHectorCommand
    object
    object
  • #10ecTaskCommand
    object

    payload is depending on the task

    object
  • #11AppServerBuildCommand
    object

    platform object

    object
  • #12AppServerBuildEvent
    object
    object
  • #13AppServerBuildResult
    object
    object
  • #14ecAuthPermissionsUpdated
    object
    object
  • #15ecAuthTokenRevoked
    object
    object
  • #16DSBEvaWebhookEvent
    object
    object