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
Get API Credentials
Contact your Pretectum tenant administrator to obtain your
client_id and client_secret.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 authentication. First, obtain an access token: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
- Handle 401 errors by refreshing the access token
- 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 access tokens
- Refresh tokens before they expire
- Use HTTPS for all API calls
