Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/origin endpoint will be replaced with edge connector, but parameters still dont fully match

Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,11 @@ Once the changes have been made, access `http://xxxxxxxxxx.map.azionedge.net/ind
1. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/):

```bash
curl --location 'https://api.azionapi.net/edge_applications' \
--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 \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
"name": "edge storage app",
"delivery_protocol": "http",
Expand Down Expand Up @@ -290,9 +291,10 @@ curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id
10. Run the following `GET` request in your terminal to retrieve the ID of the default rule of your edge application's **Rules Engine**, replacing `<edge_application_id>` variable with the edge application ID you copied previously:

```bash
curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id>/rules_engine/request/rules' \
--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>/rules?search=phase:request" \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]'
```

11. You should receive a response similar to:
Expand Down Expand Up @@ -326,10 +328,11 @@ curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id
13. Run the following `PATCH` request to modify the default rule, replacing `<rule_id>` with the ID of the rule you retrieved in the previous step, leaving the `set_cache_policy` object the same as received in the response:

```bash
curl --location --request PATCH 'https://api.azionapi.net/edge_applications/<edge_application_id>/rules_engine/request/rules/<rule_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>/rules/<rule_id> \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
"behaviors": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,11 @@ Uma vez que as alterações tenham sido feitas, acesse `http://xxxxxxxxxx.map.az
1. Execute a seguinte requisição `POST` no seu terminal, substituindo `[VALOR DO TOKEN]` pelo seu [personal token](/pt-br/documentacao/produtos/guias/personal-tokens/):

```bash
curl --location 'https://api.azionapi.net/edge_applications' \
--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 \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
"name": "edge storage app",
"delivery_protocol": "http",
Expand Down Expand Up @@ -290,9 +291,10 @@ curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id
10. Execute a seguinte requisição `GET` no seu terminal para recuperar o ID da regra padrão do **Rules Engine** da sua edge application, substituindo a variável `<edge_application_id>` pelo ID da edge application que você copiou anteriormente:

```bash
curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id>/rules_engine/request/rules' \
--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>/rules?search=phase:request" \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]'
```

11. Você deve receber uma resposta semelhante a esta:
Expand Down Expand Up @@ -326,10 +328,11 @@ curl --location 'https://api.azionapi.net/edge_applications/<edge_application_id
13. Execute a seguinte requisição `PATCH` para modificar a regra padrão, substituindo `<rule_id>` pelo ID da regra que você recuperou no passo anterior, mantendo o objeto `set_cache_policy` igual ao recebido na resposta:

```bash
curl --location --request PATCH 'https://api.azionapi.net/edge_applications/<edge_application_id>/rules_engine/request/rules/<rule_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>/rules/<rule_id> \
--header 'Accept: application/json' \
--header 'Authorization: [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
"behaviors": [
{
Expand Down