[Yandex Cloud documentation](../../index.md) > [Yandex Managed Service for Apache Airflow™](../index.md) > [Step-by-step guides](index.md) > Working with Apache Airflow™ interfaces

# Working with Apache Airflow™ interfaces

To work with Managed Service for Apache Airflow™, you can use the [web interface](#web-gui) or the [Apache Airflow™ API](#rest-api).

Only users with the [managed-airflow.user](../security/index.md#managed-airflow-user) role or higher can open the web interface or send an API request. The API checks the role via the [IAM token](../../iam/concepts/authorization/iam-token.md) used for authentication.

Apache Airflow™ interfaces can be accessed from the internet, so the role check provides additional security. Even if the attacker has a link to the web interface and the `admin` password for authentication, they will not have the role required to access the interface.

## Working with the web interface {#web-gui}

1. In the [management console](https://console.yandex.cloud), open the cluster page.
1. In the **Web server** field, click **Go to web server** ![start](../../_assets/console-icons/arrow-up-right-from-square.svg).
1. Enter the authentication data in the [Managed Service for Apache Airflow™ web server's](../concepts/index.md#components) web interface:

   * Login: `admin`.
   * Password: `admin` user password you set when creating the cluster.

For more on the web UI, see [this Apache Airflow™ guide](https://airflow.apache.org/docs/apache-airflow/stable/ui.html).

## Using the Apache Airflow™ API {#rest-api}

You can make [Apache Airflow™ API](https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html) requests from VMs located in your Managed Service for Apache Airflow™ cluster cloud network.

1. In the cloud network hosting the Managed Service for Apache Airflow™ cluster, create a [Linux-based](../../compute/quickstart/quick-create-linux.md) VM.
1. [Set up a NAT gateway](../../vpc/operations/create-nat-gateway.md) to connect to the VM.
1. Get an IAM token for a user account with the `managed-airflow.user` role or higher. The way you get a token depends on your account type:

   * [Yandex account](../../iam/operations/iam-token/create.md)
   * [Service account](../../iam/operations/iam-token/create-for-sa.md)
   * [Local account](../../iam/operations/iam-token/create-for-local.md)
   * [Federated account](../../iam/operations/iam-token/create-for-federation.md)

1. Make an API request, e.g., using cURL. In the authorization parameters, enter your username and password.

    Request example:

    ```bash
    curl \
        --request GET \
        'https://c-<cluster_ID>.airflow.yandexcloud.net/api/v1/dags' \
        --user 'admin:<admin_password>' \
        --header 'Content-Type: application/json' \
        --header 'X-Cloud-Authorization: Bearer <IAM_token>'
    ```

    The request returns a list of DAG files. For a response example, check this [Apache Airflow™ API guides](https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/get_dags).

{% note warning %}

To use basic authentication with the Apache Airflow™ API as in the example above, set the value of the `api.auth_backends` **:** `airflow.api.auth.backend.basic_auth` property in the **Airflow configuration** section when [creating](cluster-create.md) or [updating](cluster-update.md) the cluster. Learn more about authentication in API in [this Apache Airflow™ guide](https://airflow.apache.org/docs/apache-airflow/stable/security/api.html).

{% endnote %}