Filtering

Explore options for filtering, sorting, and paging records.

Filtering, sorting, and paging

Some endpoints (such as GET /employees) accept OData-style query options so you can ask for exactly the records and fields you need.

1. Get the basics

GET /employees?workspaceId=1005

Returns every employee in the workspace with the standard properties.

2. Filter with $filter

GET /employees?workspaceId=1005&$filter=employmentStatus eq 'Active' and departmentCode eq 'SALES'

Use eq, ne, gt, ge, lt, le, and, or, not, and string functions such as contains and startswith:

$filter=startswith(lastName,'Sm') and hireDate ge 2026-01-01

Property names are case-insensitive. An unknown property returns 400.

3. Return extra fields with $select

Optional properties such as supervisorId, supervisorNativeId, hrStatus and employmentType are only returned when you ask for them:

GET /employees?workspaceId=1005&$select=supervisorNativeId,employmentType

The standard properties are always included.

4. Sort with $orderby

GET /employees?workspaceId=1005&$orderby=lastName asc,firstName asc

Results are sorted by id when you omit it.

5. Page through results

Set pageSize. When more results exist, the response includes an X-GS-CURSOR header. Send it back as after to get the next page:

GET /employees?workspaceId=1005&pageSize=100
GET /employees?workspaceId=1005&after=<X-GS-CURSOR value>

$top and $skip are available for simple limits, but don't combine them with pageSize.

Putting it together

GET /employees?workspaceId=1005
  &$filter=employmentStatus eq 'Active'
  &$select=supervisorNativeId,employmentType
  &$orderby=lastName asc
  &pageSize=100