Skip to content

[EDU-6565] fix: replace api v3 in build journey -en #1677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<edge_application_id>` 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/<edge_application_id>' \
--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/<edge_application_id> \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
"application_acceleration": true,
"image_optimization": true
Expand All @@ -86,20 +87,32 @@ curl --location --request PATCH 'https://api.azionapi.net/edge_applications/<edg
3. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/) and the `<edge_application_id>` variable with the `id` of your edge application:

```bash
curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id>/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/<edge_application_id>/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"
]
}
}'
```

Expand Down Expand Up @@ -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/<edge_application_id>/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/<edge_application_id>/rules \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
"name": "ImgProcessor",
"phase": "request",
"behaviors": [
{
"name": "set_cache_policy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,58 +161,71 @@ 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 `<edge_application_id>` 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/<edge_application_id>' \
--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/<edge_application_id> \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
"application_acceleration": true
"application_acceleration_enabled": true
}'
```

2. You'll receive a response with the updated value.
3. If you want to configure adaptive delivery for one of your [device groups](/en/documentation/products/guides/build/create-device-groups/), run the following `GET` request beforehand:

```bash
curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id>/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/<edge_application_id>/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 `<edge_application_id>` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/), and the `<device_group_id>` with the ID of the device group from the previous response, if needed:

```bash
curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id>/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/<edge_application_id>/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": [
<device_group_id>
],
"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 |
Expand Down Expand Up @@ -240,48 +253,60 @@ curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id

```json
{
"results": {
"id": <cache_settings_id>,
"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": [
<device_group_id>
],
"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": <cache_settings_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": [
<device_group_id>
]
},
"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 `<edge_application_id>` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/), and the `<cache_setting_id>` variable with the cache setting ID received in the response:

```bash
curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id>/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/<edge_application_id>/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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<edge_application_id>` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/):

```bash
curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id>/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/<edge_application_id>/device_groups \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
"name": "Mobile",
"user_agent": "(Mobile|iPhone|Android)"
Expand Down Expand Up @@ -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 `<edge_application_id>` 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/<edge_application_id>/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/<edge_application_id>/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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,24 @@ 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 `<edge_application_id>` 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/<edge_application_id>' \
--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/<edge_application_id> \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
"edge_functions": true
"edge_functions_enabled": true
}'
```

2. You'll receive a response with the updated value.
3. Run the following `GET` request to retrieve the `edge_function_id` of the *Hello World* function:

```bash
curl --location 'https://api.azionapi.net/edge_functions' \
--header 'Accept: application/json; version=3' \
--header 'Authorization: Token [TOKEN VALUE]'
curl --request GET \
--url https://api.azion.com/v4/edge_functions/functions \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]'
```

4. You'll receive a response similar to this:
Expand Down Expand Up @@ -113,13 +115,14 @@ curl --location 'https://api.azionapi.net/edge_functions' \
6. Run the following `POST` request, replacing the edge function ID value with the value you received in the previous response:

```bash
curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id>/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/<edge_application_id>/functions \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
"name": "Hello World",
"edge_function_id": <edge_function_id>,
"edge_function": <edge_function_id>,
"args": {}
}'
```
Expand Down Expand Up @@ -147,12 +150,14 @@ curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id
8. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/), the `<edge_application_id>` variable with [your edge application ID](/en/documentation/products/guides/build/configure-main-settings/), and the `<edge_function_instance_id>` variable with the function instance ID received in the previous response:

```bash
curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id>/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/<edge_application_id>/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",
Expand Down
Loading