Your suggested change has been received. Thank you.

close

Event API (v2)

Download OpenAPI specification:Download

API to access events generated by iWelcome. About the structure of the events The events are designed to allow for easy querying to do data analysis and reporting. event types and event categories

Several event types have been defined and each event_type is assigned to an event category. Both event types are listed below as 'schemas' having a 3-digit number, e.g. 507 OTP SMS sent. The event categories are listed as well, e.g. 5XX for Communication events. Note that a 'fake' event type 000 is defined in this specification that includes any data that may appear as event-data in any of the supported events. event data The design of the schemas for the events have as much 'common' event-attributes as possible. The schema for each event_type is a sub-set ('sub-schema' ) of the fake 000 event. The 000-event can be considered as the meta-schema for all events. The design of the event meta-schema aims at finding the right balance between the following (somewhat conflicting) principles:

  • grouping attributes reflecting the logical datamodel
  • 'flattening' the datamodel, such that event attributes follow the same structure. This allows for easy querying of events with the same values for those attributes.

Add functional events

Each added event is validated against the json-schema and MUST have the event_type-id no events can be posted that have: * event_type_id < 10000 (so an external application cannot post our native events) * event-category equal to one of our categories. * if a posted event has attributes that matches the default event metadata schema, they are validated against our validation-rules for such fields, see yAML. * Any event-attribute that is not in the json-schema is ignored; the event does not get rejected.

Authorizations:
OAuth2
header Parameters
Authorization
required
string

Bearer . The access_token should have the scope event:event:provider.

Request Body schema: application/vnd.iwelcome.v1+json
property name*
additional property
object

Responses

Request samples

Content type
application/vnd.iwelcome.v1+json
{
  • "property1": { },
  • "property2": { }
}

Response samples

Content type
application/vnd.iwelcome.v1+json
{
  • "property1": { },
  • "property2": { }
}

API to query an end-user's events

API to query events, typically to display on a timeline in either a self-service application or user management application. The endpoint is protected * event:event:consumer; when this scope is used any user's events can be returned (dependent on filtering)

Authorizations:
OAuth2
query Parameters
user_id
string

The user id for which to query the events. When an authenticated user asks for his own events he needs to specify his own user_id. Only users having the event:event:consumer scope can access events for other users.

filter
string

Filtering query that allows to filter on which events are returned. The following filter criteria are supported:

  • user-id EQ
    Needed only when scope event:event:consumer is set)
  • event_category EQ

Multiple filter criteria can be used, using the AND / OR operators.

page
integer >= 1
Default: 1

Pagination parameter indicating which page must be returned,

size
integer [ 1 .. 100 ]
Default: 20

Pagination parameter indicating the number of results per page that is returned.

header Parameters
Authorization
required
string

Bearer . The access_token should have either scope: * event:event:consumer; when this scope is used any user's events can be returned (dependent on filtering)

Responses

Response samples

Content type
application/json
{
  • "event_type_id": "000",
  • "event_type_details": {
    },
  • "timestamp": "2018-11-14T14:55:22Z",
  • "device": {
    },
  • "end_user": {
    },
  • "authenticated_user": {
    },
  • "location": {
    },
  • "client_application": {
    },
  • "iwelcome_as_a_client_application": {
    },
  • "authentication": {
    },
  • "identifier_value": "somebody@somewhere.com",
  • "application_session": {
    },
  • "block": {
    },
  • "message_details": {
    },
  • "email_template": {
    },
  • "sms_template": {
    },
  • "phone_number": "+31612345678",
  • "profile_attribute": {
    },
  • "processing_purpose": {
    },
  • "protocol": "OAuth",
  • "amr": "pwd",
  • "username": "Johnny1995",
  • "previous_state": "INACTIVE",
  • "new_state": "ACTIVE",
  • "count": 1,
  • "group": {
    },
  • "sub_group": {
    }
}