> ## 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.

# exports

> sift/exports/v1/exports.proto

<a name="sift_exports_v1_exports-proto" />

<a name="sift_exports_v1_exports-proto-services" />

## Services

*RPC methods exposed by this API.*

### ExportService

| Method         | Request                                         | Response                                          | Description |
| :------------- | :---------------------------------------------- | :------------------------------------------------ | :---------- |
| ExportData     | [ExportDataRequest](#exportdatarequest)         | [ExportDataResponse](#exportdataresponse)         |             |
| GetDownloadUrl | [GetDownloadUrlRequest](#getdownloadurlrequest) | [GetDownloadUrlResponse](#getdownloadurlresponse) |             |

<a name="sift_exports_v1_exports-proto-messages" />

## Messages

*Data models used across requests/responses.*

### AssetsAndTimeRange

| Field       | Type                      | Label    | Description |
| :---------- | :------------------------ | :------- | :---------- |
| asset\_ids  | string                    | repeated |             |
| start\_time | google.protobuf.Timestamp |          |             |
| stop\_time  | google.protobuf.Timestamp |          |             |

### CalculatedChannelConfig

| Field               | Type                                                                                                                                             | Label    | Description |
| :------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------- | :------- | :---------- |
| name                | string                                                                                                                                           |          |             |
| expression          | string                                                                                                                                           |          |             |
| channel\_references | [sift.calculated\_channels.v2.CalculatedChannelAbstractChannelReference](#sift-calculated_channels-v2-calculatedchannelabstractchannelreference) | repeated |             |
| units               | string                                                                                                                                           | optional |             |

### ExportDataRequest

| Field                                           | Type                                                | Label    | Description                                                                                                                                                                                                                       |
| :---------------------------------------------- | :-------------------------------------------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| oneof time\_selection. time\_range              | [TimeRange](#timerange)                             |          | If time\_range used, channel\_ids or calculated\_chanel\_configs must be provided to scope data.                                                                                                                                  |
| oneof time\_selection. runs\_and\_time\_range   | [RunsAndTimeRange](#runsandtimerange)               |          | Runs used to perform time selection and scope data. Times can optionally be provided to further scope within runs. If channel\_ids or calculated\_channel\_configs not provided, all channels from Run Assets are added to scope. |
| oneof time\_selection. assets\_and\_time\_range | [AssetsAndTimeRange](#assetsandtimerange)           |          | Assets and times provided to scope data. If channel\_ids or calculated\_channel\_configs not provided, all channels from Assets are added to scope.                                                                               |
| channel\_ids                                    | string                                              | repeated |                                                                                                                                                                                                                                   |
| calculated\_channel\_configs                    | [CalculatedChannelConfig](#calculatedchannelconfig) | repeated |                                                                                                                                                                                                                                   |
| output\_format                                  | [ExportOutputFormat](#exportoutputformat)           |          |                                                                                                                                                                                                                                   |
| export\_options                                 | [ExportOptions](#exportoptions)                     |          |                                                                                                                                                                                                                                   |

### ExportDataResponse

| Field            | Type   | Label | Description                                                                                                                                                       |
| :--------------- | :----- | :---- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| presigned\_url   | string |       | Pre-signed URL of exported zip containing export files. This will be blank if the job is processed as a background job, in which case `job_id` will be non-empty. |
| job\_id          | string |       | This will be non-empty if the export is being processed asynchronously in a background job.                                                                       |
| service\_message | string |       | Optional message for the client to display in success or error notification (e.g. exclusions or 403 reason).                                                      |

### ExportOptions

| Field                    | Type | Label | Description                                                                                                                 |
| :----------------------- | :--- | :---- | :-------------------------------------------------------------------------------------------------------------------------- |
| use\_legacy\_format      | bool |       | Whether to use legacy format string for channel headers which contains key-value metadata.                                  |
| simplify\_channel\_names | bool |       | Whether to simplify channel names by removing the component part of the name if name is unique in export file               |
| combine\_runs            | bool |       | Whether to combine runs. e.g. channels from the same asset in different runs will be combined into a single column of data. |
| split\_export\_by\_asset | bool |       | Split each asset into their own export file                                                                                 |
| split\_export\_by\_run   | bool |       | Split each run into their own export file                                                                                   |

### GetDownloadUrlRequest

| Field   | Type   | Label | Description |
| :------ | :----- | :---- | :---------- |
| job\_id | string |       |             |

### GetDownloadUrlResponse

| Field            | Type   | Label | Description                                                                  |
| :--------------- | :----- | :---- | :--------------------------------------------------------------------------- |
| presigned\_url   | string |       |                                                                              |
| service\_message | string |       | Optional message for the client to display in success or error notification. |

### RunsAndTimeRange

| Field       | Type                      | Label    | Description |
| :---------- | :------------------------ | :------- | :---------- |
| run\_ids    | string                    | repeated |             |
| start\_time | google.protobuf.Timestamp |          |             |
| stop\_time  | google.protobuf.Timestamp |          |             |

### TimeRange

| Field       | Type                      | Label | Description |
| :---------- | :------------------------ | :---- | :---------- |
| start\_time | google.protobuf.Timestamp |       |             |
| stop\_time  | google.protobuf.Timestamp |       |             |

<a name="sift_exports_v1_exports-proto-enums" />

## Enums

*Allowed constant values used in message fields.*

### ExportOutputFormat

| Name                                | Number | Description |
| :---------------------------------- | :----- | :---------- |
| EXPORT\_OUTPUT\_FORMAT\_UNSPECIFIED | 0      |             |
| EXPORT\_OUTPUT\_FORMAT\_CSV         | 1      |             |
| EXPORT\_OUTPUT\_FORMAT\_SUN         | 2      |             |
| EXPORT\_OUTPUT\_FORMAT\_PARQUET     | 3      |             |
