Get Data from Dataset (v1)

Deprecated. Use "Get Data from Dataset (v2)" instead.

Retrieves records from the specified dataset using the fields, filters, sorting, grouping, and aggregations supplied in the request body. Provide field names in the fields array; use "Get Fields from Dataset (v1.2)" to discover available names. The response contains paginated rows under data, an aggregations array (empty when none requested), and a pagination block with page navigation links. Results default to page 1 with 500 records per page (maximum 1000).

Use "Get Field Options (v1.2)" to retrieve valid filter values. Filter fields do not need to appear in the fields list. status is the employee's stored status with no hire-date check, so a future hire can be Active or Inactive; to find future hires, filter hireDate with gt and today (an lte filter leaves them out but also drops employees with no hire date). For options-type fields using includes/does_not_include, pass the filter value as an array enclosed in square brackets, for example ["Full-Time", "Part-Time"].

When any requested fields are historical table fields, pass their entity names in showHistory; entity names are returned by "Get Fields from Dataset (v1.2)". Grouping (groupBy) accepts several fields, and a date field can be grouped by week, month, quarter or year; when active, data becomes an object keyed by group value instead of an array. Sort priority follows the order of objects in sortBy. Aggregations accept a defaultAggregation applied to every field and/or per-field overridingAggregations. limit keeps the first N rows or groups after sorting, and having keeps only the groups whose aggregated value passes a numeric comparison.

Aggregations by field type: text: count, count_unique, percent_non_empty, mode, list, percent_of_total; date: count, count_unique, min, max, percent_non_empty, median, mode, range, percentile, quartiles, list, percent_of_total; int: count, count_unique, min, max, sum, avg, percent_non_empty, percent_of_sum, median, mode, range, stddev, variance, percentile, quartiles, iqr, percent_of_total; bool: count, count_unique, percent_non_empty, percent_of_total; options: count, count_unique, percent_non_empty, mode, list, percent_of_total; govIdText: count, count_unique, percent_non_empty. A defaultAggregation skips fields whose type does not support it; an overridingAggregations entry the field's type does not support returns a 400.

Filter operators by field type: text: contains, does_not_contain, equal, not_equal, empty, not_empty; date: lt, lte, gt, gte (each accepts a YYYY-MM-DD date string, "today" (the server's current date), or a relative object {"duration": "N", "unit": "days|weeks|months|years"} where duration is a number as a string — lt/lte are measured backward from today, gt/gte forward), equal, not_equal (a YYYY-MM-DD date string or "today"), empty, not_empty, last, next (relative object {"duration": "N", "unit": "days|weeks|months|years"}), range (object {"start": "YYYY-MM-DD", "end": "YYYY-MM-DD"}), month_to_date, quarter_to_date, year_to_date, last_month, last_quarter, last_year (no value); int: equal, not_equal, gte, gt, lte, lt, empty, not_empty, is_between (object {"start": 50000, "end": 80000}, inclusive; int, float and currency formats only); bool: checked, not_checked; options: includes, does_not_include, empty, not_empty; govIdText: empty, not_empty.

OAuth Scopes: report

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The machine-readable name of the dataset to query. Use "List Datasets (v1.2)" to discover available names.

Query Params
integer
≥ 1
Defaults to 1

The page number to retrieve. Defaults to 1.

integer
1 to 1000
Defaults to 500

The number of records to retrieve per page. Defaults to 500. Maximum is 1000.

Body Params
fields
array of strings
required

Field names to include in each returned record. Use "Get Fields from Dataset" to discover available names.

fields*
aggregations
object

Aggregation configuration. Set defaultAggregation to apply one aggregation type to every requested field, or use overridingAggregations to target specific fields. Both may be combined.

Empty values ("" and null, and 0000-00-00 on date fields) are left out of the calculation: avg leaves them out of both the sum and the count rather than treating them as 0, count_unique does not count them as a distinct value, and min and max skip them. An aggregation left with no usable value returns null; count_unique returns 0.

sortBy
array of objects

Ordered list of sort rules. Priority follows array order. Include aggregationType when sorting by an aggregated value in a grouped request; it must match an aggregation requested for the same field. Sorting by a list or quartiles aggregation returns a 400.

sortBy
filters
object

Filter configuration. Combine multiple conditions with a match strategy.

groupBy
array

Fields to group results by, in level order. Each grouped field must also be in fields; otherwise the request returns an error. The group key joins each level's value with |, in array order (for example "Engineering|2020-03"); a value the user cannot see, or an empty value, is an empty string in the key. When grouping is active, the data key in the response becomes an object keyed by group value instead of an array.

An entry is a field name, or an object {"field": "hireDate", "bucket": {"type": "date", "interval": "month"}} that groups a date field by interval: week (keys YYYY-Www, ISO-8601 weeks starting on Monday, so the key's year is the ISO week-year), month (YYYY-MM), quarter (YYYY-Qn, Q1 is January to March) or year (YYYY). Rows with no date in the bucketed field are left out of data and the aggregations. A date bucket on a field that is not a date, or another interval, returns a 400.

Add "fillEmpty": true to one date bucket to also return the buckets with no rows as empty groups, for every combination of the other levels' values that appears in the results. The buckets run from the earlier of the date filter's first day on that field and the first bucket in the results, to the later of the filter's last day and the last bucket in the results (filters combined with match: any do not bound the range). Empty buckets report 0 for count and count_unique, 0.0 for sum and percent_of_total, an empty string for list and null for other aggregations. Only one entry may set fillEmpty, its field can't also be another level, a fill may span at most 1200 buckets and add at most 10000 empty groups; otherwise the request returns a 400.

groupBy
integer
≥ 1

Optional. Keep only the first N results after sorting: rows, or groups when groupBy is used. page and page_size then page within them. Aggregation all values still cover every result. Must be a positive integer; any other value returns a 400.

having
array of objects

Optional rules that keep only the groups whose aggregated value passes a numeric comparison. Requires groupBy. Each rule's field and aggregationType must match exactly one aggregation requested in aggregations, and the aggregation must produce numbers (min, max, median, mode or percentile of a date field, mode of a text or options field, and quartiles do not). A group is kept only if it passes every rule. Each aggregation's all value still covers every row. A request that breaks these rules returns a 400.

having
showHistory
array of strings

Entity names of historical table fields whose history rows should be included. Entity names are returned by "Get Fields from Dataset".

showHistory
Responses

400

Invalid or missing argument(s), such as an unrecognised operator, malformed filter, invalid dataset name, or empty request body.

403

Insufficient permissions to access this dataset.

500

An unexpected internal error occurred while retrieving data.

Language
Credentials
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json