# Alation

> Search and curate Alation's data catalog: tables and columns, documents and glossary terms, trust flags, tags, stewards and other fields, and conversations.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/alation

## Actions

### Add tag

Tag a catalog object. A tag that doesn't exist yet is created.

**Inputs**

- Tag (`tag_name`, text, required): The tag's name, exactly as it is written. A new name creates the tag.
- Object type (`object_type`, text, required): The kind of catalog object. One of: `table`, `attribute` (Column), `schema`, `data` (Data source), `glossary_term` (Document or glossary term), `glossary_v3` (Folder or glossary), `business_policy` (Business policy).
- Object ID (`object_id`, number, required): The object's ID in Alation: the number in its catalog address, as in /table/123/.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "description": "example",
    "id": 1,
    "name": "example",
    "number_of_objects_tagged": 1,
    "ts_created": "example",
    "url": "example"
  }
}
```

### Add trust flag

Endorse a catalog object, or warn people about it or deprecate it, with the reason shown on its page.

**Inputs**

- Flag (`flag_type`, text, required): Endorsement says the object is trusted; a warning or deprecation says why not to rely on it. One of: `ENDORSEMENT`, `WARNING`, `DEPRECATION`.
- Object type (`object_type`, text, required): The kind of catalog object. One of: `table`, `attribute` (Column), `schema`, `data` (Data source), `glossary_term` (Document or glossary term), `glossary_v3` (Folder or glossary), `business_policy` (Business policy).
- Object ID (`object_id`, number, required): The object's ID in Alation: the number in its catalog address, as in /table/123/.
- Reason (`reason`, text): Why. Needed for a warning or deprecation; leave empty for an endorsement.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "flag_reason": "example",
    "flag_type": "example",
    "id": 1,
    "is_propagated": true,
    "subject": {
      "id": 1,
      "is_deleted": true,
      "otype": "example",
      "url": "example"
    },
    "ts_created": "example",
    "user": {
      "display_name": "example",
      "id": 1,
      "url": "example"
    }
  }
}
```

### Create conversation

Start a conversation in Alation, on a catalog object or on its own, for its stewards and watchers to answer.

**Inputs**

- Subject (`subject`, text, required): The conversation's subject.
- Message (`body`, text, required): The first message.
- Object type (`object_type`, text): The kind of catalog object the conversation is about. Leave empty for none. One of: `table`, `attribute` (Column), `schema`, `data` (Data source), `glossary_term` (Document or glossary term), `glossary_v3` (Folder or glossary), `business_policy` (Business policy).
- Object ID (`object_id`, number): The object's ID in Alation: the number in its catalog address, as in /table/123/.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "author": {
      "display_name": "example",
      "id": 1,
      "is_active": true,
      "url": "example"
    },
    "body": {
      "id": 1,
      "last_updated": "example",
      "likes": 1,
      "replies_count": 1,
      "text": "example"
    },
    "created": "example",
    "id": 1,
    "is_deleted": true,
    "last_updated": "example",
    "reference": {
      "id": 1,
      "name": "example",
      "otype": "example",
      "title": "example",
      "url": "example"
    },
    "status": "example",
    "subject": "example",
    "url": "example"
  }
}
```

### Create document

Add a document, such as a glossary term, to a Document Hub folder, and return it once Alation has saved it.

**Inputs**

- Folder (`folder_id`, number, required): The Document Hub folder (in a glossary, the glossary itself).
- Title (`title`, text, required): The document's title.
- Description (`description`, text): The document's text. Simple HTML such as <p> and <b> is kept.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "document": {
      "child_documents_count": 1,
      "custom_fields": [
        {
          "field_id": 1,
          "field_name": "example",
          "value": "example"
        }
      ],
      "deleted": true,
      "description": "example",
      "document_hub_id": 1,
      "id": 1,
      "nav_link_folder_ids": [
        1
      ],
      "parent_document_id": 1,
      "parent_folder_id": 1,
      "template_id": 1,
      "title": "example",
      "ts_created": "example",
      "ts_updated": "example"
    },
    "job_id": 1,
    "msg": "example",
    "result": "example",
    "status": "example"
  }
}
```

### Delete conversation

Delete a conversation and its replies.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's ID, from Create conversation or the conversation's address.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "conversation_id": 1
  }
}
```

### Delete document

Delete a document or glossary term. Alation keeps it among deleted documents.

**Inputs**

- Document ID (`document_id`, number, required): The document or glossary term's ID, from List documents.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "deleted_document_count": 1,
    "deleted_document_ids": [
      1
    ]
  }
}
```

### Get field values

Read an object's field values, such as its stewards, or one field's value.

**Inputs**

- Object type (`object_type`, text, required): The kind of catalog object. One of: `table`, `attribute` (Column), `schema`, `data` (Data source), `glossary_term` (Document or glossary term), `glossary_v3` (Folder or glossary), `business_policy` (Business policy).
- Object ID (`object_id`, number, required): The object's ID in Alation: the number in its catalog address, as in /table/123/.
- Field (`field_id`, number): Only this field. Leave empty for every field.

**Outputs**

- `data` (list): The response from Alation.

**Example output**

```json
{
  "data": [
    {
      "field_id": 1,
      "oid": "example",
      "otype": "example",
      "ts_updated": "example",
      "value": "example"
    }
  ]
}
```

### List columns

List a table's columns, with their types, titles, descriptions and custom fields.

**Inputs**

- Data source (`ds_id`, number, required): The data source.
- Table (`table_id`, number, required): The table.
- Name contains (`name_contains`, text): Only columns whose name contains this text.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Skip (`skip`, number): How many to skip from the start, to read the next page. Leave empty to start at the first. At least 0.

**Outputs**

- `data` (list): The response from Alation.

**Example output**

```json
{
  "data": [
    {
      "column_comment": "example",
      "column_type": "example",
      "custom_fields": [
        {
          "field_id": 1,
          "field_name": "example",
          "value": "example"
        }
      ],
      "description": "example",
      "ds_id": 1,
      "id": 1,
      "key": "example",
      "name": "example",
      "nullable": true,
      "position": "example",
      "schema_id": 1,
      "table_id": 1,
      "table_name": "example",
      "title": "example",
      "url": "example"
    }
  ]
}
```

### List custom fields

List the fields Alation's catalog pages can carry, with their types and options.

**Inputs**

- Field type (`field_type`, text): Only fields of this type. One of: `RICH_TEXT` (Rich text), `PICKER`, `MULTI_PICKER` (Multi-select picker), `DATE`, `OBJECT_SET` (Object or people set).
- Name contains (`name_contains`, text): Only fields whose name contains this text.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Skip (`skip`, number): How many to skip from the start, to read the next page. Leave empty to start at the first. At least 0.

**Outputs**

- `data` (list): The response from Alation.

**Example output**

```json
{
  "data": [
    {
      "allow_multiple": true,
      "allowed_otypes": [
        "example"
      ],
      "builtin_name": "example",
      "field_type": "example",
      "id": 1,
      "name_plural": "example",
      "name_singular": "example",
      "options": [
        "example"
      ],
      "tooltip_text": "example"
    }
  ]
}
```

### List data sources

List the databases and warehouses catalogued in Alation.

**Inputs**

- Include hidden (`include_hidden`, true/false): Also list data sources hidden from Alation's pages.

**Outputs**

- `data` (list): The response from Alation.

**Example output**

```json
{
  "data": [
    {
      "connector_id": 1,
      "dbtype": "example",
      "deleted": true,
      "description": "example",
      "id": 1,
      "is_hidden": true,
      "latest_extraction_successful": true,
      "latest_extraction_time": "example",
      "owner_ids": [
        1
      ],
      "private": true,
      "title": "example",
      "url": "example"
    }
  ]
}
```

### List documents

List the documents and glossary terms in a folder, with their descriptions and custom fields.

**Inputs**

- Folder (`folder_id`, number, required): The Document Hub folder (in a glossary, the glossary itself).
- Search (`search`, text): Only documents whose title or description contains this text.
- Deleted only (`deleted`, true/false): List deleted documents instead.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Skip (`skip`, number): How many to skip from the start, to read the next page. Leave empty to start at the first. At least 0.

**Outputs**

- `data` (list): The response from Alation.

**Example output**

```json
{
  "data": [
    {
      "child_documents_count": 1,
      "custom_fields": [
        {
          "field_id": 1,
          "field_name": "example",
          "value": "example"
        }
      ],
      "deleted": true,
      "description": "example",
      "document_hub_id": 1,
      "id": 1,
      "nav_link_folder_ids": [
        1
      ],
      "parent_document_id": 1,
      "parent_folder_id": 1,
      "template_id": 1,
      "title": "example",
      "ts_created": "example",
      "ts_updated": "example"
    }
  ]
}
```

### List folders

List Document Hub folders, such as glossaries, with how many documents each holds.

**Inputs**

- Search (`search`, text): Only folders whose title or description contains this text.
- Inside folder (`parent_folder_id`, number): Only the folders directly inside this folder.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Skip (`skip`, number): How many to skip from the start, to read the next page. Leave empty to start at the first. At least 0.

**Outputs**

- `data` (list): The response from Alation.

**Example output**

```json
{
  "data": [
    {
      "child_documents_count": 1,
      "child_folders_count": 1,
      "deleted": true,
      "description": "example",
      "document_hub_id": 1,
      "id": 1,
      "parent_folder_id": 1,
      "template_id": 1,
      "title": "example",
      "ts_created": "example",
      "ts_updated": "example"
    }
  ]
}
```

### List schemas

List a data source's schemas, with their titles, descriptions and custom fields.

**Inputs**

- Data source (`ds_id`, number, required): The data source.
- Name contains (`name_contains`, text): Only schemas whose name contains this text (case matters).
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Skip (`skip`, number): How many to skip from the start, to read the next page. Leave empty to start at the first. At least 0.

**Outputs**

- `data` (list): The response from Alation.

**Example output**

```json
{
  "data": [
    {
      "custom_fields": [
        {
          "field_id": 1,
          "field_name": "example",
          "value": "example"
        }
      ],
      "description": "example",
      "ds_id": 1,
      "id": 1,
      "key": "example",
      "name": "example",
      "title": "example",
      "url": "example"
    }
  ]
}
```

### List tables

List a data source's tables and views, with their titles, descriptions and custom fields.

**Inputs**

- Data source (`ds_id`, number, required): The data source.
- Schema (`schema_id`, number): Only tables in this schema.
- Name contains (`name_contains`, text): Only tables whose name contains this text.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Skip (`skip`, number): How many to skip from the start, to read the next page. Leave empty to start at the first. At least 0.

**Outputs**

- `data` (list): The response from Alation.

**Example output**

```json
{
  "data": [
    {
      "custom_fields": [
        {
          "field_id": 1,
          "field_name": "example",
          "value": "example"
        }
      ],
      "description": "example",
      "ds_id": 1,
      "id": 1,
      "key": "example",
      "name": "example",
      "schema_id": 1,
      "schema_name": "example",
      "table_comment": "example",
      "table_type": "example",
      "title": "example",
      "url": "example"
    }
  ]
}
```

### List tagged objects

List the objects that carry a tag, most recently tagged first.

**Inputs**

- Tag (`tag_name`, text, required): The tag's name, exactly as it is written. A new name creates the tag.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Skip (`skip`, number): How many to skip from the start, to read the next page. Leave empty to start at the first. At least 0.

**Outputs**

- `data` (list): The response from Alation.

**Example output**

```json
{
  "data": [
    {
      "subject": {
        "id": 1,
        "otype": "example",
        "url": "example"
      },
      "ts_tagged": "example"
    }
  ]
}
```

### List trust flags

List endorsements, warnings and deprecations, for one object or the whole catalog.

**Inputs**

- Object type (`object_type`, text): The kind of catalog object. One of: `table`, `attribute` (Column), `schema`, `data` (Data source), `glossary_term` (Document or glossary term), `glossary_v3` (Folder or glossary), `business_policy` (Business policy).
- Object ID (`object_id`, number): The object's ID in Alation: the number in its catalog address, as in /table/123/.
- Include inherited (`include_propagated`, true/false): Also list flags an object inherits from the schema or data source above it.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Skip (`skip`, number): How many to skip from the start, to read the next page. Leave empty to start at the first. At least 0.

**Outputs**

- `data` (list): The response from Alation.

**Example output**

```json
{
  "data": [
    {
      "flag_reason": "example",
      "flag_type": "example",
      "id": 1,
      "is_propagated": true,
      "subject": {
        "id": 1,
        "is_deleted": true,
        "otype": "example",
        "url": "example"
      },
      "ts_created": "example",
      "user": {
        "display_name": "example",
        "id": 1,
        "url": "example"
      }
    }
  ]
}
```

### List users

List Alation's users, with their emails and when they last signed in. Needs to be connected by a Server Admin.

**Inputs**

- Email contains (`email_contains`, text): Only users whose email address contains this text.
- Name contains (`name_contains`, text): Only users whose name contains this text.
- Signed in since (`signed_in_since`, date): Only users who last signed in on or after this day.
- Sort by (`order_by`, text): The order to list users in. Leave empty for newest first. One of: `-ts_created` (Newest first), `display_name` (Name, A to Z), `email` (Email, A to Z), `-last_login` (Most recently signed in first).
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 100. From 1 to 100.
- Skip (`skip`, number): How many to skip from the start, to read the next page. Leave empty to start at the first. At least 0.

**Outputs**

- `data` (list): The response from Alation.

**Example output**

```json
{
  "data": [
    {
      "display_name": "example",
      "email": "example",
      "id": 1,
      "last_login": "example",
      "profile_id": 1,
      "ts_created": "example",
      "url": "example"
    }
  ]
}
```

### Remove tag

Take a tag off a catalog object. A tag left on nothing is deleted.

**Inputs**

- Tag (`tag_name`, text, required): The tag's name, exactly as it is written. A new name creates the tag.
- Object type (`object_type`, text, required): The kind of catalog object. One of: `table`, `attribute` (Column), `schema`, `data` (Data source), `glossary_term` (Document or glossary term), `glossary_v3` (Folder or glossary), `business_policy` (Business policy).
- Object ID (`object_id`, number, required): The object's ID in Alation: the number in its catalog address, as in /table/123/.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "object_id": 1,
    "object_type": "example",
    "tag_name": "example"
  }
}
```

### Remove trust flag

Remove an endorsement, warning or deprecation. Alation lets you remove flags you added, or any flag as an admin.

**Inputs**

- Flag ID (`flag_id`, number, required): The flag's ID, from Add trust flag or List trust flags.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {}
}
```

### Reply to conversation

Post a reply in a conversation.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's ID, from Create conversation or the conversation's address.
- Reply (`text`, text, required): The reply.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "author": {
      "display_name": "example",
      "id": 1,
      "is_active": true,
      "url": "example"
    },
    "conversation_id": 1,
    "created": "example",
    "id": 1,
    "is_deleted": true,
    "last_updated": "example",
    "parent_post_id": 1,
    "text": "example",
    "type": "example"
  }
}
```

### Search catalog

Search Alation's catalog the way its search bar does, for tables, columns, documents, reports and more.

**Inputs**

- Search for (`query`, text): What to search for. Put a phrase in quotes for an exact match, or use * as a wildcard. Leave empty to list everything the filters allow.
- Object types (`object_types`, list): Only these kinds of object. Leave empty for every kind. One or more of: `table`, `column`, `schema`, `datasource` (Data source), `glossary_term` (Document or glossary term), `glossary_v3` (Folder or glossary), `report_object` (BI report or dashboard), `query_or_statement` (Query), `file`, `user`.
- Trust flags (`flags`, list): Only objects with one of these trust flags. One or more of: `Endorsement` (Endorsed), `Warning` (Has a warning), `Deprecation` (Deprecated).
- Limit (`limit`, number): How many results to return, up to 100. Leave empty for 20. From 1 to 100.
- Skip (`offset`, number): How many results to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "full_search_url": "example",
    "limit": 1,
    "offset": 1,
    "results": [
      {
        "breadcrumbs": [
          {
            "id": 1,
            "name": "example",
            "otype": "example",
            "title": "example"
          }
        ],
        "flags": [
          "example"
        ],
        "id": 1,
        "name": "example",
        "otype": "example",
        "text": "example",
        "title": "example",
        "url": "example"
      }
    ],
    "total": 1
  }
}
```

### Set field value

Set one field on a catalog object, replacing its value: text, a picker option, a date, or people such as stewards.

**Inputs**

- Object type (`object_type`, text, required): The kind of catalog object. One of: `table`, `attribute` (Column), `schema`, `data` (Data source), `glossary_term` (Document or glossary term), `glossary_v3` (Folder or glossary), `business_policy` (Business policy).
- Object ID (`object_id`, number, required): The object's ID in Alation: the number in its catalog address, as in /table/123/.
- Field (`field_id`, number, required): The field, such as Steward or a custom field of your own. Title is 3 and Description is 4.
- Value (`value`, text, required): The new value. For a multi-select picker, separate options with commas; for a date, use YYYY-MM-DD; for people or objects, list each as type and ID, such as user:12, groupprofile:3.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "field_values_received": 1,
    "new_field_values": 1,
    "updated_field_values": 1
  }
}
```

### Update column

Change a column's title or description in Alation. Fields left empty stay as they are.

**Inputs**

- Data source (`ds_id`, number, required): The data source.
- Table (`table_id`, number, required): The table.
- Column (`column_id`, number, required): The column.
- Title (`title`, text): The new title.
- Description (`description`, text): The new description. Simple HTML such as <p> and <b> is kept.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "job_id": 1,
    "msg": "example",
    "result": "example",
    "status": "example"
  }
}
```

### Update document

Change a document's title or description. Fields left empty stay as they are.

**Inputs**

- Document ID (`document_id`, number, required): The document or glossary term's ID, from List documents.
- Title (`title`, text): The new title.
- Description (`description`, text): The new description. Simple HTML such as <p> and <b> is kept.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "job_id": 1,
    "msg": "example",
    "result": "example",
    "status": "example"
  }
}
```

### Update table

Change a table's title or description in Alation. Fields left empty stay as they are.

**Inputs**

- Data source (`ds_id`, number, required): The data source.
- Table (`table_id`, number, required): The table.
- Title (`title`, text): The new title.
- Description (`description`, text): The new description. Simple HTML such as <p> and <b> is kept.

**Outputs**

- `data` (object): The response from Alation.

**Example output**

```json
{
  "data": {
    "job_id": 1,
    "msg": "example",
    "result": "example",
    "status": "example"
  }
}
```
