-
Notifications
You must be signed in to change notification settings - Fork 1
login_time_frame
The login_time_frame endpoint returns all logins from the specified from-time and optional end-time summed by the specified scale. It supports the following query parameters:
from : The required from date either in UTC epoch-seconds or in the YYYY-MM-dd format.
to : The optional to date either in UTC epoch-seconds or in the YYYY-MM-dd format.
scale : The optional time scale of the logins, defaults to day. Valid values are minute, hour, day, week, month, quarter and year and the scale sums all logins within the same time scale together.
idp_id : The optional IdP entity-id to filter the results.
sp_id : The optional SP entity-id to filter the results.
include_unique : The optional true / false indicator with the default of true which specifies if the count for unique logins is included in the result.
group_by : The optional comma-separated tags which determines how the results are grouped together. Valid values are the tag names of the idp_id and sp_id information in the main logins measurement.
epoch : The optional epoch parameter that determines the time format in the response. By default the API returns timestamps in RFC3339 format with nanosecond precision. For milliseconds use ms.
state : The optional status of the Provider. By default all the statuses are returned. Valid values are the default all, prodaccepted and testaccepted
Minimal example with the defaults from the server:
curl -u dashboard:secret "http://localhost:8080/api/stats/public/login_time_frame?from=2017-01-01" | jq .
And the - shortened result -
[
{
"count_user_id": 1,
"distinct_count_user_id": 1,
"time": "2017-02-07T00:00:00Z"
},
...
{
"count_user_id": 1,
"distinct_count_user_id": 1,
"time": "2018-05-24T00:00:00Z"
}
]
Another example with overrides for the defaults:
curl -u dashboard:secret "http://localhost:8080/api/stats/public/login_time_frame?from=2017-01-01&to=2018-01-01&scale=month&idp_id=https://idp/1&group_by=sp_id" | jq .
It will return per SP all the aggregated non-unique and unique logins per month for the IdP https://identity-provider/0GFBFHU8FPFG4QW. The number of results - given that every month at least one login has taken place for each SP - is the number of SP's * 12 months * 2. Shortened result:
[
{
"count_user_id": 1,
"idp_entity_id": "https://idp/1",
"time": "2017-02-01T00:00:00Z"
},
{
"count_user_id": 1,
"idp_entity_id": "https://idp/1",
"time": "2017-05-01T00:00:00Z"
},
...
{
"distinct_count_user_id": 2,
"idp_entity_id": "https://idp/1",
"time": "2017-09-01T00:00:00Z"
},
{
"distinct_count_user_id": 1,
"idp_entity_id": "https://idp/1",
"time": "2017-10-01T00:00:00Z"
}
]