Quick Start
Upload images
Upload new images to Wesog Search
Update images
Update existing image metadata
Delete images
Delete images from Wesog Search
Operations Overview
All operations support both single image and batch processing for efficient management of large image collections.| Operation | Endpoint | Required Fields | Optional Fields | Purpose |
|---|---|---|---|---|
| Upload new images | POST /imgs | id, src | Image metadata fields | Add images to the system |
| Update existing images | PUT /imgs | id | Image metadata fields | Modify existing metadata |
| Delete existing images | DELETE /imgs | id | None | Remove images from system |
Each image must have a unique identifier (
id). The src field should contain the publicly accessible URL of the image.Key Concepts
Understanding these concepts will help you choose the right configuration for your use case:Execution Modes
Synchronous (Default)
Best for: Small operations (< 10 uploads, < 50 updates, < 100 deletes)Behavior: Waits for completion before sending response
Asynchronous
Best for: Large batch operationsBehavior: Returns immediately with operation ID for tracking
Processing Modes
| Mode | Behavior | When to Use |
|---|---|---|
| Strict (default) | Fails if ID conflicts occur | Production environments, data integrity critical |
| Relaxed (not implemented) | Handles conflicts flexibly | Bulk imports, development |
Error Handling
| Strategy | Description | Best For |
|---|---|---|
| All or Nothing (default) | Entire operation fails if any image fails | Critical operations requiring consistency |
| Subset (not implemented) | Processes valid images, reports failures | Large-scale imports, fault tolerance needed |
Operation Monitoring
For asynchronous operations, you can track progress using the operations endpoints:| Endpoint | Purpose | Response |
|---|---|---|
GET /ops | List all operations | Array of operation objects |
GET /ops/{operation_id} | Get specific operation status | Single operation object with detailed status |
Operation Status Indicators
| Status | Description |
|---|---|
finished=false, success=null | Processing - Operation is still running |
finished=true, success=true | Completed - All items processed successfully |
finished=true, success=false | Failed - Operation aborted, check error details |
Advanced Configuration
Strict Mode Behavior
| Operation | Strict Mode Behavior | Impact |
|---|---|---|
| Upload | Error if id already exists | Prevents accidental overwrites |
| Update | Error if id doesn’t exist | Ensures you’re modifying existing data |
| Delete | Ignores missing id | Safe deletion of potentially removed items |
Best Practices
For Development
- Use synchronous mode for testing
- Start with small batches
- Validate data structure first
For Production
- Use asynchronous for large operations
- Monitor operation status
- Implement retry logic for failures