Skip to main content

Getting Started with Query Builder

This section covers the basics of accessing the Query Builder, understanding its interface, and creating your first query.

Accessing the Query Builder

  1. Log in to your OSPROV account
  2. Navigate to Query Builder in the main menu
  3. You will see a list of existing queries with their status
  4. Click Create New Query to start building a new query, or select an existing query to edit

Query Builder Interface

The Query Builder interface consists of several key areas:

  1. Workflow Selector: Dropdown at the top to select the workflow containing the data you want to query
  2. Field Selection Panel: Shows all available form fields from the selected workflow
  3. Filter Builder: Area to add and configure data filters
  4. Aggregation Builder: Section for adding calculations and aggregations
  5. Query Preview: Shows a sample of your query results before saving
  6. API Configuration: Displays the generated API endpoint and settings

Creating Your First Query

This guide walks you through the process of creating a new query in the OSPROV Query Builder.

Steps to Create a New Query

  1. Click Create New Query from the Query Builder main page
  2. Select a Workflow from the dropdown menu
    • Only workflows with Published status and submission data will appear
  3. Choose the Data Fields you want to include:
    • Check the boxes next to desired fields
    • Field types (text, number, date) are displayed for reference
  4. Add Filters to narrow your results (optional):
    • Click Add Filter
    • Select the field, operation, and value
  5. Add Aggregations for calculations (optional):
    • Click Add Aggregation
    • Select the field and operation type
  6. Click Preview Results to test your query
  7. Enter a Query Name and Description
  8. Click Save Query to create your query and generate the API endpoint

Once you've created your query, you can access the generated API endpoint to retrieve data programmatically. See the Using Query APIs section for details on authentication and usage.