Overview
Data objects represent individual records in your master data system. They:- Belong to a specific dataset within a schema and business area
- Have dynamic fields defined by the schema structure
- Support validation based on schema rules
- Include version tracking for conflict resolution
- Maintain an audit trail of all changes
Before You Begin
To manage data objects, 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. See API Keys.
2
Identify Your Target Dataset
Know the business area, schema, and dataset where you want to manage data. Use the List Business Areas, List Schemas, and List Datasets endpoints to discover available options.
3
Understand the Schema
Familiarize yourself with the schema field definitions to ensure your data conforms to the expected structure. Use Get Schema Details to view field definitions.
Authentication
All data object operations require an API key. Send it in theAuthorization header of every
request; there is no token to obtain first.
Creating Data Objects
To create a new record, send a POST request with the field values:Handling Validation Errors
Data objects are created even if they have validation errors. This allows you to import data and fix issues later:Listing Data Objects
Retrieve all records in a dataset with pagination support:Updating Data Objects
Update existing records using the PUT method. You must include the_version field to prevent overwriting concurrent changes:
Handling Version Conflicts
When multiple users or processes update the same record, version conflicts can occur. Implement retry logic:Deleting Data Objects
Remove records from a dataset using the DELETE method:Complete Client Example
Here’s a complete client class that handles all CRUD operations:Best Practices
Error Handling
Error Handling
- Always check response status codes
- Treat a 401 as a rejected key, not something a retry will fix
- Implement retry logic for transient failures
- Log errors with context for debugging
Performance
Performance
- Use pagination for large datasets instead of loading everything at once
- Cache schema information to reduce API calls
- Run independent operations in parallel where possible
- Implement connection pooling for high-volume applications
Data Integrity
Data Integrity
- Always include
_versionwhen updating to prevent conflicts - Validate data on the client side before sending
- Handle validation errors returned by the API
- Implement idempotency for create operations in distributed systems
Security
Security
- Store credentials securely (environment variables, secrets manager)
- Never log API keys
- Refresh tokens before they expire
- Use HTTPS for all API calls
Next Steps
Search Data Objects
Learn advanced search techniques
Working with Schemas
Understand schema definitions
API Reference
View complete API documentation
Working with Datasets
Learn about dataset management
