Skip to content

Get inactivity report

GET
/api/v1/activity/reports/inactivity
curl --request GET \
--url 'http://localhost:3000/api/v1/activity/reports/inactivity?thresholdDays=30' \
--header 'X-API-Key: <X-API-Key>'

Generates a report of inactive tenants. Requires Super Admin privileges.

thresholdDays
number
Example
30

Number of days to consider a tenant inactive

Inactivity report generated successfully

Media type application/json
object
thresholdDays
required

Inactivity threshold in days

number
generatedAt
required

Report generated at

string format: date-time
inactiveTenants
required

Inactive tenants

Array<object>
object
organizationId
required

Organization ID

string
organizationName
required

Organization name

string
totalActivities
required

Total activities in period

number
activeUsers
required

Active users (users with activity)

number
totalUsers
required

Total users in organization

number
lastActivityAt

Last activity timestamp

string format: date-time
activityBreakdown
required

Activity breakdown by type

object
loginCount
required

Login count in period

number
failedLoginCount
required

Failed login count in period

number
daysSinceLastActivity
required

Days since last activity

number
isInactive
required

Is inactive (no activity in threshold days)

boolean
totalInactiveTenants
required

Total inactive tenants

number
totalTenants
required

Total tenants checked

number
Example generated
{
"thresholdDays": 1,
"generatedAt": "2026-04-15T12:00:00Z",
"inactiveTenants": [
{
"organizationId": "example",
"organizationName": "example",
"totalActivities": 1,
"activeUsers": 1,
"totalUsers": 1,
"lastActivityAt": "2026-04-15T12:00:00Z",
"activityBreakdown": {},
"loginCount": 1,
"failedLoginCount": 1,
"daysSinceLastActivity": 1,
"isInactive": true
}
],
"totalInactiveTenants": 1,
"totalTenants": 1
}

Unauthorized

Forbidden - Super Admin required