Insight Queries (IQ 1.0)
Download OpenAPI specification:Download
This page contains the essential endpoints of the InfoSum API that help users securely analysize data via insight queries, allowing the user to plan and provide insights based on data. You can download the swagger file above or email solutions@infosum.com to share a Postman Collection.
InfoSum Support | Terms of Service | Official Documentation
Insight Queries
Insight Queries allow you to analyze connected data across multiple Bunkers in the InfoSum Platform while preserving privacy. Using InfoSum’s Insight Query Language (IQL), a syntax loosely based on SQL, you can securely intersect, filter, and enrich datasets you own as well as those you have permission to query inside collaborations. Unlike activation queries, which return individual identifiers, insight queries always generate anonymized aggregated statistical results. This means you can explore overlaps, audience definitions, and category breakdowns without moving or exposing raw data.
With insight queries you can:
Reference one or more Bunkers, which are automatically joined where common keys exist.
Apply filters to focus on specific audiences or subsets of data.
Enrich analyses by incorporating categories from additional Bunkers.
Use functions such as counts, aggregations, or top-N lookups to build detailed reports.
Task List
Create a insight query
Optional: Check if query ran successfully
Get results of query
Parameter Reference Table
Step Number Parameter Name Parameter Structure Where to find it When to collect 1 Query "SELECT self.ID FROM self INTERSECT them" Write it in Query Tool Have ready before hand. 2, 3 Query ID xx Response from step 1 Can be grabbed from output of step 1
Example Insight Queries
Refer to the InfoSum Query Type Documentation for full details.
Basic Query Examples:
- COUNT
SELECT COUNT() FROM bunker
- Returns the total number of rows in the specified bunker.
- AGGREGATE
SELECT AGGREGATE(column) FROM bunker
- Counts the number of values in a specific category.
SELECT AGGREGATE(bunkerA.column1, bunkerB.column2) FROM bunkerA INTERSECT bunkerB
- Returns counts of values broken down by two categories from different bunkers.
- TOPN
SELECT TOPN(column, n) FROM bunker
- Retrieves the top
n
most frequently occurring values in a high-cardinality column, such as job titles or ZIP codes.
- Retrieves the top
Advanced Functions:
- SUM
SELECT SUM(field), AVG(field) FROM bunker
- Computes total and average of a numeric field.
- ⚠️ This feature is currently in Beta and may not be available to all users.
- Learn more in the SUM and AVG Function Guide.
- Filtering with
WHERE
statements- Example:
SELECT AGGREGATE(column) FROM bunker WHERE age > 25
- Learn more in the Filtering Guide.
- Example:
- Datetime filtering
- Example:
SELECT COUNT() FROM bunker WHERE transaction_date >= '2024-01-01' AND transaction_date <= '2024-06-30'
- Enables filtering by date or datetime columns using standard comparison operators.
- Learn more in the Datetime Filter Guide.
- Example:
1. Create an Insight Query
Queue an Insight Query for execution. Returns immediately with an ID of the Query created.
Authorizations:
header Parameters
Content-Type | string Example: application/json |
Accept | string Example: application/json |
Request Body schema: application/json
query required | string The IQL query to execute |
collaboration_id | string Optional collaboration ID to run the query within |
Responses
Request samples
- Payload
{- "query": "SELECT COUNT() FROM dataset",
- "collaboration_id": "string"
}
Response samples
- 200
- 400
- 401
- 500
{- "query_id": "string",
- "done": true
}
2. Check Query Status
Check if an insight query has completed processing.
Authorizations:
path Parameters
query_id required | string The ID of the query to check |
header Parameters
Accept | string Example: application/json |
Responses
Response samples
- 200
- 401
- 404
- 500
{- "done": true,
- "status": "pending",
- "error": "string"
}
3. Get Query Results
Get the results of a completed insight query.
Authorizations:
path Parameters
query_id required | string The ID of the query to get results for |
header Parameters
Accept | string Example: application/json |
Responses
Response samples
- 200
- 401
- 404
- 409
- 500
{- "query_id": "string",
- "status": "completed",
- "results": [
- { }
], - "metadata": {
- "total_rows": 0,
- "execution_time_ms": 0
}
}