تغییر اندازهٔ تصویر
تنظیمات تغییر اندازهٔ تصویر هر برنامه: منبعهای مجاز، اندازهها، کش و مصرف.
/v1/apps/{name}/imagesImage settings and usage#
The app's image resizing settings, its limits, this month's transformations and cache hits, the cache against the team's limit, and whether Hobby's free amount is used up (originals are served).
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
namestringمسیرالزامیthe app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
پاسخ
200object
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/apps/my-api/images" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/imagesChange image settings#
Change any of enabled, hosts, widths, qualities, formats and ttl_seconds; live within seconds. Errors 400 image_bad_*, 409 image_limit.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
namestringمسیرالزامیthe app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
بدنهٔ درخواستapplication/json
enabledbooleanhostsstring[]host names (img.example.com) or wildcards (*.example.com); https only, never addresses
widthsinteger[]qualitiesinteger[]0–10 items
formatsstring[]ttl_secondsinteger60–2678400
پاسخ
200object
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl -X PATCH "https://api.ibel.ai/v1/apps/my-api/images" \
-H "Authorization: Bearer $KEY" \
-d '{"enabled":true,"hosts":["…"],"widths":[1],"qualities":[1],"formats":["webp"],"ttl_seconds":60}'/v1/apps/{name}/images/usageImage usage by day#
Per day: transformations (billed per 1,000), cache hits, originals served unchanged, bytes in and out.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
namestringمسیرالزامیthe app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersdaysintegerکوئری1–90 · default
30
پاسخ
200object
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/apps/my-api/images/usage" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/images/cacheClear the image cache#
Forget every cached result of the app; each is made, and counted, again on its next request.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
namestringمسیرالزامیthe app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
پاسخ
200object
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
نمونه
curl -X DELETE "https://api.ibel.ai/v1/apps/my-api/images/cache" \
-H "Authorization: Bearer $KEY"/v1/imagesThe team''s image resizing#
Every app's transformations this month and its cache, and the team's cache against its plan limit.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پاسخ
200object
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/images" \
-H "Authorization: Bearer $KEY"