diff --git a/src/content/docs/en/pages/build-journey/advanced-configurations/image-processor.mdx b/src/content/docs/en/pages/build-journey/advanced-configurations/image-processor.mdx index 48d0cf5e13..a879158da5 100644 --- a/src/content/docs/en/pages/build-journey/advanced-configurations/image-processor.mdx +++ b/src/content/docs/en/pages/build-journey/advanced-configurations/image-processor.mdx @@ -72,10 +72,11 @@ To confirm whether your image is being optimized, [inspect the page](https://dev 1. Run the following `PATCH` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/) and the `` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/) to activate the [Application Accelerator](/en/documentation/products/build/edge-application/application-accelerator/) and [Image Processor](/en/documentation/products/build/edge-application/image-processor/) modules: ```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_applications/' \ ---header 'Accept: application/json; version=3' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ +curl --request PATCH \ + --url https://api.azion.com/v4/edge_application/applications/ \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ "application_acceleration": true, "image_optimization": true @@ -86,20 +87,32 @@ curl --location --request PATCH 'https://api.azionapi.net/edge_applications/` variable with the `id` of your edge application: ```bash -curl --location 'https://api.azionapi.net/edge_applications//cache_settings' \ ---header 'Accept: application/json; version=3' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ +curl --request POST \ + --url https://api.azion.com/v4/edge_application/applications//cache_settings \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ "name": "QS15D img", - "browser_cache_settings": "override", - "browser_cache_settings_maximum_ttl": 60, - "cdn_cache_settings": "override", - "cdn_cache_settings_maximum_ttl": 1296000, - "cache_by_query_string": "whitelist", - "query_string_fields": [ - "ims" - ] + "browser_cache": { + "behavior": "override", + "max_age": 60 + }, + "edge_cache": { + "behavior": "override", + "max_age": 1296000, + "caching_for_post_enabled": true, + "caching_for_options_enabled": true, + "stale_cache_enabled": true, + "tiered_cache_enabled": true, + "tiered_cache_region": "string" + }, + "application_controls": { + "cache_by_query_string": "whitelist", + "query_string_fields": [ + "ims" + ] + } }' ``` @@ -144,12 +157,14 @@ For more information on the cache settings endpoint, see [Tune your cache settin 6. Run the following `POST` request to create a rule in the **Request Phase**, replacing the edge application ID value and the cache setting ID you received in the previous response: ```bash -curl --location --globoff 'https://api.azionapi.net/edge_applications//rules_engine/request/rules' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ +curl --request POST \ + --url https://api.azion.com/v4/edge_application/applications//rules \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ "name": "ImgProcessor", + "phase": "request", "behaviors": [ { "name": "set_cache_policy", diff --git a/src/content/docs/en/pages/build-journey/edit-edge-app/edit-cache-settings/cache-settings.mdx b/src/content/docs/en/pages/build-journey/edit-edge-app/edit-cache-settings/cache-settings.mdx index 360a62a915..963726a67e 100644 --- a/src/content/docs/en/pages/build-journey/edit-edge-app/edit-cache-settings/cache-settings.mdx +++ b/src/content/docs/en/pages/build-journey/edit-edge-app/edit-cache-settings/cache-settings.mdx @@ -161,12 +161,13 @@ To verify how your content is being cached, you can [verify application cache in 1. Run the following `PATCH` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/) and the `` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/) to activate the [Application Accelerator](/en/documentation/products/build/edge-application/application-accelerator/) module: ```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_applications/' \ ---header 'Accept: application/json; version=3' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ +curl --request PATCH \ + --url https://api.azion.com/v4/edge_application/applications/ \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ - "application_acceleration": true + "application_acceleration_enabled": true }' ``` @@ -174,45 +175,57 @@ curl --location --request PATCH 'https://api.azionapi.net/edge_applications//device_groups' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' +curl --request GET \ + --url https://api.azion.com/v4/edge_application/applications//device_groups \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' ``` 4. Copy the ID received in the response. 5. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/), the `` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/), and the `` with the ID of the device group from the previous response, if needed: ```bash -curl --location 'https://api.azionapi.net/edge_applications//cache_settings' \ ---header 'Accept: application/json; version=3' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---data '{ +curl --request POST \ + --url https://api.azion.com/v4/edge_application/applications//cache_settings \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ + --data '{ "name": "/cache O60 O13660 Wcity Wcookie_name Wdg POST OPTIONS SLICE", - "browser_cache_settings": "override", - "browser_cache_settings_maximum_ttl": 60, - "cdn_cache_settings": "override", - "cdn_cache_settings_maximum_ttl": 13660, - "cache_by_query_string": "whitelist", - "query_string_fields": [ + "browser_cache": { + "behavior": "override", + "max_age": 60 + }, + "edge_cache": { + "behavior": "override", + "max_age": 13660, + "caching_for_post_enabled": true, + "caching_for_options_enabled": true, + "stale_cache_enabled": false, + "tiered_cache_enabled": false + }, + "application_controls": { + "cache_by_query_string": "whitelist", + "query_string_fields": [ "city" - ], - "adaptive_delivery_action": "whitelist", - "device_group": [ + ], + "query_string_sort_enabled": false, + "cache_by_cookies": "whitelist", + "cookie_names": [ + "cookie_name" + ], + "adaptive_delivery_action": "whitelist", + "device_group": [ - ], - "enable_query_string_sort": false, - "enable_caching_for_options": true, - "cache_by_cookies": "whitelist", - "cookie_names": [ - "cookie_name" - ], - "enable_caching_for_post": true, - "l2_caching_enabled": false, - "is_slice_configuration_enabled": true, - "is_slice_edge_caching_enabled": true, - "is_slice_l2_caching_enabled": false -}' + ] + }, + "slice_controls": { + "slice_configuration_enabled": true, + "slice_edge_caching_enabled": true, + "slice_tiered_caching_enabled": false, + "slice_configuration_range": 1024 + } + }' ``` | Key | Description | @@ -240,48 +253,60 @@ curl --location 'https://api.azionapi.net/edge_applications/, - "name": "/cache O60 O13660 Wcity Wcookie_name Wdg POST OPTIONS SLICE", - "browser_cache_settings": "override", - "browser_cache_settings_maximum_ttl": 60, - "cdn_cache_settings": "override", - "cdn_cache_settings_maximum_ttl": 13660, - "cache_by_query_string": "whitelist", - "query_string_fields": [ - "city" - ], - "enable_query_string_sort": true, - "cache_by_cookies": "whitelist", - "cookie_names": [ - "cookie_name" - ], - "adaptive_delivery_action": "whitelist", - "device_group": [ - - ], - "enable_caching_for_post": true, - "l2_caching_enabled": false, - "is_slice_configuration_enabled": true, - "is_slice_edge_caching_enabled": true, - "is_slice_l2_caching_enabled": false, - "slice_configuration_range": 1024, - "enable_caching_for_options": true, - "enable_stale_cache": false, - "l2_region": null +{ + "state": "pending", + "data": { + "id": , + "name": "/cache O60 O13660 Wcity Wcookie_name Wdg POST OPTIONS SLICE", + "browser_cache": { + "behavior": "override", + "max_age": 60 + }, + "edge_cache": { + "behavior": "override", + "max_age": 13660, + "caching_for_post_enabled": true, + "caching_for_options_enabled": true, + "stale_cache_enabled": false, + "tiered_cache_enabled": false, + "tiered_cache_region": null + }, + "application_controls": { + "cache_by_query_string": "whitelist", + "query_string_fields": [ + "city" + ], + "query_string_sort_enabled": true, + "cache_by_cookies": "whitelist", + "cookie_names": [ + "cookie_name" + ], + "adaptive_delivery_action": "whitelist", + "device_group": [ + + ] + }, + "slice_controls": { + "slice_configuration_enabled": true, + "slice_edge_caching_enabled": true, + "slice_tiered_caching_enabled": false, + "slice_configuration_range": 1024 } + } } ``` 7. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/), the `` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/), and the `` variable with the cache setting ID received in the response: ```bash -curl --location 'https://api.azionapi.net/edge_applications//rules_engine/request/rules' \ ---header 'Accept: application/json; version=3' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ +curl --request POST \ + --url https://api.azion.com/v4/edge_application/applications//rules \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ "name": "Set cache setting /cache", + "phase": "request", "behaviors": [ { "name": "set_cache_policy", diff --git a/src/content/docs/en/pages/build-journey/edit-edge-app/edit-device-groups/device-groups.mdx b/src/content/docs/en/pages/build-journey/edit-edge-app/edit-device-groups/device-groups.mdx index 5e43d7196a..8545dce8a4 100644 --- a/src/content/docs/en/pages/build-journey/edit-edge-app/edit-device-groups/device-groups.mdx +++ b/src/content/docs/en/pages/build-journey/edit-edge-app/edit-device-groups/device-groups.mdx @@ -65,10 +65,11 @@ You should receive a list of headers including the custom header added by the ru 1. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/) and the `` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/): ```bash -curl --location 'https://api.azionapi.net/edge_applications//device_groups' \ ---header 'Accept: application/json; version=3' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ +curl --request POST \ + --url https://api.azion.com/v4/edge_application/applications//device_groups \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ "name": "Mobile", "user_agent": "(Mobile|iPhone|Android)" @@ -99,12 +100,14 @@ The procedure described below is a temporary solution to check the validity of y 3. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/), the `` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/), and the `input_value` variable with the name of your device group: ```bash -curl --location 'https://api.azionapi.net/edge_applications//rules_engine/response/rules' \ ---header 'Accept: application/json; version=3' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ +curl --request POST \ + --url https://api.azion.com/v4/edge_application/applications//rules \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ "name": "DG - Mobile", + "phase": "response", "behaviors": [ { "name": "add_response_header", diff --git a/src/content/docs/en/pages/build-journey/edit-edge-app/edit-functions-instances/functions-instances.mdx b/src/content/docs/en/pages/build-journey/edit-edge-app/edit-functions-instances/functions-instances.mdx index 866cc00381..0dfe1777c6 100644 --- a/src/content/docs/en/pages/build-journey/edit-edge-app/edit-functions-instances/functions-instances.mdx +++ b/src/content/docs/en/pages/build-journey/edit-edge-app/edit-functions-instances/functions-instances.mdx @@ -65,12 +65,13 @@ To see your function running, access your application [using its domain](/en/doc 1. Run the following `PATCH` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/) and the `` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/) to activate the [Edge Functions](/en/documentation/products/build/edge-application/edge-functions/) module: ```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_applications/' \ ---header 'Accept: application/json; version=3' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ +curl --request PATCH \ + --url https://api.azion.com/v4/edge_application/applications/ \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ - "edge_functions": true + "edge_functions_enabled": true }' ``` @@ -78,9 +79,10 @@ curl --location --request PATCH 'https://api.azionapi.net/edge_applications//functions_instances' \ ---header 'Accept: application/json; version=3' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ +curl --request POST \ + --url https://api.azion.com/v4/edge_application/applications//functions \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ "name": "Hello World", - "edge_function_id": , + "edge_function": , "args": {} }' ``` @@ -147,12 +150,14 @@ curl --location 'https://api.azionapi.net/edge_applications/` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/), and the `` variable with the function instance ID received in the previous response: ```bash -curl --location 'https://api.azionapi.net/edge_applications//rules_engine/request/rules' \ ---header 'Accept: application/json; version=3' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ +curl --request POST \ + --url https://api.azion.com/v4/edge_application/applications//rules \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ "name": "Set cache setting - /cache", + "phase": "request", "behaviors": [ { "name": "run_function", diff --git a/src/content/docs/en/pages/build-journey/edit-edge-app/edit-main-settings/main-settings.mdx b/src/content/docs/en/pages/build-journey/edit-edge-app/edit-main-settings/main-settings.mdx index 2bb2844bf8..7a6e0bff45 100644 --- a/src/content/docs/en/pages/build-journey/edit-edge-app/edit-main-settings/main-settings.mdx +++ b/src/content/docs/en/pages/build-journey/edit-edge-app/edit-main-settings/main-settings.mdx @@ -98,19 +98,21 @@ Don't have an edge application? [Start with a template](/en/documentation/produc 1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/) to retrieve your ``: ```bash - curl --location 'https://api.azionapi.net/edge_applications \ - --header 'Accept: application/json; version=3' \ - --header 'Authorization: Token [TOKEN VALUE]' + curl --request GET \ + --url https://api.azion.com/v4/edge_application/applications \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' ``` 2. You'll receive a response with all your existing edge applications. Copy the value of the `` that you want to configure. 3. Run a `PATCH` request to modify the application as follows: ```bash - curl --location --request PATCH 'https://api.azionapi.net/edge_applications/' \ - --header 'Accept: application/json; version=3' \ + curl --request PATCH \ + --url https://api.azion.com/v4/edge_application/applications/ \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ --header 'Content-Type: application/json' \ - --header 'Authorization: Token [TOKEN VALUE]' \ --data '{ "delivery_protocol": "http", "http_port": [80, 8008], diff --git a/src/content/docs/en/pages/build-journey/edit-edge-app/edit-rules-engine/rules-engine.mdx b/src/content/docs/en/pages/build-journey/edit-edge-app/edit-rules-engine/rules-engine.mdx index e0802f2ad1..a2edba8150 100644 --- a/src/content/docs/en/pages/build-journey/edit-edge-app/edit-rules-engine/rules-engine.mdx +++ b/src/content/docs/en/pages/build-journey/edit-edge-app/edit-rules-engine/rules-engine.mdx @@ -60,10 +60,11 @@ To remove the `Server` header: 1. Run the following `PATCH` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/) and the `` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/) to activate the [Application Accelerator](/en/documentation/products/build/edge-application/application-accelerator/) module: ```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_applications/' \ ---header 'Accept: application/json; version=3' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ +curl --request PATCH \ + --url https://api.azion.com/v4/edge_application/applications/ \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ "application_acceleration": true }' @@ -73,12 +74,14 @@ curl --location --request PATCH 'https://api.azionapi.net/edge_applications/` with the `id` value you received in the previous response: ```bash -curl --location 'https://api.azionapi.net/edge_applications//rules_engine/response/rules' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ +curl --request POST \ + --url https://api.azion.com/v4/edge_application/applications//rules \ + --header 'Accept: application/json' \ + --header 'Authorization: [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ --data '{ "name": "FilterRespHeader Server", + "phase": "response", "behaviors": [ { "name": "filter_response_header",