Productive icon

Productive

Interact with the Productive API

Actions508

Surveys → Get surveys

AI-generated

Summary

Retrieve a list of surveys from the Productive API, optionally filtered, sorted, and paginated according to the specified parameters.

Inputs

  • Return All — Whether to return all survey results or only up to a given limit.
  • Limit — The maximum number of survey results to return if not returning all (default 50, minimum 1).
  • Page Number — The page number of survey results to retrieve (default 1, minimum 1).
  • Page Size — The number of survey results per page (default 30, minimum 1, maximum 200).
  • Filter Query String — A literal filter query string for advanced filtering; overrides other filter options if specified.
  • Filters — One or more filters to apply on survey fields, each specifying a field (e.g., Created At, Creator ID, ID, Project ID, Title), a filter operation (e.g., equals, contains), and a value; ignored if Filter Query String is provided.
  • Sort By — Field to sort the results by (ID, Title, or None).
  • Sort Order — Sort order direction: ascending or descending (default ascending).

Output shape

An array of survey objects matching the specified filters and pagination parameters.

If 'Return All' is true, all surveys matching filters are returned without pagination. Otherwise, results are limited per the 'Limit' or paginated by 'Page Number' and 'Page Size'. Filters are applied either via the 'Filter Query String' or the collection of individual 'Filters'. Sorting is applied based on chosen field and order.

Examples

Example 1: Fetch up to 50 surveys with titles containing 'Feedback', sorted by ID descending.

Set Return All to false, Limit to 50, add a filter with Filter Field 'Title', Operation 'Contains', Value 'Feedback', Sort By 'ID', Sort Order 'Descending'.

Discussion