Update Source
This endpoint allows users to update image source that has previously been created.
Path Parameters
- Type: stringimage
_source _id requiredimage source id which you want to update
Body
application/json
- Type: objectaws
This is a required field if source type is aws.
- Type: objectazure
This is a required field if source type is azure.
- Type: objectbackblaze
This is a required field if source type is backblaze.
- Type: integer Format: int32browser
_cache _time Browser cache time in seconds. For example setting this to 3600 caches the image in browser for 3600 seconds (1 hour)
- Type: integer Format: int32cdn
_cache _time CDN cache time in seconds.
- Type: objectcloudflare
This is a required field if source type is cloudflare.
- Type: objectcloudinary
This is a required field if source type is cloudinary.
- Type: array string[]cname
List of verified CNAMEs
- Type: objectdefault
_params Empty object - Type: objectdostorage
This is a required field if source type is dostorage.
- Type: stringerror
_image URL for error image to display when we get broken image from your origin.
- Type: array object[]fallback
_origins List of fallback origins
Responses
- application/json
- application/json
Request Example for post/image/sources/{image_source_id}
import Gumlet from '@gumlet/nodejs-sdk';
const client = new Gumlet({
apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});
const imageSource = await client.imageSources.update('imageSourceId');
console.log(imageSource);
{
"id": "653cc238411da17d32d9aefc",
"namespace": "gumlet-blog-content",
"type": "webfolder",
"cdn_type": "third_party",
"cdn_cache_time": 8640000,
"canonical_url": true,
"browser_cache_time": 8640000,
"is_cloudfront": false,
"created_at": "2023-10-28T08:11:36.943Z",
"updated_at": "2026-08-19T03:50:26.098Z",
"webfolder": {
"base_url": "https://www.gumlet.co"
},
"default_params": {
"format": "auto",
"compress": "true"
},
"subdomain": "gumlet-blog-content.gumlet.io",
"is_active": true
}
