Skip to main content
POST
/
nessie
/
pipeline
/
create
Create Pipeline
curl --request POST \
  --url https://{server}.mixpanel.com/api/2.0/nessie/pipeline/create \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data type=gcs-raw \
  --data from_date=2023-12-25 \
  --data 'gcs_bucket=<string>' \
  --data project_id=123 \
  --data trial=false \
  --data data_source=events \
  --data to_date=2023-12-25 \
  --data frequency=daily \
  --data 'events=<string>' \
  --data 'where=<string>' \
  --data data_format=json \
  --data 'gcs_prefix=<string>'
{
  "pipeline_names": [
    "trial-events-daily-bigquery-monoschema",
    "trial-people-daily-bigquery-monoschema"
  ],
  "bigquery_dataset_name": "https://bigquery.cloud.google.com/dataset/mixpanel-prod-1:sample_dataset_name"
}
This request creates an export pipeline. The type parameter defines the kind of pipeline that is initiated. Note that only 2 recurring and 1 non-recurring events pipelines (data_source: events) are allowed per project. Create API returns the name of the pipeline created. Use the name of the pipeline to check the status of or cancel the pipeline.
Important: For BigQuery pipelines, gcp_project and bq_dataset_name are required fields. Mixpanel-hosted BigQuery is not supported.
Important: For Snowflake pipelines, customer-hosted credentials (snowflake_account_name, snowflake_warehouse, snowflake_storage_integration, snowflake_user, snowflake_password, snowflake_role, snowflake_database, snowflake_schema) are required. Only password-based authentication is supported. Mixpanel-hosted Snowflake is not supported.

Authorizations

Authorization
string
header
required

Service Account

Body

application/x-www-form-urlencoded
type
string
default:gcs-raw
required
from_date
string<date>
required

The starting date of the export window. It is formatted as YYYY-MM-DD and cannot be more than six months in the past.

If trial is set to true this will default to the previous day; otherwise, it is a required parameter.

gcs_bucket
string
required

The GCS bucket to export the Mixpanel data to.

gcs_region
enum<string>
required

The GCS region for the bucket.

Available options:
northamerica-northeast1,
us-central1,
us-east1,
us-east4,
us-west1,
us-west2,
southamerica-east1,
europe-north1,
europe-west1,
europe-west2,
europe-west3,
europe-west4,
europe-west6,
asia-east1,
asia-east2,
asia-northeast1,
asia-northeast2,
asia-northeast3,
asia-south1,
asia-southeast1,
australia-southeast1
project_id
number

Your project id (must be specified when using service account based authentication)

trial
boolean
default:false

Default: false

A trial pipeline will be created if value is true.

The trial exports all of your events and user data for thirty calendar days, starting from one day before the API call was made. A trial pipeline has default values for the following parameters:

data_source: events from_date: <defaults to previous day> to_date: <no value> frequency: daily events: <no value>

data_source
enum<string>
default:events

Default: events

data_source In this type of pipeline it can only be events which exports Mixpanel event data.

Available options:
events
to_date
string<date>

The ending date of the export window. It is formatted as YYYY-MM-DD. The export will continue indefinitely if to_date is empty.

frequency
enum<string>
default:daily

Default: daily

frequency can be either hourly or daily. hourly exports the data every hour. daily exports the data at midnight (based on the projects timezone). frequency should only be passed if your export window is indefinite.

Available options:
daily,
hourly
events
string

A whitelist for the event(s) you intend to export. For multiple events, you will need to pass in each event name as separate events parameters like so: --data 'events=event1' \ --data 'events=event2'

All events in the project will be exported if no events are specified.

where
string

A selector expression used to filter by events data, such as event properties. Learn more about how to construct event selector expressions here.

data_format
enum<string>
default:json

Default: json

The file format of the exported data. data_format for this pipeline type can be only json .

Available options:
json
gcs_prefix
string

The GCS path prefix of the bucket.

Response

Returns the name of the pipeline created. Use the name of the pipeline to check the status of or cancel the pipeline.