# Alation

Use Alation's [data products](https://docs.alation.com/en/latest/DataProductsandMarketplace/index.html) in their Marketplace or assets in their catalog and configure the access request links so users can click a button directly in Alation to request access. You may also opt to add the access request links to data object descriptions.

## Requirements

* [Connection registered in Immuta](https://documentation.immuta.com/saas/configuration/integrations/data-and-integrations#registering-a-connection)
* Alation user with Marketplace Admin if you are setting up links within Alation data products.

## Set up access request links for Alation data products in the Alation Marketplace

1. Publish a data product in Immuta, and take note of the data product ID.
2. Follow the Alation documentation to [Create a data product](https://docs.alation.com/en/latest/DataProductsandMarketplace/CreateDataProductInUserInterface.html), and enter the Immuta data product ID as the **productId** field.
3. Follow the Alation documentation to [Add delivery systems](https://www.alation.com/docs/en/latest/DataProductsandMarketplace/GetStartedWithDataProducts.html#step-3-add-delivery-systems) to your new data product. Insert the [access request link](https://documentation.immuta.com/saas/request/configure/how-to-guides/configure-access-request-links/..#access-request-links-for-data-products) for the Immuta data product aligning with the Alation data product in the **URI** field as seen below and update the **accessRequestInstruction** field to match the sample provided:

```yaml
deliverySystems:
  immuta:
    accessRequestInstruction:
      provider: Immuta
      type: external
      uri: "https://app.immutacloud.com/marketplace/data-product/<data product ID>/request-access?type=data-access"
    type: api
    uri: "https://app.immutacloud.com/marketplace/data-product/<data product ID>/request-access?type=data-access"
```

## Set up access request links for Alation assets

Set up your access request links to use the Alation [*Open With*](https://developer.alation.com/dev/reference/open-with-registration) functionality.

1. To set up access request links for access requests under the **Open with** button, [use the Alation API](https://developer.alation.com/dev/reference/open-with-registration) to make a call to the `https://<your_alation_url>/integration/v2/catalog_chooser/register_opener/` endpoint with the following payload:

   ```
   {
     "name": "Request Access in Immuta",
     "description": "Request access via Immuta Marketplace",
     "endpoint": "https://app.immutacloud.com/marketplace/request?requestType=data-access&host=${dataSource.host}&technology=${dataSource.type}&fullyQualifiedName=${qualifiedName}",
     "endpoint_type": "NAVIGATE",
     "accept_object_types": ["table"],
     "accept_data_source_types": ["snowflake", "databricks", "postgresql", "redshift", "bigquery", "teradata", "presto"],
     "accept_file_system_types": []
   }
   ```
2. To set up access request links for masking exception requests under the **Open with** button, [use the Alation API](https://developer.alation.com/dev/reference/open-with-registration) to make a call to the `https://<your_alation_url>/integration/v2/catalog_chooser/register_opener/` endpoint with the following payload:

   ```
   {
     "name": "Request Masking Exception in Immuta",
     "description": "Request masking exception via Immuta Marketplace",
     "endpoint": "https://app.immutacloud.com/marketplace/request?requestType=masking-exception&fullyQualifiedName=${qualifiedName}",
     "endpoint_type": "NAVIGATE",
     "accept_object_types": ["attribute"],
     "accept_data_source_types": ["snowflake", "databricks", "redshift", "bigquery", "teradata", "presto"],
     "accept_file_system_types": []
   }
   ```

This will automatically update all the supported data sources with the request access link to their corresponding asset under the **Open with** button in Alation.

{% hint style="warning" %}
Alation's *Open With* functionality is not supported at the database or schema level.
{% endhint %}
