The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

WebService::Fastly::ResponseObjectApi

Load the API package

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

Method | HTTP request | Description ------------- | ------------- | ------------- delete_response_object | DELETE /service/{service_id}/version/{version_id}/response_object/{response_object_name} | Delete a Response Object get_response_object | GET /service/{service_id}/version/{version_id}/response_object/{response_object_name} | Get a Response object list_response_objects | GET /service/{service_id}/version/{version_id}/response_object | List Response objects

delete_response_object

InlineResponse200 delete_response_object(service_id => $service_id, version_id => $version_id, response_object_name => $response_object_name)

Delete a Response Object

Deletes the specified Response Object.

Example

my $api_instance = WebService::Fastly::ResponseObjectApi->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 $response_object_name = "response_object_name_example"; # string | Name for the request settings.
eval {
my $result = $api_instance->delete_response_object(service_id => $service_id, version_id => $version_id, response_object_name => $response_object_name);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ResponseObjectApi->delete_response_object: $@\n";
}

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- service_id | string| Alphanumeric string identifying the service. | version_id | int| Integer identifying a service version. | response_object_name | string| Name for the request settings. |

Return type

InlineResponse200

Authorization

token

HTTP request headers

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

get_response_object

ResponseObjectResponse get_response_object(service_id => $service_id, version_id => $version_id, response_object_name => $response_object_name)

Get a Response object

Gets the specified Response Object.

Example

my $api_instance = WebService::Fastly::ResponseObjectApi->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 $response_object_name = "response_object_name_example"; # string | Name for the request settings.
eval {
my $result = $api_instance->get_response_object(service_id => $service_id, version_id => $version_id, response_object_name => $response_object_name);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ResponseObjectApi->get_response_object: $@\n";
}

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- service_id | string| Alphanumeric string identifying the service. | version_id | int| Integer identifying a service version. | response_object_name | string| Name for the request settings. |

Return type

ResponseObjectResponse

Authorization

token

HTTP request headers

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

list_response_objects

ARRAY[ResponseObjectResponse] list_response_objects(service_id => $service_id, version_id => $version_id)

List Response objects

Returns all Response Objects for the specified service and version.

Example

my $api_instance = WebService::Fastly::ResponseObjectApi->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->list_response_objects(service_id => $service_id, version_id => $version_id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ResponseObjectApi->list_response_objects: $@\n";
}

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- service_id | string| Alphanumeric string identifying the service. | version_id | int| Integer identifying a service version. |

Return type

ARRAY[ResponseObjectResponse]

Authorization

token

HTTP request headers

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