> For the complete documentation index, see [llms.txt](https://docs.stellic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stellic.com/stellic-partner-api/exports/exports-login-and-user-session-data.md).

# Exports login and user session data

Use this endpoint to report on how often people sign in to Stellic, for example for a usage dashboard. Each row counts sessions for one user type (`student`, `staff`, `faculty`, `stellic`, `prospective_student`, `guest`, or `Unknown`), with `Unique Users`, `Total Logins`, and `Avg Session Duration (mins)`. Add `breakdown` (`daily`, `weekly`, or `monthly`) to split the counts by period, and `usernames` or `group_names` to count specific people, which adds a `Username` column. The file always comes back in the response.

## GET /exports/login\_frequency

>

```json
{"openapi":"3.0.0","info":{"title":"Stellic for Developers","version":"1.0"},"tags":[{"name":"Exports","description":"Institution-wide datasets as CSV or JSON. Small datasets come back inline; large ones run in the background and return a `file_name` you poll with `GET /get_export_url/` for a download link."}],"servers":[{"url":"https://{institution}.stellic.com/partnerapi/v1","variables":{"institution":{"default":"{institution}","description":"Your institution's Stellic subdomain: the part before `.stellic.com` in the URL you use to sign in. It becomes the host in every request, as in `https://{institution}.stellic.com/partnerapi/v1/...`. Replace the `{institution}` placeholder with your subdomain before sending."}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Personal Access Token issued by your Stellic integration partner. Send it as `Authorization: Bearer <token>` on every request. One token per institution; do not share across environments."}}},"paths":{"/exports/login_frequency":{"get":{"tags":["Exports"],"parameters":[{"name":"breakdown","in":"query","required":false,"description":"Time-based grouping. Omit for all-time aggregate.","schema":{"type":"string","enum":["daily","weekly","monthly"]}},{"name":"start_date","in":"query","required":false,"description":"Filter sessions from this date onwards. Interpreted in the specified timezone. Format: YYYY-MM-DD","schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","required":false,"description":"Filter sessions up to and including end of this date (23:59:59). Interpreted in the specified timezone. Format: YYYY-MM-DD","schema":{"type":"string","format":"date"}},{"name":"user_type","in":"query","required":false,"description":"Keep only sessions of this user type: `student`, `staff`, `faculty`, `stellic`, `prospective_student`, or `guest`. The value is not validated, so an unrecognized one returns no rows rather than an error.","schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"description":"Timezone for the start_date/end_date boundaries and the displayed Date label. Any IANA time zone name (e.g., 'US/Eastern', 'America/Chicago'). Note: breakdown buckets are always aligned to UTC calendar boundaries regardless of this value; only the date filters and the Date label shift. Default: UTC","schema":{"type":"string"}},{"name":"output_format","in":"query","required":false,"description":"Response format. Default: csv. If you omit it and send the header `Accept: application/json` (exactly that value), the export is produced as `json`; an explicit `output_format` always wins.","schema":{"type":"string","enum":["csv","json"]}},{"name":"delivery_channel","in":"query","required":false,"description":"`http_file` returns the file in the response, `http_response` returns the same content without the attachment header, and `s3` runs the export in the background (poll `GET /get_export_url/` with the returned `data.file_name`). Omit it and the file always comes back in the response.","schema":{"type":"string","enum":["http_file","http_response","s3"]}},{"name":"usernames","in":"query","required":false,"description":"Comma-separated list of usernames to filter by. Adds a Username column to the response. Send one comma-separated value; if you repeat the parameter, only the last value is used.","schema":{"type":"string"}},{"name":"group_names","in":"query","required":false,"description":"Comma-separated list of group names (the names shown in the admin, not IDs) to filter by. Adds a Username column to the response. Send one comma-separated value; if you repeat the parameter, only the last value is used.","schema":{"type":"string"}}],"responses":{"200":{"description":"The rows, in the response as CSV or, with `output_format=json`, as a JSON array of row objects keyed by column name. With `delivery_channel=s3` the export runs in the background and the response is the job object with `data.file_name` to poll on `GET /get_export_url/`.","content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"type":"object","properties":{"User Type":{"type":"string","description":"student, staff, faculty, stellic, prospective_student, guest, or Unknown for sessions whose user has no type or was deleted."},"Unique Users":{"type":"integer"},"Total Logins":{"type":"integer"},"Avg Session Duration (mins)":{"type":"string"},"Date":{"type":"string","format":"date","description":"Only present when breakdown parameter is specified"},"Username":{"type":"string","description":"Only present when usernames or group_names parameters are specified"}}}},{"type":"object"}]}},"text/csv":{"schema":{"type":"string","format":"csv","description":"CSV whose column set depends on the `breakdown`, `usernames`, and `group_names` query params. Possible columns:\n- `Date` - start of the aggregation bucket, shown in the requested `timezone` (YYYY-MM-DD). Present only when `breakdown` is `daily`, `weekly`, or `monthly`. Buckets are aligned to UTC calendar boundaries; the `timezone` value only shifts this displayed label, not the bucket edges. Weekly buckets start on Monday.\n- `Username` - the individual user's username. Present only when `usernames` or `group_names` is set.\n- `User Type` - `student`, `staff`, `faculty`, `stellic`, `prospective_student`, `guest`, or `Unknown` for sessions whose user has no type or was deleted.\n- `Unique Users` - count of distinct users with at least one session in the bucket.\n- `Total Logins` - total number of sessions (logins) in the bucket.\n- `Avg Session Duration (mins)` - average session duration in minutes across the bucket.\n\nRows with zero logins are omitted (no empty rows).\n"}}}},"400":{"description":"Bad Request. Parameter errors arrive wrapped in brackets and quotes, as in the examples. An unsupported `output_format` or `delivery_channel` returns `{\"errors\": [\"Output format provided is currently not supported\"]}` or `{\"errors\": [\"Delivery channel provided is currently not supported\"]}`.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}},"401":{"description":"Unauthorized - Invalid or missing API token","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"403":{"description":"Your IP address isn't on the allowlist for this endpoint. Contact Stellic to add it; the response includes the `client_ip` Stellic saw.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"client_ip":{"type":"string"}}}}}}}}}}}
```

#### Notes

* **A login is a web session.** Duration runs from the session's start to its last activity. `Unknown` covers sessions whose user has no type or was deleted.
* **Breakdown periods follow UTC, even with a `timezone`.** `start_date` and `end_date` are whole days in your `timezone`, but each day, week (starting Monday), or month starts at midnight UTC; `Date` shows that start in your timezone. Periods with no logins are left out.
* **Send `usernames` and `group_names` as comma-separated lists.** A repeated parameter keeps only the last value. `group_names` takes group names, not IDs. A person in two of the listed groups is counted twice.
* **An unknown `user_type` returns no rows**, not an error.

#### Related APIs

* [`GET /exports/engagement_score`](/stellic-partner-api/exports/export-student-engagement-scores.md) for per-student engagement.
* [`GET /exports/{property}`](/stellic-partner-api/exports/bulk-export-dispatcher.md) for formats, delivery, and errors.
