> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Manage filters, transformations, and workflows on Allium's realtime data streams.

Allium's Datastream APIs enable you to transform raw blockchain streams into actionable signals by applying custom filters and routing the results to your preferred destination.

**Supported Destinations:** Webhook endpoints, PubSub topics, Kafka topics

## How It Works

Stream transformations follow a three-step process:

1. **Filter Data Sources** - Define reusable lists of values (wallet addresses, contract addresses, token addresses)
2. **Filters** - Apply logic to check if incoming messages match your criteria
3. **Workflows** - Connect source streams, filters, and destinations together

## Key Components

<CardGroup cols={3}>
  <Card title="Filter Data Sources" icon="database" href="/api/datastreams/data-sources/create-data-source">
    Reusable value lists that act as dynamic "contains" filters for your stream
    logic
  </Card>

  <Card title="Filters" icon="filter" href="/api/datastreams/filters/create-filters">
    Rules that determine which messages pass through
  </Card>

  <Card title="Workflows" icon="diagram-project" href="/api/datastreams/workflows/create-workflow">
    Complete pipelines that connect source → filter → destination
  </Card>
</CardGroup>

## Example Use Case

**Scenario:** Monitor transactions for a specific set of DeFi protocol contracts

<Steps>
  <Step title="Create a Filter Data Source">
    [Create a data source](/api/datastreams/data-sources/create-data-source) containing your list of contract addresses:

    ```json theme={null}
    {
      "name": "defi_protocol_contracts",
      "type": "string_array",
      "values": ["0xabc...", "0xdef...", "0x123..."]
    }
    ```
  </Step>

  <Step title="Create a Filter">
    [Define filter logic](/api/datastreams/filters/create-filters) to match transactions involving these contracts:

    ```json theme={null}
    {
      "name": "defi_transactions_filter",
      "filter": {
        "field": "contract_address",
        "operator": "IN",
        "type": "data_source",
        "data_source_id": "your-data-source-id"
      }
    }
    ```
  </Step>

  <Step title="Create a Workflow">
    [Connect everything together](/api/datastreams/workflows/create-workflow) - specify your source stream, apply the filter, and route to your destination:

    ```json theme={null}
    {
      "name": "defi_monitoring_pipeline",
      "data_source_config": {
        "type": "PUBSUB",
        "topic": "ethereum.transactions"
      },
      "filter_id": "your-filter-id",
      "data_destination_config": {
        "type": "PUBSUB",
        "delivery_type": "PUSH",
        "webhook_url": "https://your-app.com/webhook"
      }
    }
    ```
  </Step>
</Steps>

## API Endpoints

Manage your stream transformations with the following endpoints:

| Component           | Available Operations                                                                                                                                                                                                                                                                                                                                                  |
| :------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Filter Data Sources | [Create](/api/datastreams/data-sources/create-data-source), [Read](/api/datastreams/data-sources/get-data-source), [Update](/api/datastreams/data-sources/update-data-source), [Delete](/api/datastreams/data-sources/delete-data-source), [List](/api/datastreams/data-sources/get-data-sources), [Get Values](/api/datastreams/data-sources/get-data-source-values) |
| Filters             | [Create](/api/datastreams/filters/create-filters), [Read](/api/datastreams/filters/get-filter), [Update](/api/datastreams/filters/update-filter), [Delete](/api/datastreams/filters/delete-filter), [List](/api/datastreams/filters/get-filters)                                                                                                                      |
| Workflows           | [Create](/api/datastreams/workflows/create-workflow), [Read](/api/datastreams/workflows/get-workflow), [Update](/api/datastreams/workflows/update-workflow), [Delete](/api/datastreams/workflows/delete-workflow), [List](/api/datastreams/workflows/get-workflows)                                                                                                   |

<Info>
  For more details on stream transformations and use cases, visit the
  [Datastreams documentation](/datastreams/transformations).
</Info>
