Mixpanel · Arazzo Workflow

Mixpanel GDPR Data Retrieval Flow

Version 1.0.0

Submit a GDPR/CCPA retrieval request and poll for the download URL, branching on completion.

1 workflow 1 source API 1 provider
View Spec View on GitHub AnalyticsData AnalysisEvent TrackingProduct AnalyticsUser BehaviorArazzoWorkflows

Provider

mixpanel

Workflows

gdpr-retrieval-flow
Create a data retrieval request then check its status for the download URL.
Posts a retrieval request to /data-retrievals/v3.0, then polls /data-retrievals/v3.0/{taskId}, branching on SUCCESS versus still-pending.
2 steps inputs: complianceType, distinctIds, projectToken outputs: downloadUrl, taskId, taskStatus
1
createRetrieval
createRetrievalRequest
Submit a GDPR or CCPA data retrieval request. Authentication uses an OAuth bearer token; the project token is passed as the token query parameter.
2
checkRetrieval
checkRetrievalStatus
Check the status of the retrieval task. Branches to completion when the task status is SUCCESS and a download URL is available, otherwise reports it is still pending.

Source API Descriptions

Arazzo Workflow Specification

mixpanel-gdpr-retrieval-flow-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Mixpanel GDPR Data Retrieval Flow
  summary: Submit a GDPR/CCPA retrieval request and poll for the download URL, branching on completion.
  description: >-
    A privacy data-subject-access workflow. The flow submits a data retrieval
    request for one or more distinct_ids, captures the returned task ID, and then
    checks the retrieval task status — branching on whether the task has reached
    SUCCESS (exposing the download URL) or is still pending so the caller knows
    whether to re-poll. Each step spells out its request inline so the flow can
    be read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: gdprCcpaApi
  url: ../openapi/mixpanel-gdpr-ccpa-openapi.yml
  type: openapi
workflows:
- workflowId: gdpr-retrieval-flow
  summary: Create a data retrieval request then check its status for the download URL.
  description: >-
    Posts a retrieval request to /data-retrievals/v3.0, then polls
    /data-retrievals/v3.0/{taskId}, branching on SUCCESS versus still-pending.
  inputs:
    type: object
    required:
    - projectToken
    - distinctIds
    - complianceType
    properties:
      projectToken:
        type: string
        description: Mixpanel project token (token query parameter, required).
      distinctIds:
        type: array
        description: List of distinct_ids to retrieve data for.
        items:
          type: string
      complianceType:
        type: string
        description: The compliance regulation (GDPR or CCPA).
  steps:
  - stepId: createRetrieval
    description: >-
      Submit a GDPR or CCPA data retrieval request. Authentication uses an OAuth
      bearer token; the project token is passed as the token query parameter.
    operationId: createRetrievalRequest
    parameters:
    - name: token
      in: query
      value: $inputs.projectToken
    requestBody:
      contentType: application/json
      payload:
        distinct_ids: $inputs.distinctIds
        compliance_type: $inputs.complianceType
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      taskId: $response.body#/results/task_id
  - stepId: checkRetrieval
    description: >-
      Check the status of the retrieval task. Branches to completion when the
      task status is SUCCESS and a download URL is available, otherwise reports
      it is still pending.
    operationId: checkRetrievalStatus
    parameters:
    - name: taskId
      in: path
      value: $steps.createRetrieval.outputs.taskId
    - name: token
      in: query
      value: $inputs.projectToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      taskStatus: $response.body#/results/status
      downloadUrl: $response.body#/results/download_url
    onSuccess:
    - name: retrievalComplete
      type: end
      criteria:
      - context: $response.body
        condition: $.results.status == "SUCCESS"
        type: jsonpath
    - name: retrievalPending
      type: end
      criteria:
      - context: $response.body
        condition: $.results.status != "SUCCESS"
        type: jsonpath
  outputs:
    taskId: $steps.createRetrieval.outputs.taskId
    taskStatus: $steps.checkRetrieval.outputs.taskStatus
    downloadUrl: $steps.checkRetrieval.outputs.downloadUrl