Table of Contents
Last updated: 2024-11-14

Event administration


The event administration API is used for reading and managing events in the ShareAspace event store. The events in the event store are processed by the ShareAspace event bus.

Get all events for a space

Returns all events that are on the event bus. Note that once an event has been processed it is removed from the bus automatically.

GET /admin/eventStore/{spaceId}
{
  "href": "https://scenario.test/admin/eventStore/Space1",
  "data": [
    {
      "href": "https://scenario.test/admin/eventStore/Space1/1",
      "data": {
        "id": 1,
        "timeStamp": "2023-05-02T12:38:09.7877568Z",
        "recipient": "ScenarioEmail",
        "sender": "OnPartCreate",
        "user": "oem.pa@eurostep.com",
        "body": {
          "from": "no-reply@eurostep.com",
          "to": "oem.pa@eurostep.com",
          "subject": "Document Updated",
          "body": "part-00001 - part-00001"
        }
      },
      "links": [
        {
          "rel": "delete",
          "href": "https://scenario.test/admin/eventStore/Space1/1",
          "method": "DELETE"
        }
      ]
    }
  ]
}

Get all events for a space using filter

The event list can be filtered by the recipient and the sender. The recipient is the extension (resource id) where the event will be sent to and the sender is the event trigger (event trigger id) that triggered the event.

GET /admin/eventStore/{spaceId}?recipient={recipient}&sender={sender}

Get specific event

GET /admin/eventStore/{spaceId}/{id}
{
  "href": "https://scenario.test/admin/eventStore/Space1/1",
  "data": {
    "id": 1,
    "timeStamp": "2023-05-02T12:38:09.7877568Z",
    "recipient": "ScenarioEmail",
    "sender": "OnPartCreate",
    "user": "oem.pa@eurostep.com",
    "body": {
      "from": "no-reply@eurostep.com",
      "to": "oem.pa@eurostep.com",
      "subject": "Document Updated",
      "body": "part-00001 - part-00001"
    }
  },
  "links": [
    {
      "rel": "delete",
      "href": "https://scenario.test/admin/eventStore/Space1/1",
      "method": "DELETE"
    }
  ]
}

Delete specific event

Deletes a specific event. If the event is currently being processed it will be canceled and removed immediately. If the event is queued it will be removed.

DELETE /admin/eventStore/{spaceId}/{id}

Delete all events, optional filtering

Delete all events with our without optional filtering. If the event is currently running it will be canceled and removed immediately. If the event is queued it will be removed.

DELETE /admin/eventStore/{spaceId}?recipient={recipient}&sender={sender}

Payload TypeScript definitions

{
    id: long
    timeSpan: DateTime
    recipient: string
    sender: string
    user: string
    body: LoggingEventData | EmailEventData | ExternalEventData
}

LoggingEventData:

{
    action: string
    issuer: string
    context: string
    body: string
}

EmailEventData:

{
    from: string
    to: string
    subject: string
    body: string
}

ExternalEventData:

{
    body: string
    headers: Array<{ name: string, value: string}>
}