Pagination

The ability to paginate and filter can be useful for limiting large bodies of data.

When trying out the API, you may only want to sample a small set of data by using the following query string parameters. API data sets can often return hundreds to thousands of records.

Option Description
Limit OR pageSize

Use one of these query string parameters to determine the number of objects that return. Specify an integer > 0.

Examples - Query parameters used to limit up to 50 objects to return
  • GET https://{{base_url}}/firm?limit=50 OR
  • GET https://{{base_url}}/firm?pageSize=50
However, if the database has 1200 records, then 50 records would return. If the database only has 38 records, for example, then even though the threshold is set at 50, only the 38 records would return.
Offset OR page
Use one of these query string parameters to determine the one unit based offset.
  1. When using page, specify an integer > 0 that refers to the results from the page to retrieve. Example: GET https://{{base_url}}/employee?page=1&pageSize=10 returns ten results from page one
  2. When using offset, specify an integer representing the starting record count which is zero-based. When paging, the offset is the limit x page.
Examples
  • GET https://{{base_url}}/employee?offset=0&pageSize=10 returns documents one through the pageSize specified
  • GET https://{{base_url}}/employee?offset=5&pageSize=50 returns documents six through the pageSize specified + offset return
fieldFilter

Use this query string parameter to limit the data by the types of fields supported by the resource.

  1. The set of fields returns from GET https://{{base_url}}/resourceName without the fieldFilter and correlates with the resource metadata.
  2. This query string also works on PUT and POST requests.
  3. Select columns can be returned in the response.

Example: GET https://{{base_url}}/employee?page=1&pageSize=10&fieldFilter=Employee,LastName returns the first ten records with only the employee's unique ID and the last name

Order This query string parameter sorts the results that return. Column names are found by retrieving configuration or hub metadata.
  • By default, the objects are sorted in ascending order.
  • To sort in a descending order, append "_D" to the column name.

Example: GET https://{{base_url}}/firm?order=columnName_D

The domain in the examples is represented by a variable, such as {{base_url}} in the preceding request. The variable typically resolves to a path such as company.deltek.com/company/api where the first instance of the company name is for the subdomain and the second instance of the company name indicates how to access the application in the case that the company uses other Deltek applications.