Events

An Event is emitted by an App, possibly originating from one of its Resources, at a particular time. An Event can be tagged with other Resources so that the Events can be referenced by any of those Resources. As an example, the Tilesaw App might have a Tilesaw Job resource that emits an Event with a message describing the creation of a tagged Platform Frame Resource.

Events are queried using their ID or by endpoints providing event feeds. Every resource in Indy Events as well as every App in Indy Events has its own event feed.


Event Creation

$ curl -n -X POST https://indy-events.api.wdtinc.com/events \
-H "Accept: application/vnd.wdt+json; version=1"
-H "ContentType: application/json"
-d "{
  'app': 'Tilesaw',
  'origin': {
    'namespace': 'Indy::Tilesaw::Job',
    'id': '7a77344a-6f35-4baf-8069-79b57f077b0a'
  },
  'namespace': 'Indy::Events::FrameCreatedEvent',
  'message': 'Frame created a new frame, {}, for product {}.',
  'occurrenceTime': '2015-05-01T00:00:00Z',
  'tagged': [{
    'namespace': 'Indy::Smelt::Job',
    'id': '31c0dd73-7321-4078-9eda-837d0b6b1dc8'
  },{
    'namespace': 'Indy::Platform::Product',
    'id': 'f0953889-7893-4c1a-a894-e07ea23622c9',
  },{
    'namespace': 'Indy::Platform::Frame',
    'id': '66df61cc-d4e0-4058-87fa-787e5b58fa71'
  }]
}"

Response Example

HTTP/1.1 200 OK
{
  'id': 'e4278735-594d-41fd-814b-40d0d74c36ed',
  'app': 'Tilesaw',
  'origin': {
    'namespace': 'Indy::Tilesaw::Job',
    'id': '7a77344a-6f35-4baf-8069-79b57f077b0a'
  },
  'namespace': 'Indy::Events::FrameCreatedEvent',
  'status': 'inactive',
  'message': 'Frame created a new frame, {}, for product {}.',
  'creationTime': '2015-05-01T01:00:00Z',
  'occurrenceTime': '2015-05-01T00:00:00Z',
  'expirationTime': null,
  'tagged': [{
    'namespace': 'Indy::Smelt::Job',
    'id': '31c0dd73-7321-4078-9eda-837d0b6b1dc8'
  },{
    'namespace': 'Indy::Platform::Product',
    'id': 'f0953889-7893-4c1a-a894-e07ea23622c9',
  },{
    'namespace': 'Indy::Platform::Frame',
    'id': '66df61cc-d4e0-4058-87fa-787e5b58fa71'
  }]
}

Event Information

To get data for a single event with a known UUID:

GET /event/{event-uuid}

Request Example

$ curl -n -X GET https://indy-events.api.wdtinc.com/events/e4278735-594d-41fd-814b-40d0d74c36ed \
-H "Accept: application/vnd.wdt+json; version=1"

Response Example

HTTP/1.1 200 OK
{
  'id': 'e4278735-594d-41fd-814b-40d0d74c36ed',
  'app': 'Tilesaw',
  'origin': {
    'namespace': 'Indy::Tilesaw::Job',
    'id': '7a77344a-6f35-4baf-8069-79b57f077b0a'
  },
  'namespace': 'Indy::Events::FrameCreatedEvent',
  'status': 'inactive',
  'message': 'Frame created a new frame, {}, for product {}.',
  'creationTime': '2015-05-01T01:00:00Z',
  'occurrenceTime': '2015-05-01T00:00:00Z',
  'expirationTime': null,
  'tagged': [{
    'namespace': 'Indy::Smelt::Job',
    'id': '31c0dd73-7321-4078-9eda-837d0b6b1dc8'
  },{
    'namespace': 'Indy::Platform::Product',
    'id': 'f0953889-7893-4c1a-a894-e07ea23622c9',
  },{
    'namespace': 'Indy::Platform::Frame',
    'id': '66df61cc-d4e0-4058-87fa-787e5b58fa71'
  }]
}

Event Feeds

All event feeds return the same basic structure:

[{
  'id': 'e4278735-594d-41fd-814b-40d0d74c36ed',
  'app': 'Tilesaw',
  'origin': {
    'namespace': 'Indy::Tilesaw::Job',
    'id': '7a77344a-6f35-4baf-8069-79b57f077b0a'
  },
  'status': 'inactive',
  'message': 'Frame created a new frame, {}, for product {}.',
  'creationTime': '2015-05-01T01:00:00Z',
  'occurrenceTime': '2015-05-01T00:00:00Z',
  'expirationTime': null,
  'tagged': [{
    'namespace': 'Indy::Smelt::Job',
    'id': '31c0dd73-7321-4078-9eda-837d0b6b1dc8'
  },{
    'namespace': 'Indy::Platform::Product',
    'id': 'f0953889-7893-4c1a-a894-e07ea23622c9',
  },{
    'namespace': 'Indy::Platform::Frame',
    'id': '66df61cc-d4e0-4058-87fa-787e5b58fa71'
  }]
},{
  ...
},{
  ...
}]

All event feeds accept the same optional parameters. Results are always ordered by time of occurrence, descending, ie the Latest Events. The after and before cannot both be used in the same call.

Query String Parameters (All Optional)

Name Type Description
after string The UUID of the event from where the feed should begin.
before string The UUID of the event from where the feed should end.
limit number The number of results the feed should return (default 10).

Main Event Feed

The highest-level event feed in the API. This returns the latest events for the entire Indy Ecosystem.

GET /events

App Event Feed

Shows the latest events for an application.

GET /apps/{app-uuid-or-handle}/events

Resource Event Feed

Shows the latest events for an application.

GET /resources/{resource-uuid}/events