Manage Active Sessions
    • PDF

    Manage Active Sessions

    • PDF

    Article summary

    Note:
    Only administrators can execute these APIs.

    These APIs help administrators view all active sessions and check in/check out a profile specified by a user ID.

    1. View a Count of Checked Out Profiles

    This GET method provides a list of active sessions of all users.

    GET{{url}}/api/paps/sessions

    Request Parameters

    ParameterDescriptionData TypeRequired
    filter

    Filter list of checked-out profiles with the following: username, firstName, lastName, email.

    E.g. username eq "jsmith"

    StringOptional

    Request Example

    curl -X GET  '{{url}}/api/paps/sessions' -H 'Authorization: Bearer <token>'

    Response Example

    Status: 200 OK
    {
        "count": 1,
        "page": 0,
        "size": 20,
        "sort": "UNSORTED",
        "filter": "email co mehta",
        "data": [
            {
                "userId": "6ueebb4ea75j0erf56l9",
                "email": "john.smith@britive.com",
                "username": "jsmith",
                "name": "John Smith",
                "countOfProfiles": 1,
                "lastLogin": "2024-08-02 10:20:12",
                "userType" : "User"
            }
        ]
    }

    2. View the checked-out profile for a user

    This GET method lists all the profiles checked-out by a user.

    GET{{url}}/api/aps/sessions/{userId}

    Request Parameters

    ParameterDescriptionData TypeRequired
    userId

    Specifies the ID of the user.

    StringMandatory

    Request Example

    curl -X GET  '{{url}}/api/paps/sessions/{userId}' -H 'Authorization: Bearer <token>'

    Response Example


    Status: 200 OK
    {
        "count": 1,
        "page": 0,
        "size": 20,
        "sort": "UNSORTED",
        "filter": "email co mehta",
        "data": [
            {
                "userId": "6ueebb4ea75j0erf56l9",
                "email": "john.smith@britive.com",
                "username": "jsmith",
                "name": "John Smith",
                "countOfProfiles": 1,
                "lastLogin": "2024-08-02 10:20:12",
                "userType" : "User"
            }
        ]
    }

    3. Check-in profile for a user

    This DELETE method checks in a profile for a specified user.

    DELETE{{url}}/api/paps/sessions/{txId}

    Request Parameters

    ParameterDescriptionData TypeRequired
    txId

    Transaction ID of the checked out profile.

    stringMandatory

    Request Example

    curl -X DELETE  '{{url}}/api/paps/sessions/{txId}' -H 'Authorization: Bearer <token>'

    Response Example

    Status: 204 No Content

    4. Check In all sessions for a user

    This DELETE method checks in all sessions for a user.

    DELETE{{url}}/api/paps/sessions/user/{userId}

    Request Parameters

    ParameterDescriptionData TypeRequired
    userId

    ID of a user

    stringMandatory

    Request Example

    curl -X DELETE  '{{url}}/api/paps/sessions/{userId}' -H 'Authorization: Bearer <token>'

    Response Example

    Status: 204 No Content

    Was this article helpful?