Overview
Pretectum stores your master data as “data objects” organized within a hierarchical structure:- Business Areas: High-level organizational categories (e.g., Customer, Product, Supplier)
- Schemas: Define the structure and fields for data objects within a business area
- Datasets: Collections of data objects that share the same schema
Before You Begin
To use the Search API, you need:1
Create an API Key
In the Pretectum app, go to Configuration → API Keys and create a key. It is shown once, at
creation, so copy it then. Ask your tenant administrator if you do not have access to that screen.
2
Understand Your Data
Familiarize yourself with the business areas, schemas, and datasets in your tenant. This knowledge helps you construct effective search queries.
3
Set Up Your Environment
Ensure you have a way to make HTTP requests from your application. This guide includes examples using cURL, JavaScript, and Python.
Step 1: Create an API Key
Create a key in the Pretectum app under Configuration → API Keys. A key looks like this:Step 2: Search for Data Objects
With your key, you can now search for data objects. Include it in theAuthorization header.
Basic Search
Search for data objects containing a specific term:Search with Filters
Narrow your search by specifying business area, schema, or dataset.Advanced Query Syntax
The search query supports two types of searches: full-text search across all fields, and field-specific search for filtering by attribute values.Full-Text Search
Full-Text Search
Search for terms across all indexed fields:
Boolean Operators
Boolean Operators
Combine terms with AND, OR, NOT operators:
Field-Specific Search (Attribute Filtering)
Field-Specific Search (Attribute Filtering)
Filter by specific attribute values using
field:value syntax:Range Queries
Range Queries
Filter by numeric or date ranges:
Comparison Operators (eq, ne, gt, lt)
Comparison Operators (eq, ne, gt, lt)
Use comparison operators with bracket notation for field names with spaces:
Complex Query Examples
Complex Query Examples
Combine multiple search patterns:
Step 3: Handle the Response
The search response includes matching data objects and a total count:Understanding the Response
Additional fields in each hit depend on the schema configuration for that data object.
Step 4: Implement Pagination
For large result sets, retrieve data in pages:Complete Example
Here is a complete example that authenticates and searches for data objects:Error Handling
Handle common error scenarios in your application:Next Steps
API Reference
View the complete Search API reference
API Keys
Learn more about authentication
Business Areas
Learn how to work with business areas
List Business Areas API
Get available business area names for filtering
Schemas
Learn how to work with schemas
List Schemas API
Get available schema names for filtering
Datasets
Learn how to work with datasets
List Datasets API
Get available dataset names for filtering
