---
name: azion-how-to-bind-an-edge-service-to-an-edge-node
description: >-
  Learn how to deploy and manage Edge Services via Azion API and Azion Console, effectively binding services to edge nodes for optimized performance.
---

# How to bind an edge service to an edge node

**Edge Services** allows orchestrated services to be managed on your own edge nodes. To do so, you must have an edge service created and to bind it to an edge node.

[Go to how to create an edge service](/en/documentation/guides/application-development/automation/create-edge-service/)

You can create a relation between an edge node and an edge service using:

- [Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/)
- [Azion API](https://api.azion.com/)

**Console**

1. Access [Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/).
2. On the upper-left corner of the page, open the **Products menu**, represented by three horizontal lines, and then select **Edge Nodes**.
3. Select the edge node you want to bind to a service.
4. In the **Main Settings** tab, look for the option **Add-On Services** under **Orchestration Modules** and activate it.
5. Go to the **Services** tab and click the **+ Service** button.
6. Choose the service you want to bind and add the variables if needed.
7. Click the **Save** button.

**API**

1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID you wish to bind to an edge service:

```bash
curl --location 'https://api.azionapi.net/edge_nodes/' \
--header 'Accept: application/json; version=3' \
--header 'Authorization: Token [TOKEN VALUE]'
```

2. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge service ID you wish to bind to an edge node:

```bash
curl --location 'https://api.azionapi.net/edge_services/' \
--header 'Accept: application/json; version=3' \
--header 'Authorization: Token [TOKEN VALUE]'
```

3. Run the following `POST` request in your terminal:

```bash
curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \
--header 'Accept: application/json; version=3' \
--header 'Authorization: Token [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
  "service_id": 0,
  "variables": [
    {
      "name": "string",
      "value": "string"
    }
  ]
}'
```

Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:id` with the ID of the edge node informing the edge node ID and inform the following properties in the request body:

| Property     | Description                                                     | Required               |
| ------------ | --------------------------------------------------------------- | ---------------------- |
| `service_id` | ID of the edge service being bound to the edge node             | Yes                    |
| `variables`  | Variables to be replaced during the processing on the edge node | No (requires checking) |

Now, your edge node and your edge service have a relation between them and are ready to be orchestrated.

> **Tip**
>
> Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API.
