Retrieving Users Updated Since Specific Date
Last Updated:
Overview
This article explains how to retrieve user data for users whose profiles have been updated since a specific date.
Applies To
- User Data Export
- Management API
Solution
There is no automated way to export only users whose profiles have been updated since the last export. Manual methods exist to obtain this information, depending on the size of the user base.
Method 1: Management API Search (Best for Fewer Than 1,000 Users)
Query the List or Search Users endpoint directly using Lucene syntax on the updated_at field if fewer than 1,000 users changed.
-
Endpoint:
GET /api/v2/users -
Query Parameter (
q):updated_at:[YYYY-MM-DD TO *]
Example Request: To find users updated since January 1st, 2024:
GET https://[YOUR_DOMAIN]/api/v2/users?q=updated_at:[2024-01-01 TO *]&search_engine=v3
Key Restrictions:
-
1,000 User Limit: This endpoint will not return more than 1,000 results, even if you paginate through them. If you have 1,001 users who match, the API will stop at 1,000.
-
Format: Ensure the date format is
YYYY-MM-DDorYYYY-MM-DDTHH:mm:ss.
Method 2: Bulk Export (Best for More Than 1,000 Users)
Perform a Bulk User Export if the user base is large and many profiles have changed, as the search endpoint fails due to the limit.
-
Create an Export Job using the Management API (
POST /api/v2/jobs/users-exports) to export the entire user database to a JavaScript Object Notation (JSON) or Comma-Separated Values (CSV) file. NOTE: The export job generally does not support aqfilter parameter; it exports the full connection. -
Download the file once the job completes.
-
Use a script (Python, Node.js) or a tool like
jqto filter the JSON for records whereupdated_atis greater than<YOUR_DATE>.