Reporting REST API
The following chapter gives an overview of the reporting functionality of the nevisAdapt service through REST API.
There are two potential callers of this API: admin and end-user.
To access the admin end points the user should have the role nevisAdapt.admin assigned.
In case of an end-user, the user should have the role nevisAdapt.user and the SecToken must also contain the domain of the user (you can see an example configuration for the SecToken content below).
request:UserId -> userid
request:Domain -> domain
session:ch.nevis.session.loginid -> loginId
session:ch.adnovum.nevisidm.profileId -> profileId
session:ch.adnovum.nevisidm.clientId -> clientId
request:ActualRoles -> roles
URL: /api/admin/session-history
HTTP Request Method: GET
Parameters:
- loginId: string
- realm: string
- size: integer (optional)
- page: integer (optional)
- sort: string,(asc/desc) (optional)
Returns: JSON content array of UserSessionDtos with pageable metadata
{
"content": [{
sessionId: long,
startDate: date,
endDate: date,
operatingSystem: string,
deviceType: string,
countryCode: string,
latitude: decimal,
longitude: decimal,
browser: string,
ipAddress: string
},
...
],
"pageable": "INSTANCE",
...
}Purpose: Fetches the session history for a given user on admin request.
URL: /api/session-history
HTTP Request Method: GET
Parameters:
- size: integer (optional)
- page: integer (optional)
- sort: string,(asc/desc) (optional)
Returns: See /api/admin/session-history
Purpose: Fetches the session history for a given user on their own request.
URL: /api/admin/user-devices
HTTP Request Method: GET
Parameters:
- loginId: string
- realm: string
- size: integer (optional)
- page: integer (optional)
- sort: string,(asc/desc) (optional)
Returns: JSON content array of UserDevices with pageable metadata
{
"content": [{
deviceId: long,
type: string,
userId: long,
counter: long,
firstLogin: date,
lastLogin: date,
operatingSystem: string,
deviceType: string,
browser: string
},
...
],
"pageable": "INSTANCE",
...
}Purpose: Fetches the list of devices of a user on admin request.
URL: /api/user-devices
HTTP Request Method: GET
Parameters:
- size: integer (optional)
- page: integer (optional)
- sort: string,(asc/desc) (optional)
Returns: See /api/admin/user-devices
Purpose: Fetches the list of devices of a user on their own request.
URL: /api/admin/user-device/{deviceId}/{userId}
HTTP Request Method: DELETE
Parameters:
- deviceId: long
- userId: long
Returns: none
Purpose: Deletes a device from a user, requested by admin.
URL: /api/user-device/{deviceId}
HTTP Request Method: DELETE
Parameters: deviceId: long
Returns: none
Purpose: Deletes a device from a user, requested by the user.
URL: /api/admin/active-sessions
HTTP Request Method: GET
Parameters:
- loginId: string
- realm: string
- size: integer (optional)
- page: integer (optional)
- sort: string,(asc/desc) (optional)
Returns: JSON content array of UserSessionDtos with pageable metadata
{
"content": [{
sessionId: long,
startDate: date,
endDate: date,
operatingSystem: string,
deviceType: string,
countryCode: string,
latitude: decimal,
longitude: decimal,
browser: string,
ipAddress: string
},
...
],
"pageable": "INSTANCE",
...
}Purpose: Fetches the list of all active sessions for a given user on admin request.
URL: /api/active-sessions
HTTP Request Method: GET
Parameters:
- size: integer (optional)
- page: integer (optional)
- sort: string,(asc/desc) (optional)
Returns: See /api/admin/active-sessions
Purpose: Fetches the list of all active sessions for a given user on their own request.
URL: /api/admin/failed-attempts
HTTP Request Method: GET
Parameters:
- loginId: string
- realm: string
- size: integer (optional)
- page: integer (optional)
- sort: string,(asc/desc) (optional)
Returns: JSON content array of UserSessionDtos with pageable metadata
{
"content": [{
sessionId: long,
startDate: date,
endDate: date,
operatingSystem: string,
deviceType: string,
countryCode: string,
latitude: decimal,
longitude: decimal,
browser: string,
ipAddress: string
},
...
],
"pageable": "INSTANCE",
...
}Purpose: Fetches the list of all failed attempts for a specific user on admin request.
URL: /api/failed-attempts
HTTP Request Method: GET
Parameters:
- size: integer (optional)
- page: integer (optional)
- sort: string,(asc/desc) (optional)
Returns: See /api/admin/failed-attempts
Purpose: Fetches the list of all failed attempts for a specific user on their own request.
URL: /distrustSession
HTTP Request Method: PUT
Parameters: feedbackToken: string
Returns:
Purpose: Depending on the action configured inside the feedbackToken:
- "disabled": nothing happens
- "session": distrusts the observations of this session for the given user
- "device": distrusts the observations of all sessions connected to this device for the given user
- "all": deletes all user observations for the given user
URL: /api/distrustSession
HTTP Request Method: PUT
Parameters: sessionId: long
Returns:
Purpose: Distrusts observations for the given session.
URL: /api/terminateSession
HTTP Request Method: PUT
Parameters: sessionId: long
Returns:
Purpose: Terminates the session inside nevisAdapt immediately. The session is also terminated in Nevis if you configure the nevisAuth reference in the patterns.
URL: /api/admin/terminateActiveSessions
HTTP Request Method: PUT
Parameters:
- loginId: string
- realm: string
Returns:
Purpose: Terminates all active sessions for the given user on admin request.