# Update CDN settings default assets — Site — Content Management API — DatoCMS

# Content Management API > Site

Update CDN settings default assets

Allows to modify default settings for assets serving optimization from the CDN

## Body parameters

assets\_cdn\_default\_settings object Required

Allows setting default parameters for assets served through the CDN

Show object format

image object Required

Allows setting default parameters for optimizing images served by the CDN

Show object format

q integer Optional

Controls the output quality of lossy file formats (jpg, pjpg, webp, avif, or jxr). Valid values are in the range 0 – 100 and the default is 75.

Example: `50`

auto Optional

The auto parameter helps automating a baseline level of optimization. Specify one or more settings

Type: Array<string>

Example: `["compress", "format"]`

cs enum Optional

Specifies the color space of the output image

Example: `"srgb"`

Show enum values

srgb Optional

Uses the sRGB colorspace which is an internet standard. This is the default

adobergb1998 Optional

Refers to the Adobe RGB (1998) color space, which provides accurate color reproduction from screen to print

tinysrgb Optional

Reduces the color space metadata but may cause a slight shift in color values

strip Optional

Removes the colorspace for maximum size reduction. Note that colors will still be rendered, but a colorspace will not be specified

origin Optional

Keeps the color space of the origin image. This is the default value unless auto=compress

video object Required

Allows setting default parameters for optimizing videos served by the CDN

Show object format

disable\_serving\_raw\_videos boolean Optional

When true, attempting to retrieve raw video files directly instead of their optimized counterparts will result in a HTTP 422 status code

## Returns

Returns a resource object of type [site](https://www.datocms.com/docs/content-management-api/resources/site.md)

## Examples

Example Basic example

###### Code

```javascript
import { buildClient } from "@datocms/cma-client-node";

async function run() {
  const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });

  const site = await client.site.updateAssetsCdnDefaultSettings({
    assets_cdn_default_settings: { image: {}, video: {} },
  });

  // Check the 'Returned output' tab for the result ☝️
  console.log(site);
}

run();
```

###### Returned output

```javascript
{
  id: "155",
  domain: "admin.my-awesome-website.com",
  favicon: "123",
  global_seo: {},
  google_maps_api_token: "xxxxxxxxxxxxx",
  imgix_host: "www.datocms-assets.com",
  internal_domain: "my-website.admin.datocms.com",
  last_data_change_at: "2017-03-30T09:29:14.872Z",
  locales: ["en"],
  name: "My Awesome Website",
  no_index: true,
  require_2fa: false,
  theme: {
    type: "monochromatic",
    hue: 16,
    primary_color: { red: 128, green: 128, blue: 128, alpha: 128 },
    light_color: { red: 128, green: 128, blue: 128, alpha: 128 },
    accent_color: { red: 128, green: 128, blue: 128, alpha: 128 },
    dark_color: { red: 128, green: 128, blue: 128, alpha: 128 },
    logo: "123",
  },
  timezone: "Europe/London",
  ip_tracking_enabled: true,
  force_use_of_sandbox_environments: true,
  assets_cdn_default_settings: { image: {}, video: {} },
  meta: {
    created_at: "2020-04-21T07:57:11.124Z",
    improved_timezone_management: true,
    improved_hex_management: true,
    improved_gql_multilocale_fields: true,
    improved_gql_visibility_control: true,
    improved_boolean_fields: true,
    draft_mode_default: true,
    improved_validation_at_publishing: true,
    improved_exposure_of_inline_blocks_in_cda: true,
  },
  item_types: [{ type: "item_type", id: "DxMaW10UQiCmZcuuA-IkkA" }],
  owner: { type: "account", id: "312" },
}
```

## Content Management API

- [Content Management API Overview](https://www.datocms.com/docs/content-management-api.md)

- [Using the JavaScript client](https://www.datocms.com/docs/content-management-api/using-the-nodejs-clients.md)
- [API versioning](https://www.datocms.com/docs/content-management-api/api-versioning.md)

- [Authentication](https://www.datocms.com/docs/content-management-api/authentication.md)
- [Environments](https://www.datocms.com/docs/content-management-api/setting-the-environment.md)

- [Error codes & handling failures (CMA)](https://www.datocms.com/docs/content-management-api/errors.md)
- [Pagination](https://www.datocms.com/docs/content-management-api/pagination.md)

- [Asynchronous jobs](https://www.datocms.com/docs/content-management-api/async-jobs.md)
- [Technical Limits (CMA)](https://www.datocms.com/docs/content-management-api/technical-limits.md)

- [Record](https://www.datocms.com/docs/content-management-api/resources/item.md)
- [Scheduled publication](https://www.datocms.com/docs/content-management-api/resources/scheduled-publication.md)

- [Scheduled unpublishing](https://www.datocms.com/docs/content-management-api/resources/scheduled-unpublishing.md)
- [Upload](https://www.datocms.com/docs/content-management-api/resources/upload.md)

- [Site](https://www.datocms.com/docs/content-management-api/resources/site.md)
- [Retrieve the site](https://www.datocms.com/docs/content-management-api/resources/site/self.md)

- [Update the site's settings](https://www.datocms.com/docs/content-management-api/resources/site/update.md)
- [Model/Block](https://www.datocms.com/docs/content-management-api/resources/item-type.md)

- [Field](https://www.datocms.com/docs/content-management-api/resources/field.md)
- [Fieldset](https://www.datocms.com/docs/content-management-api/resources/fieldset.md)

- [Record version](https://www.datocms.com/docs/content-management-api/resources/item-version.md)
- [Upload permission](https://www.datocms.com/docs/content-management-api/resources/upload-request.md)

- [Upload track](https://www.datocms.com/docs/content-management-api/resources/upload-track.md)
- [Manual tags](https://www.datocms.com/docs/content-management-api/resources/upload-tag.md)

- [Smart tags](https://www.datocms.com/docs/content-management-api/resources/upload-smart-tag.md)
- [Upload Collection](https://www.datocms.com/docs/content-management-api/resources/upload-collection.md)

- [Search result](https://www.datocms.com/docs/content-management-api/resources/search-result.md)
- [Environment](https://www.datocms.com/docs/content-management-api/resources/environment.md)

- [Maintenance mode](https://www.datocms.com/docs/content-management-api/resources/maintenance-mode.md)
- [Menu Item](https://www.datocms.com/docs/content-management-api/resources/menu-item.md)

- [Schema Menu Item](https://www.datocms.com/docs/content-management-api/resources/schema-menu-item.md)
- [Uploads filter](https://www.datocms.com/docs/content-management-api/resources/upload-filter.md)

- [Model filter](https://www.datocms.com/docs/content-management-api/resources/item-type-filter.md)
- [Plugin](https://www.datocms.com/docs/content-management-api/resources/plugin.md)

- [Workflow](https://www.datocms.com/docs/content-management-api/resources/workflow.md)
- [Asynchronous job](https://www.datocms.com/docs/content-management-api/resources/job.md)

- [Job result](https://www.datocms.com/docs/content-management-api/resources/job-result.md)
- [Account](https://www.datocms.com/docs/content-management-api/resources/account.md)

- [Organization](https://www.datocms.com/docs/content-management-api/resources/organization.md)
- [Invitation](https://www.datocms.com/docs/content-management-api/resources/site-invitation.md)

- [Collaborator](https://www.datocms.com/docs/content-management-api/resources/user.md)
- [Role](https://www.datocms.com/docs/content-management-api/resources/role.md)

- [API token](https://www.datocms.com/docs/content-management-api/resources/access-token.md)
- [Webhook](https://www.datocms.com/docs/content-management-api/resources/webhook.md)

- [Webhook call](https://www.datocms.com/docs/content-management-api/resources/webhook-call.md)
- [Build trigger](https://www.datocms.com/docs/content-management-api/resources/build-trigger.md)

- [Deploy activity](https://www.datocms.com/docs/content-management-api/resources/build-event.md)
- [Subscription limit](https://www.datocms.com/docs/content-management-api/resources/subscription-limit.md)

- [Subscription feature](https://www.datocms.com/docs/content-management-api/resources/subscription-feature.md)
- [SSO Settings](https://www.datocms.com/docs/content-management-api/resources/sso-settings.md)

- [SSO User](https://www.datocms.com/docs/content-management-api/resources/sso-user.md)
- [SSO Group](https://www.datocms.com/docs/content-management-api/resources/sso-group.md)

- [White-label settings](https://www.datocms.com/docs/content-management-api/resources/white-label-settings.md)
- [Audit log event](https://www.datocms.com/docs/content-management-api/resources/audit-log-event.md)