Skip to content

Events API

Overview

This document describes the API operations for events. An event is a small operation done in Onegini IDP

Version information

Version : 1.0.0

Paths

Search for events

GET /api/events

Description

The endpoint allows to validate person credentials

Parameters

Type Name Description Schema
Query actor
required
User, that triggered the event, for which events should be returned, eg. admin. For more info see Rest Guidelines chapter. NOTE: not required when userId is defined. string
Query limit
required
Number of events that should be returned, eg. 10 string
Query offset
required
Offset from which to start, eg. 0 string
Query userId
required
User ID, that that is associated with event, for which events should be returned, eg. admin. For more info see Rest Guidelines chapter. NOTE: not required when actor is defined string

Responses

HTTP Code Description Schema
200 Credentials validated successfully ResultSet
400 Bad request ErrorResponse

Produces

  • application/json

Security

Type Name
basic basic_auth

Example HTTP request

Request path
/api/events?actor=string&limit=string&offset=string&userId=string

Example HTTP response

Response 200
{
  "resultSet" : [ {
    "event_identifier" : "08f831ab-a22f-4159-a851-15eec46c3717",
    "person_id" : "08f831ab-a22f-4159-a851-15eec46c3717",
    "occurred" : 1409145076543,
    "event_type" : "person.PersonCreatedEvent",
    "event_name" : "Person Created",
    "client_ip" : "192.168.10.30",
    "user_agent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0",
    "partition_id" : "default",
    "event_agent_user" : "persons_api_rest_user",
    "reason" : "Due to some reason, I deleted this user."
  } ],
  "pagination" : "object"
}
Response 400
{
  "Invalid actor" : {
    "error_code" : 4004,
    "error_message" : "Both user ID and actor ID are missing"
  },
  "Invalid limit" : {
    "error_code" : 4002,
    "error_message" : "Invalid limit (must be a number between 1 and 1000)"
  },
  "Invalid offset" : {
    "error_code" : 4003,
    "error_message" : "Invalid offset (must be at least 0)"
  }
}

Definitions

ErrorResponse

Name Description Schema
error_code
optional
Example : 1001 integer (int32)
error_message
optional
Example : "Requested feature is currently not available" string

EventInfo

Name Description Schema
client_ip
optional
Example : "192.168.10.30" string (ip)
event_agent_user
optional
The agent identifier (username) that mutated a user
Example : "persons_api_rest_user"
string
event_identifier
optional
Example : "[identifier](#identifier)" Identifier
event_name
optional
A more descriptive name that denotes what kind of event happened
Example : "Person Created"
string
event_type
optional
The type of event that happened
Example : "person.PersonCreatedEvent"
string
occurred
optional
Example : 1409145076543 integer (int64)
partition_id
optional
The partition of this person
Example : "default"
string
person_id
optional
Example : "[identifier](#identifier)" Identifier
reason
optional
An optional reason for the mutation (e.g. why an account was deleted)
Example : "Due to some reason, I deleted this user."
string
user_agent
optional
The full user_agent header coming from the browser of the end-user
Example : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0"
string

Identifier

Type : string (uuid)

ResultSet

Name Description Schema
pagination
optional
Example : "object" pagination
resultSet
optional
Example : [ "[eventinfo](#eventinfo)" ] < EventInfo > array

pagination

Name Description Schema
offset
optional
Example : 0 integer (int32)
pageSize
optional
Example : 0 integer (int32)
totalResults
optional
Example : 1 integer (int32)

Security

basic_auth

Type : basic