get_users
Retrieve paginated lists of school users, filtered by role, status, tags, custom fields, or registration dates. Use for read-only reporting and lookups without modifying data.
Instructions
๐ข READ-ONLY ยท GET /v2/users
Get all users. Returns a list with all the users of the school. The users are in sorted order, with the most recently created user appearing first, and the list is paginated, with a default limit of 20 users per page. To refine the list of users, there are a number of query params outlined in the following section; In case more than one Query param is provided, then all of them will be applied (AND operator).
Behavior: read-only lookup against the live school; creates, changes and deletes nothing. Auth (admin API token + Lw-Client id) is injected server-side, never by the model; calls are throttled to stay under LearnWorlds' 30-per-10s cap and retried on 429/5xx.
Parameters: results are paged โ walk them with page and size each page with items_per_page; cf__field_name reaches LearnWorlds under the original spec name.
Returns: HTTP <status> followed by the LearnWorlds JSON response body. A non-2xx reply surfaces as a tool error with that status and the API error payload โ 401 bad/expired token, 403 not permitted, 404 no such record, 422 rejected input.
Use when: safe to call speculatively for lookups and reporting. Not for changing anything โ use the matching ๐ก write tool. Related Users tools: create_user, enroll_user_product, get_courses_enrollments_user, get_products_user, get_seat_offerings_that_user_is_member.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Filter by the page number. In case page number is higher than the maximum one, the results of last page will be returned | |
| role | No | Filter by user role | |
| tags | No | Filter by tags. For several tag values, a comma separated string can be provided. | |
| status | No | Filter by user status | |
| cf__field_name | No | Filter by custom field. All custom fields start with the cf_ prefix; the "$field_name" part should be replaced by the name of the corresponding custom field. Also, it is possible to use more than one custom fields as filters, using the aforementioned convention. Sent to LearnWorlds as "cf_$field_name". | |
| items_per_page | No | Filter by the items per page number | |
| include_suspended | No | Filter by include_suspended flag. The default value is false. | |
| registration_after | No | Filter by registration after the given datetime (expected in UNIX timestamp format) | |
| registration_before | No | Filter by registration before the given datetime (expected in UNIX timestamp format) |