Upload a new image
Uploads a single image file with optional quality setting. The image is processed and stored with an MD5 hash as its identifier. Content-based deduplication ensures that identical images are not stored multiple times per customer. Images are stored per customer but metadata is tracked per chain.
Important: Only one file can be uploaded per request. Requests with multiple files will be rejected with a 400 BadRequest response.
Quality Options:
Notes:
- Maximum file size: 10MB. Requests exceeding this will be rejected with a 400 BadRequest response.
- All resizing maintains aspect ratio (images are scaled to fit within max dimensions)
- WebP format provides better compression than JPEG while maintaining quality
- Original quality preserves the image without any quality loss
- Supported input formats: PNG, JPEG, WebP, GIF, BMP
Optional Associations (Two Approaches):
You can associate images with articles and viewgroups using either of these approaches:
**Approach 1: Query Parameters ** Simplest as it is not needed to store the imageId for subsequent calls
**Approach 2: Entity APIs
- For Articles: Use POST /articles/v1/chain/{chainId} with
imagesarray in the request body- Example:
"images": [{"imageId": "abc123", "isDefault": 1}] - This updates the article entity with the image reference
- Example:
- For ViewGroups: Use POST /viewGroups/v1/chain/{chainId} with
imageIdfield in the request body- Example:
"imageId": "abc123" - This updates the viewgroup entity with the image reference
- Example:
Example Request:
Response Headers:
Location- URL to track the processing status (e.g., /BaseData/v1/id/{baseDataId})
Path parameters
Query parameters
Image quality setting: original, high, medium (default), or low
Optional: Associate this image with an article by providing the articleId
Optional: Associate this image with a viewgroup by providing the viewGroupId
Request
Image file to upload (PNG, JPEG, WebP, GIF, BMP; max 10MB)