Statistics API

This document describes the Onegini IDP API operations to validate credentials.

STATISTICS-API-1 Get statistics

Endpoint: GET /api/statistics

The endpoint allows to get current statistics. The response is provided in JSON format.

Currently supported overview statistics are:

  1. invitations_pending_total
  2. persons_activated_total
  3. persons_created_total
  4. persons_logged_in_year_continuous
  5. persons_migrated_total
  6. persons_not_logged_in_year_continuous
  7. persons_signed_up_week_continuous

Currently supported history statistics are:

  1. invitations_created_week_history
  2. invitations_validated_week_history
  3. logins_week_history
  4. password_reset_code_validated_week_history
  5. persons_migrated_week_history
  6. persons_signed_up_week_history
  7. persons_unblocked_week_history

Example request

GET /api/statistics

Example response

Response body:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

{
    "overview": {
        "invitations_pending_total": 31,
        "persons_activated_total": 145,
        "persons_created_total": 225,
        "persons_logged_in_year_continuous": 109,
        "persons_migrated_total": 43,
        "persons_not_logged_in_year_continuous": 116,
        "persons_signed_up_week_continuous": 1
    },
    "history": [
        {
            "start_date": 1469397600000,
            "values": {
                "invitations_created_week_history": 29,
                "invitations_validated_week_history": 21,
                "logins_week_history": 53,
                "password_reset_code_validated_week_history": 1,
                "persons_migrated_week_history": 6,
                "persons_signed_up_week_history": 4,
                "persons_unblocked_week_history": 0
            }
        },
        {
            "start_date": 1468792800000,
            "values": {
                "invitations_created_week_history": 12,
                "invitations_validated_week_history": 11,
                "logins_week_history": 2,
                "password_reset_code_validated_week_history": 2,
                "persons_migrated_week_history": 3,
                "persons_signed_up_week_history": 1,
                "persons_unblocked_week_history": 0
            }
        }
    ]
}

STATISTICS-API-2 Get statistics for history

Endpoint: GET /api/statistics/history

The endpoint allows to get weekly historical statistics. The response is provided in CSV format, comma separated.

The available weekly statistics are listed in STATISTICS-API-2 description.

Example request

GET /api/statistics/history
Accept: text/csv

Example response

Response body:

HTTP/1.1 200 OK
Content-Type: text/csv;charset=UTF-8

start_date,logins_week_history,persons_migrated_week_history,persons_signed_up_week_history,invitations_created_week_history,invitations_validated_week_history,password_reset_code_validated_week_history,persons_unblocked_week_history
2016-07-25,1,0,0,0,0,0,0
2016-07-18,2,0,1,0,0,0,0
2016-07-11,0,0,0,0,0,0,0