Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/assets/6V0rzExP7SY56UH7sSS-/image_crops 200 { "image_crops": [] }
// Asset not found GET /api/v2/assets/:asset_id/image_crops 404 { "error": "asset not found" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
name optional |
Image crop name Validations:
|
aspect required |
Image crop aspect ratio Validations:
|
x required |
Image crop X coordinate Validations:
|
y required |
Image crop Y coordinate Validations:
|
height required |
Image crop height Validations:
|
width required |
Image crop width Validations:
|
zoom optional |
Image crop zoom for preview tool Validations:
|
source_media_version optional |
Media version to use, defaults to 'original' Validations:
|
// Successful request POST /api/v2/assets/K88L3y2cMCLeqtZSTvec/image_crops { "name": "16:9", "aspect": "1.778", "x": 960, "y": 540, "width": 480, "height": 270, "zoom": "1.00", "source_media_version": "original" } 200 { "image_crop": { "id": 3, "name": "16:9", "aspect": 1.778, "x": 960, "y": 540, "width": 480, "height": 270, "zoom": 1.0, "source_media_version": "original" } }
// Asset not found POST /api/v2/assets/:asset_id/image_crops { "name": "16:9", "aspect": "1.778", "x": 960, "y": 540, "width": 480, "height": 270, "zoom": "1.00", "source_media_version": "original" } 404 { "error": "asset not found" }
// Invalid parameters POST /api/v2/assets/Lh3Ky6TZsF3jHKsZVSLM/image_crops { "name": "16:9", "aspect": "1.778", "x": 960, "y": 540, "width": 480, "height": 270, "zoom": "0.99", "source_media_version": "original" } 400 { "error": "Validation failed: Zoom must be greater than or equal to 1.0" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
name optional |
Image crop name Validations:
|
aspect optional |
Image crop aspect ratio Validations:
|
x optional |
Image crop X coordinate Validations:
|
y optional |
Image crop Y coordinate Validations:
|
height optional |
Image crop height Validations:
|
width optional |
Image crop width Validations:
|
zoom optional |
Image crop zoom for preview tool Validations:
|
source_media_version optional |
Media version to use, defaults to 'original' Validations:
|
// Successful request POST /api/v2/assets/_dpDVO0UAPQcFHzFysei/image_crops/4 { "name": "16:9", "aspect": "1.778", "x": 960, "y": 540, "width": 480, "height": 270, "zoom": "1.00", "source_media_version": "original" } 200 { "image_crop": { "name": "16:9", "aspect": 1.778, "x": 960, "y": 540, "width": 480, "height": 270, "zoom": 1.0, "source_media_version": "original", "id": 4 } }
// Asset not found POST /api/v2/assets/:asset_id/image_crops/5 { "name": "16:9", "aspect": "1.778", "x": 960, "y": 540, "width": 480, "height": 270, "zoom": "1.00", "source_media_version": "original" } 404 { "error": "asset not found" }
// Image crop not found POST /api/v2/assets/X_xf03UqAz_JkvF_PS1d/image_crops/:image_crop_id { "name": "16:9", "aspect": "1.778", "x": 960, "y": 540, "width": 480, "height": 270, "zoom": "1.00", "source_media_version": "original" } 404 { "error": "Couldn't find ImageCrop with 'id'=:image_crop_id [WHERE \"image_crops\".\"asset_id\" = $1]" }
// Invalid parameters POST /api/v2/assets/5x-MlA1ocaK31KMb1jFM/image_crops/6 { "name": "16:9", "aspect": "1.778", "x": 960, "y": 540, "width": 480, "height": 270, "zoom": "0.99", "source_media_version": "original" } 400 { "error": "Validation failed: Zoom must be greater than or equal to 1.0" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request DELETE /api/v2/assets/dLv2rP7fq3qaddAXitKK/image_crops/7 200 { "image_crops": [] }
// Asset not found DELETE /api/v2/assets/:asset_id/image_crops/8 404 { "error": "asset not found" }
// Image crop not found DELETE /api/v2/assets/hXPnU8UTdg3w4Iyn9rpD/image_crops/:image_crop_id 404 { "error": "Couldn't find ImageCrop with 'id'=:image_crop_id [WHERE \"image_crops\".\"asset_id\" = $1]" }
// If deletion fails DELETE /api/v2/assets/XoC-BL1Ak1u22r7M5WMp/image_crops/9 400 { "error": "Error while deleting image crop. Please try again or contact your administrator." }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |