# How to provision files

import Tabs from '~/components/tabs/Tabs'


To be able to orchestrate services on your device, you need to configure all the resources. These resources can be: 

- **Text**: for content being copied as plain text to the edge node.
- **Shell Script**: for resources that will be installed and run according to the selected *trigger*.

You can create a resource using:

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

---

<Tabs client:visible>
    <Fragment slot="tab.console">Console</Fragment>
    <Fragment slot="tab.api">API</Fragment>

<Fragment slot="panel.console">
1. Access [Azion Console](/en/documentation/products/guides/how-to-access-azion-console/).
2. On the top-left corner, select the **Products menu**, represented by three horizontal lines, and then **Edge Services**.
3. Select the edge service to which you want to add a resource.
4. Go to the **Resources** tab and click on the **+ Resource** button.
5. Enter the **Path** of the resource.
6. Choose the type **Text**.
7. Add the following content to the content block: 

```bash
My name is {{name}}, and this is my first added resource
```

:::note 
The tag `{{name}}` will be replaced by the environment configured for the service or the variable configured on the node. The edge node variable will override the variable configure on the edge service.
:::

8. Click the **Save** button.
</Fragment>

<Fragment slot="panel.api">
1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/) and retrieve the edge service ID:

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

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

```bash 
curl --location 'https://api.azionapi.net/edge_services/:id/resources' \
--header 'Accept: application/json; version=3' \
--header 'Authorization: Token [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
  "content_type": "Text",
  "name": "/resource",
  "content": "My name is {{name}}, and this is my first added resource"
}'
```

Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/), `:id` with the ID of the edge service and inform the following parameters in the request body:

| Property | Description | Required | 
| - | - | - | 
| `content_type` | Content type of the resource being created | Yes |
| `name` | Name of the resource being created | Yes |
| `content` | Content that defines actions performed when the resource state changes in the edge node | Yes |

Now, your resource is created and able to work with the edge nodes related to the service in specific. 

:::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.
:::
</Fragment>

</Tabs>

import DocButton from '~/components/webkit/DocButton.vue';

<DocButton href="/en/documentation/products/guides/deploy/work-with-variables/" label="Go to Work with Variables Guide" kind="secondary" target="_blank" size="medium" />