1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20

site

doc

blog

success stories

Edge Application

Edit on GitHub

The API of Edge Applications allows you to check, remove or update your existing settings, as well as creating new ones.

  1. Retrieving a list of Edge Applications
  2. Retrieving details of an Edge Application
  3. Deleting an Edge Application
  4. Creating a new Edge Application
  5. Overwriting an Edge Application
  6. Updating the fields of an Edge Application
  7. Support Documentation

1. Retrieving a list of Edge Applications

It returns a list of Edge Applications.

GET /edge_applications

Required permission: View Security Settings

Parameter Description Type Type of Data
Authorization
*required
Authentication through the Token, previously created through the endpoint of Token Creation. header string
Accept
*required
Details about the type of return and version. header string;
application/json;version=3

Request Example

GET /edge_applications 
Accept: application/json; version=3
Authorization: token cf2078926f91a6e638af3f4a6977b505edfe5941

Response Example

{
    "count": 36,
    "total_pages": 18,
    "schema_version": 3,
    "links": {
        "previous": null,
        "next": "https://api.azionapi.net/edge_applications?page=2&page_size=2"
    },
    "results": [
        {
            "id": 1528990724,
            "name": "Edge Cloud Storage Google",
            "active": true,
            "origins": [
                {
                    "name": "Default Origin",
                    "origin_type": "single_origin",
                    "origin_id": "c2434ff9-b9a9-4937-8721-60d58ac54976"
                }
            ]
        },
        {
            "id": 1528990725,
            "name": "Edge Application",
            "active": true,
            "origins": [
                {
                    "name": "Default Origin",
                    "origin_type": "single_origin",
                    "origin_id": "25fe91c0-1a2c-4ce1-9e3f-a109d2cd3204"
                },
                {
                    "name": "Z1",
                    "origin_type": "single_origin",
                    "origin_id": "0924c04d-b00a-4653-8575-92053e0d0e2f"
                }
            ]
        }
    ]
}

2. Retrieving the details of an Edge Application

It returns details of an Edge Application. The information returned by this command refers to the main settings of an Application.

GET /edge_applications/:id

Required permission: View Security Settings

Parameter Description Type Type of Data
Authorization
*required
Authentication through the Token, previously created through the endpoint of Token Creation. header string
Accept
*required
Details about the type of return and version. header string;
application/json;version=3
:id
*required
The id of the edge application that you plan to query. path number

Request Example

GET /edge_applications/1528990724
Accept: application/json; version=3
Authorization: token cf2078926f91a6e638af3f4a6977b505edfe5941

Response Example

{
    "results": {
        "id": 1528990724,
        "name": "Edge Application",
        "delivery_protocol": "http",
        "active": true,
        "application_acceleration": false,
        "caching": true,
        "device_detection": false,
        "edge_functions": false,
        "image_optimization": false,
        "load_balancer": false
    },
    "schema_version": 3
}

3. Deleting an Edge Application

It removes an Edge Application. This operation is final, it means, there is no way to roll back the information after it has been confirmed by the user.

All information associated with this edge application will also be removed.

The API does not require confirmation in order to run this instruction.

DELETE /edge_applications/:id

Required permission: Edit Security Settings

Parameter Description Type Type of Data
Authorization
*required
Authentication through the Token, previously created through the endpoint of Token Creation. header string
Accept
*required
Details about the type of return and version. header string;
application/json;version=3
:id
*required
The id of the edge application that you plan to delete. path number

Request Example

DELETE /edge_applications/1548170897
Accept: application/json; version=3
Authorization: token 2909f3932069047f4736dc87e72baaddd19c9f75

Response Example

HTTP/2 204

4. Creating a new Edge Application

It enables you to create a new Edge Application.

POST /edge_applications

Required permission: Edit Security Settings

Parameter Description Type Type of Data
Authorization
*required
Authentication through the Token, previously created through the endpoint of Token Creation. header string
Accept
*required
Details about the type of return and version. header string;
application/json;version=3
Content-Type
*required
The type of coding used in the Body (application/json).

Example:
Content-Type: application/json
header string

Request Example

POST /edge_applications
Accept: application/json; version=3
Authorization: token cf2078926f91a6e638af3f4a6977b505edfe5941
Content-Type: application/json

{
    "name": "Nova Edge Application",
    "delivery_protocol": "http",
    "origin_type": "single_origin",
    "address": "www.new.api",
    "origin_protocol_policy": "preserve",
    "host_header": "www.new.api",
    "browser_cache_settings": "override",
    "browser_cache_settings_maximum_ttl": 20,
    "cdn_cache_settings": "honor",
    "cdn_cache_settings_maximum_ttl": 60
}

Response Example

{
    "results": {
        "id": 1555421179,
        "name": "Nova Edge Application",
        "delivery_protocol": "http",
        "active": true,
        "application_acceleration": false,
        "caching": true,
        "device_detection": false,
        "edge_functions": false,
        "image_optimization": false,
        "load_balancer": false
    },
    "schema_version": 3
}

5. Overwriting an Edge Application

It overwrites all the fields of an Edge Application, retaining the id.

If you only want to update some fields, without changing the values of the rest, consider using the PATCH method, instead of PUT.

PUT /edge_applications/:id

Required permission: Edit Security Settings

Parameter Description Type Type of Data
Authorization
*required
Authentication through the Token, previously created through the endpoint of Token Creation. header string
Accept
*required
Details about the type of return and version. header string;
application/json;version=3
Content-Type
*required
The type of coding used in the Body (application/json).

Example:
Content-Type: application/json
header string
:id
*required
The Id of the Edge Application to be overwritten. path number

Request Example

PUT /edge_applications/1555421177
Accept: application/json; version=3
Authorization: token ec6aabdc0b6bbeed826a36d8731630e36b6e3f24
Content-Type: application/json

{
    "name": "Edge application alterada pela API",
    "delivery_protocol": "http",
    "active": true,
    "application_acceleration": true,
    "caching": true,
    "device_detection": false,
    "edge_functions": false,
    "image_optimization": false,
    "load_balancer": false
}

Response Example

{
    "results": {
        "id": 1555421177,
        "name": "Edge application alterada pela API",
        "delivery_protocol": "http",
        "active": true,
        "application_acceleration": true,
        "caching": true,
        "device_detection": false,
        "edge_functions": false,
        "image_optimization": false,
        "load_balancer": false
    },
    "schema_version": 3
}

6.Updating the fields of an Edge Application

It updates one or more fields of an Edge Application, retaining the value of those fields not included.

PATCH /edge_applications/:id

Required permission: Edit Security Settings

Parameter Description Type Type of Data
Authorization
*required
Authentication through the Token, previously created through the endpoint of Token Creation. header string
Accept
*required
Details about the type of return and version. header string;
application/json;version=3
Content-Type
*required
The type of coding used in the Body (application/json).

Example:
Content-Type: application/json
header string
:id
*required
The Id of the Edge Application to be overwritten. path number

Request Example

PATCH /edge_applications/1555421177 
Accept: application/json; version=3
Authorization: token ec6aabdc0b6bbeed826a36d8731630e36b6e3f24
Content-Type: application/json

{
    "application_acceleration": true,
    "edge_functions": true,
    "image_optimization": false
}

Response Example

{
    "results": {
        "id": 1555421177,
        "name": "Edge application alterada pela API",
        "delivery_protocol": "http",
        "active": true,
        "application_acceleration": true,
        "caching": true,
        "device_detection": false,
        "edge_functions": true,
        "image_optimization": false,
        "load_balancer": false
    },
    "schema_version": 3
}

7. Support Documentation


Didn’t find what you were looking for? Open a ticket.