GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing www.contentstack.com — Image Delivery API Docs | APIs for image retrieval | Contentstack Image - IntroductionBase URL
OverviewContentstack’s Image Delivery API allows you to manipulate images stored in your content types. This API lets you perform various transformations on your images, such as resizing, cropping, changing the format etc. Supported input formats
Supported output formats
If you are looking for APIs to deliver content to your web or mobile properties, use our Content Delivery API, and to manage content, you should use the Content Management API. Rate LimitingRate limiting defines the maximum number of API requests your organization can make within a specific time frame. Request Types • CDN Requests: Contentstack’s CDN serves cached responses. These requests are not subject to rate limiting. • Origin Server Requests: Requests that are not cached and are routed to the origin server are subject to rate limits. Default Limits By default, origin server requests are limited to 100 requests per second per organization. All requests made from the CDA and Image Delivery API endpoints count towards this rate limit excluding GraphQL. The exact rate limit depends on your plan. If required, you can request an increase by contacting support. NoteWhile CDN requests are not rate-limited, all API requests (CDN and origin) count toward your organization’s overall API usage quota. Rate Limit Exceeded If your application exceeds the allowed rate limit within a given time period, the API will return an HTTP 429 (Too Many Requests) response. Adaptive Rate Limiting If your traffic arrives in short spikes, for example when a publish clears cached content, your organization can request Adaptive Rate Limiting, which is currently part of an Early Access Program. It absorbs short bursts instead of rejecting them, without changing your rate limit. With Adaptive Rate Limiting enabled, a 429 response also includes a Retry-After header that tells you how many seconds to wait before you retry. To enable it, contact support. Monitoring Rate Limits You can track your current rate limit status using the HTTP response headers returned with each API request. These limits reset at the beginning of each time window.
How Image Delivery APIs WorkImage Delivery APIs retrieve, manipulate and/or convert the retrieved image file, and deliver it to your web or mobile properties. Note The APIs do not modify the actual source image file in Contentstack. Making a RequestYou can use Image Delivery APIs by just appending queries to the image URL: {image_url}?environment={environment_name}&query_parameter For example, to resize the width of an image to 100px, you need to append {&width={100} to the image URL. So, the API request would be: https://images.contentstack.io/v3/assets/blteae40eb499811073/bltc5064f36b5855343/59e0c41ac0eddd140d5a8e3e/owl.jpg?environment=production&width=100 You can also use multiple queries in a single API request. {image_url}?environment={environment_name}&width={width_value}&height={height_value}&resize-filter={resize-filter_value}In this case, the API request would form like this: https://images.contentstack.io/v3/assets/blteae40eb499811073/bltc5064f36b5855343/59e0c41ac0eddd140d5a8e3e/owl.jpg?environment=production&width=500&height=550&resize-filter=nearest Include Environment ParameterWhen making Image Delivery API requests, you must include the environment query parameter: {image_url}?environment={environment_name}&query_parameterUsing the environment parameter ensures that requests are routed through Contentstack’s Content Delivery Network (CDN). This approach provides the following benefits:
NoteThe image must be published in the environment which is being passed as a query parameter. Understanding Different Strings in the Asset URLHere’s an example of an asset URL: https://images.contentstack.io/v3/assets/blteae40eb499811073/bltc5064f36b5855343/59e0c41ac0eddd140d5a8e3e/owl.jpg If you notice the URL, you will see that it is made up of several strings. Here's the breakdown of these strings to understand what they are: {base_url}/v3/assets/{stack_api_key}/{asset_uid}/{file_uid}/filenameAdditional ResourceRefer to Understanding Asset URL document to know more about asset URL structure. Please note that the above breakdown of strings of the asset URL is just for your understanding. This is the default pattern of all the asset URLs. If the "Branches" feature is part of your plan, you will see an updated download URL format for all assets part of any branch, except the default main branch. The branch={branch_UID} query parameter is attached to the download URL. For instance, if you upload an asset to the development branch, Contentstack generates the following asset download URL: https://assets.contentstack.com/v3/assets/blt252b550c5ccdae26/bltc56f275260214c0b/61280d9625aca65092ce7f15/Sample_Image.jpg?branch=development For any asset that you upload to the main branch, Contentstack will continue to generate asset download URLs in the earlier format: https://assets.contentstack.com/v3/assets/blt252b550c5ccdae26/bltc56f275260214c0b/61280d9625aca65092ce7f15/Sample_Image.jpg When working with this API documentation, you do not have to enter any of the above values. To make Image Delivery API requests, you simply need to append queries to the asset URL. Limitations with Optimizing Image
| ||||||
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |