use WebService::Fastly::Object::ImageOptimizerDefaultSettingsApi;
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
get_default_settings | GET /service/{service_id}/version/{version_id}/image_optimizer_default_settings | Get current Image Optimizer Default Settings |
update_default_settings | PATCH /service/{service_id}/version/{version_id}/image_optimizer_default_settings | Update Image Optimizer Default Settings |
DefaultSettingsResponse get_default_settings(service_id => $service_id, version_id => $version_id)
Get current Image Optimizer Default Settings
Retrieve the current Image Optimizer default settings. All properties in the response will be populated.
use Data::Dumper;
use WebService::Fastly::ImageOptimizerDefaultSettingsApi;
my $api_instance = WebService::Fastly::ImageOptimizerDefaultSettingsApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service.
my $version_id = 56; # int | Integer identifying a service version.
eval {
my $result = $api_instance->get_default_settings(service_id => $service_id, version_id => $version_id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ImageOptimizerDefaultSettingsApi->get_default_settings: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. |
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DefaultSettingsResponse update_default_settings(service_id => $service_id, version_id => $version_id, default_settings => $default_settings)
Update Image Optimizer 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.
use Data::Dumper;
use WebService::Fastly::ImageOptimizerDefaultSettingsApi;
my $api_instance = WebService::Fastly::ImageOptimizerDefaultSettingsApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service.
my $version_id = 56; # int | Integer identifying a service version.
my $default_settings = WebService::Fastly::Object::DefaultSettings->new(); # DefaultSettings |
eval {
my $result = $api_instance->update_default_settings(service_id => $service_id, version_id => $version_id, default_settings => $default_settings);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ImageOptimizerDefaultSettingsApi->update_default_settings: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. | |
default_settings | DefaultSettings | [optional] |
- Content-Type: application/json
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]