Skip to content

Get Stale Users

Retrieve users who need reassessment based on their last quiz activity.


Overview

This endpoint returns users whose last quiz activity was more than a specified number of months ago. Users are split into two categories:

  • usersToReassess: Users who completed a quiz but haven't taken one recently
  • incompleteUsers: Users who started but never finished a quiz

Method: GET
Endpoint:
/api/v1/namespaces/{namespaceId}/staleUsers

Requires administrator authentication with valid token.


Request

Headers

http
x-api-key: {your_api_key}  # Required
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
namespaceIdstringThe unique identifier for the namespace

Query Parameters

ParameterTypeRequiredDescription
monthsnumberNumber of months threshold for stale users (default: 12)
detailedbooleanIf true, returns detailed objects instead of just UUIDs (default: false)

Response

Simple Response (detailed=false)

json
{
  "usersToReassess": ["user-uuid-1", "user-uuid-2"],
  "incompleteUsers": ["user-uuid-3"],
  "usersToReassessCount": 2,
  "incompleteUsersCount": 1
}

Detailed Response (detailed=true)

json
{
  "usersToReassess": [
    {
      "userUUID": "user-uuid-1",
      "quizId": "quiz-1",
      "lastActivityDate": "2024-01-15T10:30:00.000Z"
    }
  ],
  "incompleteUsers": [
    {
      "userUUID": "user-uuid-3",
      "quizId": "quiz-2",
      "lastActivityDate": "2024-02-20T14:45:00.000Z"
    }
  ],
  "usersToReassessCount": 1,
  "incompleteUsersCount": 1
}

Response Fields

FieldTypeDescription
usersToReassessarrayUsers who completed a quiz but need reassessment
incompleteUsersarrayUsers who started but never finished a quiz
usersToReassessCountnumberCount of users needing reassessment
incompleteUsersCountnumberCount of users with incomplete quizzes

When detailed=true, each user object contains:

FieldTypeDescription
userUUIDstringThe unique identifier for the user
quizIdstringThe ID of the user's most recent quiz
lastActivityDatestringISO timestamp of the user's last activity

Notes

  • The default threshold is 12 months if months is not specified.
  • Use detailed=true when you need to know which quiz each user last interacted with and when.
  • A 400 error is returned if months is not a positive integer.