Authentications Log API

Query audit log of authentication events (logins and logouts).

For each endpoint, a compound document is returned. The primary collection of event objects is paginated, ordered by date descending. Secondary collections of pseudonyms (logins), accounts, and users related to the returned events are also included. Refer to the Logins, Accounts, and Users APIs for descriptions of the objects in those collections.

An AuthenticationEvent object looks like:

{
  // timestamp of the event
  "created_at": "2012-07-19T15:00:00-06:00",

  // authentication event type ('login' or 'logout')
  "event_type": "login",

  // ID of the pseudonym (login) associated with the event
  "pseudonym_id": 9478,

  // ID of the account associated with the event. will match the
  // account_id in the associated pseudonym.
  "account_id": 2319,

  // ID of the user associated with the event will match the user_id in
  // the associated pseudonym.
  "user_id": 362
}
  

Query by pseudonym. AuthenticationAuditApiController#for_pseudonym

GET /api/v1/audit/authentication/pseudonyms/:pseudonym_id

List authentication events for a given pseudonym.

Request Parameters:

  • start_time
    Datetime
    optional

    The beginning of the time range

    from which you want events.

  • end_time
    Datetime
    optional

    The end of the time range

    from which you want events.

Query by account. AuthenticationAuditApiController#for_account

GET /api/v1/audit/authentication/accounts/:account_id

List authentication events for a given account.

Request Parameters:

  • start_time
    Datetime
    optional

    The beginning of the time range

    from which you want events.

  • end_time
    Datetime
    optional

    The end of the time range

    from which you want events.

Query by user. AuthenticationAuditApiController#for_user

GET /api/v1/audit/authentication/users/:user_id

List authentication events for a given user.

Request Parameters:

  • start_time
    Datetime
    optional

    The beginning of the time range

    from which you want events.

  • end_time
    Datetime
    optional

    The end of the time range

    from which you want events.