Skip to content

Latest commit

 

History

History
94 lines (67 loc) · 2.65 KB

ImageOptimizerDefaultSettingsApi.md

File metadata and controls

94 lines (67 loc) · 2.65 KB

Fastly.ImageOptimizerDefaultSettingsApi

const apiInstance = new Fastly.ImageOptimizerDefaultSettingsApi();

Methods

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
getDefaultSettings GET /service/{service_id}/version/{version_id}/image_optimizer_default_settings Get current Image Optimizer Default Settings
updateDefaultSettings PATCH /service/{service_id}/version/{version_id}/image_optimizer_default_settings Update Image Optimizer Default Settings

getDefaultSettings

getDefaultSettings({ service_id, version_id })

Retrieve the current Image Optimizer default settings. All properties in the response will be populated.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
};

apiInstance.getDefaultSettings(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Number Integer identifying a service version.

Return type

DefaultSettingsResponse

updateDefaultSettings

updateDefaultSettings({ service_id, version_id, [default_settings] })

Update one or more default settings. A minimum of one property is required. The endpoint will respond with the new Image Optimizer default settings, with all properties populated.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
  default_settings: new Fastly.DefaultSettings(),
};

apiInstance.updateDefaultSettings(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Number Integer identifying a service version.
default_settings DefaultSettings [optional]

Return type

DefaultSettingsResponse

[Back to top] [Back to API list] [Back to README]