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

# Influx Line Protocol reference

> Configuration and examples for streaming data to Sift using an Influx client

<Info>
  **Credentials**

  Before using this method, retrieve your API key and the appropriate Sift URL for your environment. See [Authentication](/documentation/manage/set-up-api-access).
</Info>

Sift accepts data from any Influx client. Use your Sift API key as the Influx authentication token. Pass a small configuration object as a base64-encoded JSON string via the Influx `org` property.

## Configuration object

```json theme={null}
{
  "run": {
    "name": "your run name",
    "run_key": "a unique identifier for this run"
    "tags": ["any", "tags", "associated", "with", "this", "run"]
  },
  "map_bucket_to_tag": "",
  "omit_bucket": false,
  "asset_source_tags": ["tag-1", "tag-2"]
}
```

### Configuration fields

| Field               | Required                 | Description                                                                                                                                                                                  |
| ------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `run`               | Optional                 | Run information. If omitted, data is not grouped into a Run.                                                                                                                                 |
| `run.name`          | Required if `run` is set | The name of the Run.                                                                                                                                                                         |
| `run.run_key`       | Required if `run` is set | A unique key to differentiate runs with the same name.                                                                                                                                       |
| `run.tags`          | Optional                 | Tags associated with the Run. Cannot contain spaces.                                                                                                                                         |
| `map_bucket_to_tag` | Optional                 | Renames the Influx bucket tag key. By default, the bucket is added using the key `"bucket"`.                                                                                                 |
| `omit_bucket`       | Optional                 | If `true`, removes the bucket from the Influx tags. Default is `false`.                                                                                                                      |
| `asset_source_tags` | Required                 | The Influx tags used to construct the asset name. Tag values are joined with an underscore in the order listed. Use `"bucket"` (or the renamed key) to include the bucket in the asset name. |

## How Influx data maps to Sift

* The Influx **measure** maps to the Sift channel **component**.
* Influx **tags** that are not used to construct the asset name become part of the channel component.
* Each Influx **field** becomes an individual Sift channel.

## Example

Given the following Influx line protocol sent to the `CA` bucket:

```
readings,name=truck_0,fleet=West,model=G-2000,device_version=v2.3 latitude=88.177,longitude=168.95208,elevation=420,velocity=22,heading=61 1451692700000000000
```

And the following configuration object:

```json theme={null}
{
  "run": {
    "name": "vehicle stats",
    "key": "372f7888-ad93-4189-b577-1644ca503413"
  },
  "asset_source_tags": ["fleet", "bucket", "name"]
}
```

Sift generates the following channels:

```
asset:     "West_CA_truck_0"
component: "readings(device_version:v2.3)(model:G-2000)"
timestamp: "2023-08-09T15:24:15+00:00"
```

| Channel name | Value     |
| ------------ | --------- |
| `latitude`   | 88.177    |
| `longitude`  | 168.95208 |
| `elevation`  | 420       |
| `velocity`   | 22        |
| `heading`    | 61        |

The asset name `West_CA_truck_0` is constructed from the `fleet`, `bucket`, and `name` tag values joined with underscores, in the order listed in `asset_source_tags`. The tags `model` and `device_version` are not in `asset_source_tags`, so they become part of the channel component.

## Related topics

* [Choose a streaming method](/documentation/ingest/stream/choose-a-streaming-method)
* [Organize streamed data into Assets and Runs](/documentation/ingest/stream/organize-streamed-data-into-assets-and-runs)
