use WebService::Fastly::Object::DictionaryItemApi;
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
bulk_update_dictionary_item | PATCH /service/{service_id}/dictionary/{dictionary_id}/items | Update multiple entries in a dictionary |
create_dictionary_item | POST /service/{service_id}/dictionary/{dictionary_id}/item | Create an entry in a dictionary |
delete_dictionary_item | DELETE /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Delete an item from a dictionary |
get_dictionary_item | GET /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Get an item from a dictionary |
list_dictionary_items | GET /service/{service_id}/dictionary/{dictionary_id}/items | List items in a dictionary |
update_dictionary_item | PATCH /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Update an entry in a dictionary |
upsert_dictionary_item | PUT /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Insert or update an entry in a dictionary |
InlineResponse200 bulk_update_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, bulk_update_dictionary_list_request => $bulk_update_dictionary_list_request)
Update multiple entries in a dictionary
Update multiple items in the same dictionary. For faster updates to your service, group your changes into large batches. The maximum batch size is 1000 items. Contact support to discuss raising this limit.
use Data::Dumper;
use WebService::Fastly::DictionaryItemApi;
my $api_instance = WebService::Fastly::DictionaryItemApi->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 $dictionary_id = "dictionary_id_example"; # string | Alphanumeric string identifying a Dictionary.
my $bulk_update_dictionary_list_request = WebService::Fastly::Object::BulkUpdateDictionaryListRequest->new(); # BulkUpdateDictionaryListRequest |
eval {
my $result = $api_instance->bulk_update_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, bulk_update_dictionary_list_request => $bulk_update_dictionary_list_request);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DictionaryItemApi->bulk_update_dictionary_item: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
dictionary_id | string | Alphanumeric string identifying a Dictionary. | |
bulk_update_dictionary_list_request | BulkUpdateDictionaryListRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DictionaryItemResponse create_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, item_key => $item_key, item_value => $item_value)
Create an entry in a dictionary
Create DictionaryItem given service, dictionary ID, item key, and item value.
use Data::Dumper;
use WebService::Fastly::DictionaryItemApi;
my $api_instance = WebService::Fastly::DictionaryItemApi->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 $dictionary_id = "dictionary_id_example"; # string | Alphanumeric string identifying a Dictionary.
my $item_key = "item_key_example"; # string | Item key, maximum 256 characters.
my $item_value = "item_value_example"; # string | Item value, maximum 8000 characters.
eval {
my $result = $api_instance->create_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, item_key => $item_key, item_value => $item_value);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DictionaryItemApi->create_dictionary_item: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
dictionary_id | string | Alphanumeric string identifying a Dictionary. | |
item_key | string | Item key, maximum 256 characters. | [optional] |
item_value | string | Item value, maximum 8000 characters. | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 delete_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, dictionary_item_key => $dictionary_item_key)
Delete an item from a dictionary
Delete DictionaryItem given service, dictionary ID, and item key.
use Data::Dumper;
use WebService::Fastly::DictionaryItemApi;
my $api_instance = WebService::Fastly::DictionaryItemApi->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 $dictionary_id = "dictionary_id_example"; # string | Alphanumeric string identifying a Dictionary.
my $dictionary_item_key = "dictionary_item_key_example"; # string | Item key, maximum 256 characters.
eval {
my $result = $api_instance->delete_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, dictionary_item_key => $dictionary_item_key);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DictionaryItemApi->delete_dictionary_item: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
dictionary_id | string | Alphanumeric string identifying a Dictionary. | |
dictionary_item_key | string | Item key, maximum 256 characters. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DictionaryItemResponse get_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, dictionary_item_key => $dictionary_item_key)
Get an item from a dictionary
Retrieve a single DictionaryItem given service, dictionary ID and item key.
use Data::Dumper;
use WebService::Fastly::DictionaryItemApi;
my $api_instance = WebService::Fastly::DictionaryItemApi->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 $dictionary_id = "dictionary_id_example"; # string | Alphanumeric string identifying a Dictionary.
my $dictionary_item_key = "dictionary_item_key_example"; # string | Item key, maximum 256 characters.
eval {
my $result = $api_instance->get_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, dictionary_item_key => $dictionary_item_key);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DictionaryItemApi->get_dictionary_item: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
dictionary_id | string | Alphanumeric string identifying a Dictionary. | |
dictionary_item_key | string | Item key, maximum 256 characters. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ARRAY[DictionaryItemResponse] list_dictionary_items(service_id => $service_id, dictionary_id => $dictionary_id, page => $page, per_page => $per_page, sort => $sort, direction => $direction)
List items in a dictionary
List of DictionaryItems given service and dictionary ID.
use Data::Dumper;
use WebService::Fastly::DictionaryItemApi;
my $api_instance = WebService::Fastly::DictionaryItemApi->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 $dictionary_id = "dictionary_id_example"; # string | Alphanumeric string identifying a Dictionary.
my $page = 1; # int | Current page.
my $per_page = 20; # int | Number of records per page.
my $sort = created; # string | Field on which to sort.
my $direction = ascend; # string | Direction in which to sort results.
eval {
my $result = $api_instance->list_dictionary_items(service_id => $service_id, dictionary_id => $dictionary_id, page => $page, per_page => $per_page, sort => $sort, direction => $direction);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DictionaryItemApi->list_dictionary_items: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
dictionary_id | string | Alphanumeric string identifying a Dictionary. | |
page | int | Current page. | [optional] |
per_page | int | Number of records per page. | [optional] [default to 100] |
sort | string | Field on which to sort. | [optional] [default to 'created'] |
direction | string | Direction in which to sort results. | [optional] [default to 'ascend'] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DictionaryItemResponse update_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, dictionary_item_key => $dictionary_item_key, item_key => $item_key, item_value => $item_value)
Update an entry in a dictionary
Update DictionaryItem given service, dictionary ID, item key, and item value.
use Data::Dumper;
use WebService::Fastly::DictionaryItemApi;
my $api_instance = WebService::Fastly::DictionaryItemApi->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 $dictionary_id = "dictionary_id_example"; # string | Alphanumeric string identifying a Dictionary.
my $dictionary_item_key = "dictionary_item_key_example"; # string | Item key, maximum 256 characters.
my $item_key = "item_key_example"; # string | Item key, maximum 256 characters.
my $item_value = "item_value_example"; # string | Item value, maximum 8000 characters.
eval {
my $result = $api_instance->update_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, dictionary_item_key => $dictionary_item_key, item_key => $item_key, item_value => $item_value);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DictionaryItemApi->update_dictionary_item: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
dictionary_id | string | Alphanumeric string identifying a Dictionary. | |
dictionary_item_key | string | Item key, maximum 256 characters. | |
item_key | string | Item key, maximum 256 characters. | [optional] |
item_value | string | Item value, maximum 8000 characters. | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DictionaryItemResponse upsert_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, dictionary_item_key => $dictionary_item_key, item_key => $item_key, item_value => $item_value)
Insert or update an entry in a dictionary
Upsert DictionaryItem given service, dictionary ID, item key, and item value.
use Data::Dumper;
use WebService::Fastly::DictionaryItemApi;
my $api_instance = WebService::Fastly::DictionaryItemApi->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 $dictionary_id = "dictionary_id_example"; # string | Alphanumeric string identifying a Dictionary.
my $dictionary_item_key = "dictionary_item_key_example"; # string | Item key, maximum 256 characters.
my $item_key = "item_key_example"; # string | Item key, maximum 256 characters.
my $item_value = "item_value_example"; # string | Item value, maximum 8000 characters.
eval {
my $result = $api_instance->upsert_dictionary_item(service_id => $service_id, dictionary_id => $dictionary_id, dictionary_item_key => $dictionary_item_key, item_key => $item_key, item_value => $item_value);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DictionaryItemApi->upsert_dictionary_item: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
dictionary_id | string | Alphanumeric string identifying a Dictionary. | |
dictionary_item_key | string | Item key, maximum 256 characters. | |
item_key | string | Item key, maximum 256 characters. | [optional] |
item_value | string | Item value, maximum 8000 characters. | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]