---
search:
  exclude: true
---

# <a id="bitdrift.public.unary.workflows.v1.WorkflowService"></a>WorkflowService

Manages workflows and their lifecycle, including creation, deployment, and configuration.

 Workflows are the core primitive within the bitdrift platform for specifying user
 journeys and collecting telemetry around them. A workflow is made up of a series of
 flows that describe the user journey and rules that specify when users transition
 between flows.

### <a id="CreateWorkflow"></a>CreateWorkflow

Creates a new workflow.

Request: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">CreateWorkflowRequest</i>](bitdrift_public_unary_workflows_v1_CreateWorkflowRequest.md#bitdrift.public.unary.workflows.v1.CreateWorkflowRequest){ title="bitdrift.public.unary.workflows.v1.CreateWorkflowRequest"}</span>

Response: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">CreateWorkflowResponse</i>](bitdrift_public_unary_workflows_v1_CreateWorkflowResponse.md#bitdrift.public.unary.workflows.v1.CreateWorkflowResponse){ title="bitdrift.public.unary.workflows.v1.CreateWorkflowResponse"}</span>

#### Example CURL
```bash
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.workflows.v1.WorkflowService/CreateWorkflow \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "exploration_id": "abc-123-def",
  "metadata": {
    "deployment_expiration": {
      "fixed_time": {
        "time": "3600s"
      }
    },
    "description": "Workflow description",
    "per_rule_metadata": [
      {
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo",
        "title": "Rule title"
      }
    ]
  },
  "per_rule_chart_metadata": [
    {
      "metadata": {
        "metric_chart_metadata": {
          "metadata": [
            {
              "connector_export_config": [
                {
                  "cloudwatch_connector_export_config": {
                    "fixed_dimensions": {
                      "key": ""
                    },
                    "metric_name": "foreground_launches",
                    "namespace": "mobile_metrics"
                  },
                  "connector_name": "cloudwatch-primary"
                }
              ],
              "limit_strategy": {},
              "sort_order": "DESC",
              "title": "Time series title",
              "top_k_algorithm": "MAX",
              "y_axis": {
                "description": "Count",
                "unit": "COUNT"
              }
            }
          ],
          "time_series_display_mode": {}
        },
        "no_data_message": "Example text",
        "summary": {
          "description": "Example text"
        },
        "title": "Chart title"
      },
      "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
    }
  ],
  "workflow": {
    "actions": [
      {
        "metric_chart_rule": {
          "time_series": [
            {
              "rate": {
                "denominator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "group_by": {
                  "values": [
                    {
                      "log_body": false
                    }
                  ]
                },
                "numerator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                }
              },
              "track_unique": {
                "device_id": true
              }
            }
          ]
        },
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
      }
    ],
    "flows": [
      {
        "exclusive": {},
        "steps": [
          {
            "exit_conditions": [
              {
                "match_rule": {
                  "generic_match": {
                    "base_matcher": {
                      "log_field": "field_name",
                      "operator": "EQUAL",
                      "string_value": "example"
                    }
                  },
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "sample_rate": 100
                }
              }
            ],
            "loop_match_id": "_i1yUnHjKfmWpCaD5Tazo",
            "match_rule": {
              "generic_match": {
                "base_matcher": {
                  "log_field": "field_name",
                  "operator": "EQUAL",
                  "string_value": "example"
                }
              },
              "match_id": "_i1yUnHjKfmWpCaD5Tazo",
              "sample_rate": 100
            },
            "save_fields": [
              {
                "field_name": "",
                "id": "",
                "regex_capture": ""
              }
            ]
          }
        ]
      }
    ],
    "group_by_fields": [
      "field_name"
    ],
    "name": "Workflow name",
    "platform_targets": [
      {
        "apple": {
          "apps": [
            {
              "app_id": "com.example.app"
            }
          ]
        }
      }
    ]
  }
}'
```

#### Example Response
```json
{
  "id": "abc-123-def"
}
```

### <a id="DeleteWorkflow"></a>DeleteWorkflow

Deletes a workflow permanently.

 This removes the workflow and its configuration from the system. This operation
 is irreversible.

Request: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">DeleteWorkflowRequest</i>](bitdrift_public_unary_workflows_v1_DeleteWorkflowRequest.md#bitdrift.public.unary.workflows.v1.DeleteWorkflowRequest){ title="bitdrift.public.unary.workflows.v1.DeleteWorkflowRequest"}</span>

Response: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">DeleteWorkflowResponse</i>](bitdrift_public_unary_workflows_v1_DeleteWorkflowResponse.md#bitdrift.public.unary.workflows.v1.DeleteWorkflowResponse){ title="bitdrift.public.unary.workflows.v1.DeleteWorkflowResponse"}</span>

#### Example CURL
```bash
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.workflows.v1.WorkflowService/DeleteWorkflow \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "workflow_id": "DFg5"
}'
```

#### Example Response
```json
{
  "violations": [
    {
      "message": "Example text"
    }
  ]
}
```

### <a id="DeployWorkflow"></a>DeployWorkflow

Deploys a workflow, making it active and able to receive traffic.

 Deploying creates a new immutable version of the workflow configuration that
 is recorded in the deployment history.

Request: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">DeployWorkflowRequest</i>](bitdrift_public_unary_workflows_v1_DeployWorkflowRequest.md#bitdrift.public.unary.workflows.v1.DeployWorkflowRequest){ title="bitdrift.public.unary.workflows.v1.DeployWorkflowRequest"}</span>

Response: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">DeployWorkflowResponse</i>](bitdrift_public_unary_workflows_v1_DeployWorkflowResponse.md#bitdrift.public.unary.workflows.v1.DeployWorkflowResponse){ title="bitdrift.public.unary.workflows.v1.DeployWorkflowResponse"}</span>

#### Example CURL
```bash
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.workflows.v1.WorkflowService/DeployWorkflow \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "workflow_id": "DFg5"
}'
```

#### Example Response
```json
{
  "metadata": {
    "deployment_expiration": {
      "fixed_time": {
        "time": "3600s"
      }
    },
    "description": "Workflow description",
    "per_rule_metadata": [
      {
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo",
        "title": "Rule title"
      }
    ]
  },
  "per_rule_chart_metadata": [
    {
      "metadata": {
        "metric_chart_metadata": {
          "metadata": [
            {
              "connector_export_config": [
                {
                  "cloudwatch_connector_export_config": {
                    "fixed_dimensions": {
                      "key": ""
                    },
                    "metric_name": "foreground_launches",
                    "namespace": "mobile_metrics"
                  },
                  "connector_name": "cloudwatch-primary"
                }
              ],
              "limit_strategy": {},
              "sort_order": "DESC",
              "title": "Time series title",
              "top_k_algorithm": "MAX",
              "y_axis": {
                "description": "Count",
                "unit": "COUNT"
              }
            }
          ],
          "time_series_display_mode": {}
        },
        "no_data_message": "Example text",
        "summary": {
          "description": "Example text"
        },
        "title": "Chart title"
      },
      "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
    }
  ],
  "violations": [
    {
      "match_or_rule_id": "_i1yUnHjKfmWpCaD5Tazo",
      "message": "Example text"
    }
  ],
  "workflow": {
    "actions": [
      {
        "metric_chart_rule": {
          "time_series": [
            {
              "aggregated_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
              "rate": {
                "denominator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "denominator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
                "group_by": {
                  "values": [
                    {
                      "log_body": false
                    }
                  ]
                },
                "numerator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "numerator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc"
              },
              "track_unique": {
                "device_id": true
              }
            }
          ]
        },
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
      }
    ],
    "created_at": "2024-01-15T09:30:00Z",
    "deployed_at": "2024-01-15T09:30:00Z",
    "deployment_expiration_time": "2024-01-15T09:30:00Z",
    "flows": [
      {
        "exclusive": {},
        "steps": [
          {
            "exit_conditions": [
              {
                "match_rule": {
                  "generic_match": {
                    "base_matcher": {
                      "log_field": "field_name",
                      "operator": "EQUAL",
                      "string_value": "example"
                    }
                  },
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "sample_rate": 100
                }
              }
            ],
            "loop_match_id": "_i1yUnHjKfmWpCaD5Tazo",
            "match_rule": {
              "generic_match": {
                "base_matcher": {
                  "log_field": "field_name",
                  "operator": "EQUAL",
                  "string_value": "example"
                }
              },
              "match_id": "_i1yUnHjKfmWpCaD5Tazo",
              "sample_rate": 100
            },
            "save_fields": [
              {
                "field_name": "",
                "id": "",
                "regex_capture": ""
              }
            ]
          }
        ]
      }
    ],
    "group_by_fields": [
      "field_name"
    ],
    "id": "DFg5",
    "name": "Workflow name",
    "owner": {
      "email": "user@example.com",
      "id": "usr_abc123",
      "name": "Jane Doe"
    },
    "platform_targets": [
      {
        "apple": {
          "apps": [
            {
              "app_id": "com.example.app"
            }
          ]
        }
      }
    ],
    "state": "LIVE",
    "updated_at": "2024-01-15T09:30:00Z"
  }
}
```

### <a id="GetWorkflow"></a>GetWorkflow

Retrieves a workflow by ID.

 Also updates the last viewed time of the workflow for the current user.

Request: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">GetWorkflowRequest</i>](bitdrift_public_unary_workflows_v1_GetWorkflowRequest.md#bitdrift.public.unary.workflows.v1.GetWorkflowRequest){ title="bitdrift.public.unary.workflows.v1.GetWorkflowRequest"}</span>

Response: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">GetWorkflowResponse</i>](bitdrift_public_unary_workflows_v1_GetWorkflowResponse.md#bitdrift.public.unary.workflows.v1.GetWorkflowResponse){ title="bitdrift.public.unary.workflows.v1.GetWorkflowResponse"}</span>

#### Example CURL
```bash
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.workflows.v1.WorkflowService/GetWorkflow \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "exploration_slug_or_id": "abc-123-def",
  "workflow_slug_or_id": "abc-123-def"
}'
```

#### Example Response
```json
{
  "metadata": {
    "deployment_expiration": {
      "fixed_time": {
        "time": "3600s"
      }
    },
    "description": "Workflow description",
    "per_rule_metadata": [
      {
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo",
        "title": "Rule title"
      }
    ]
  },
  "per_rule_chart_metadata": [
    {
      "metadata": {
        "metric_chart_metadata": {
          "metadata": [
            {
              "connector_export_config": [
                {
                  "cloudwatch_connector_export_config": {
                    "fixed_dimensions": {
                      "key": ""
                    },
                    "metric_name": "foreground_launches",
                    "namespace": "mobile_metrics"
                  },
                  "connector_name": "cloudwatch-primary"
                }
              ],
              "limit_strategy": {},
              "sort_order": "DESC",
              "title": "Time series title",
              "top_k_algorithm": "MAX",
              "y_axis": {
                "description": "Count",
                "unit": "COUNT"
              }
            }
          ],
          "time_series_display_mode": {}
        },
        "no_data_message": "Example text",
        "summary": {
          "description": "Example text"
        },
        "title": "Chart title"
      },
      "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
    }
  ],
  "workflow": {
    "actions": [
      {
        "metric_chart_rule": {
          "time_series": [
            {
              "aggregated_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
              "rate": {
                "denominator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "denominator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
                "group_by": {
                  "values": [
                    {
                      "log_body": false
                    }
                  ]
                },
                "numerator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "numerator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc"
              },
              "track_unique": {
                "device_id": true
              }
            }
          ]
        },
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
      }
    ],
    "created_at": "2024-01-15T09:30:00Z",
    "deployed_at": "2024-01-15T09:30:00Z",
    "deployment_expiration_time": "2024-01-15T09:30:00Z",
    "flows": [
      {
        "exclusive": {},
        "steps": [
          {
            "exit_conditions": [
              {
                "match_rule": {
                  "generic_match": {
                    "base_matcher": {
                      "log_field": "field_name",
                      "operator": "EQUAL",
                      "string_value": "example"
                    }
                  },
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "sample_rate": 100
                }
              }
            ],
            "loop_match_id": "_i1yUnHjKfmWpCaD5Tazo",
            "match_rule": {
              "generic_match": {
                "base_matcher": {
                  "log_field": "field_name",
                  "operator": "EQUAL",
                  "string_value": "example"
                }
              },
              "match_id": "_i1yUnHjKfmWpCaD5Tazo",
              "sample_rate": 100
            },
            "save_fields": [
              {
                "field_name": "",
                "id": "",
                "regex_capture": ""
              }
            ]
          }
        ]
      }
    ],
    "group_by_fields": [
      "field_name"
    ],
    "id": "DFg5",
    "name": "Workflow name",
    "owner": {
      "email": "user@example.com",
      "id": "usr_abc123",
      "name": "Jane Doe"
    },
    "platform_targets": [
      {
        "apple": {
          "apps": [
            {
              "app_id": "com.example.app"
            }
          ]
        }
      }
    ],
    "state": "LIVE",
    "updated_at": "2024-01-15T09:30:00Z"
  }
}
```

### <a id="ListWorkflows"></a>ListWorkflows

Lists all workflows available to the authenticated user.

Request: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">ListWorkflowsRequest</i>](bitdrift_public_unary_workflows_v1_ListWorkflowsRequest.md#bitdrift.public.unary.workflows.v1.ListWorkflowsRequest){ title="bitdrift.public.unary.workflows.v1.ListWorkflowsRequest"}</span>

Response: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">ListWorkflowsResponse</i>](bitdrift_public_unary_workflows_v1_ListWorkflowsResponse.md#bitdrift.public.unary.workflows.v1.ListWorkflowsResponse){ title="bitdrift.public.unary.workflows.v1.ListWorkflowsResponse"}</span>

#### Example CURL
```bash
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.workflows.v1.WorkflowService/ListWorkflows \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "filters": [
    {
      "owned": {}
    }
  ],
  "limit": 25,
  "offset": 1,
  "platform_targets": [
    {
      "apple": {
        "apps": [
          {
            "app_id": "com.example.app"
          }
        ]
      }
    }
  ],
  "sort": [
    {
      "direction": "DESCENDING",
      "key": "CREATION_TIME"
    }
  ]
}'
```

#### Example Response
```json
{
  "items": [
    {
      "metadata": {
        "deployment_expiration": {
          "fixed_time": {
            "time": "3600s"
          }
        },
        "description": "Workflow description",
        "per_rule_metadata": [
          {
            "rule_id": "_i1yUnHjKfmWpCaD5Tazo",
            "title": "Rule title"
          }
        ]
      },
      "workflow": {
        "actions": [
          {
            "metric_chart_rule": {
              "time_series": [
                {
                  "aggregated_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
                  "rate": {
                    "denominator": {
                      "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                      "name": "field_name"
                    },
                    "denominator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
                    "group_by": {
                      "values": [
                        {
                          "log_body": false
                        }
                      ]
                    },
                    "numerator": {
                      "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                      "name": "field_name"
                    },
                    "numerator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc"
                  },
                  "track_unique": {
                    "device_id": true
                  }
                }
              ]
            },
            "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
          }
        ],
        "created_at": "2024-01-15T09:30:00Z",
        "deployed_at": "2024-01-15T09:30:00Z",
        "deployment_expiration_time": "2024-01-15T09:30:00Z",
        "flows": [
          {
            "exclusive": {},
            "steps": [
              {
                "exit_conditions": [
                  {
                    "match_rule": {
                      "generic_match": {
                        "base_matcher": {
                          "log_field": "field_name",
                          "operator": "EQUAL",
                          "string_value": "example"
                        }
                      },
                      "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                      "sample_rate": 100
                    }
                  }
                ],
                "loop_match_id": "_i1yUnHjKfmWpCaD5Tazo",
                "match_rule": {
                  "generic_match": {
                    "base_matcher": {
                      "log_field": "field_name",
                      "operator": "EQUAL",
                      "string_value": "example"
                    }
                  },
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "sample_rate": 100
                },
                "save_fields": [
                  {
                    "field_name": "",
                    "id": "",
                    "regex_capture": ""
                  }
                ]
              }
            ]
          }
        ],
        "group_by_fields": [
          "field_name"
        ],
        "id": "DFg5",
        "name": "Workflow name",
        "owner": {
          "email": "user@example.com",
          "id": "usr_abc123",
          "name": "Jane Doe"
        },
        "platform_targets": [
          {
            "apple": {
              "apps": [
                {
                  "app_id": "com.example.app"
                }
              ]
            }
          }
        ],
        "state": "LIVE",
        "updated_at": "2024-01-15T09:30:00Z"
      }
    }
  ],
  "total_active_workflows": 42,
  "total_filtered_workflows": 42,
  "total_workflows": 42
}
```

### <a id="RenameWorkflow"></a>RenameWorkflow

Renames a workflow without modifying any other fields.

Request: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">RenameWorkflowRequest</i>](bitdrift_public_unary_workflows_v1_RenameWorkflowRequest.md#bitdrift.public.unary.workflows.v1.RenameWorkflowRequest){ title="bitdrift.public.unary.workflows.v1.RenameWorkflowRequest"}</span>

Response: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">RenameWorkflowResponse</i>](bitdrift_public_unary_workflows_v1_RenameWorkflowResponse.md#bitdrift.public.unary.workflows.v1.RenameWorkflowResponse){ title="bitdrift.public.unary.workflows.v1.RenameWorkflowResponse"}</span>

#### Example CURL
```bash
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.workflows.v1.WorkflowService/RenameWorkflow \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Workflow name",
  "workflow_id": "DFg5"
}'
```

#### Example Response
```json
{
  "metadata": {
    "deployment_expiration": {
      "fixed_time": {
        "time": "3600s"
      }
    },
    "description": "Workflow description",
    "per_rule_metadata": [
      {
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo",
        "title": "Rule title"
      }
    ]
  },
  "per_rule_chart_metadata": [
    {
      "metadata": {
        "metric_chart_metadata": {
          "metadata": [
            {
              "connector_export_config": [
                {
                  "cloudwatch_connector_export_config": {
                    "fixed_dimensions": {
                      "key": ""
                    },
                    "metric_name": "foreground_launches",
                    "namespace": "mobile_metrics"
                  },
                  "connector_name": "cloudwatch-primary"
                }
              ],
              "limit_strategy": {},
              "sort_order": "DESC",
              "title": "Time series title",
              "top_k_algorithm": "MAX",
              "y_axis": {
                "description": "Count",
                "unit": "COUNT"
              }
            }
          ],
          "time_series_display_mode": {}
        },
        "no_data_message": "Example text",
        "summary": {
          "description": "Example text"
        },
        "title": "Chart title"
      },
      "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
    }
  ],
  "workflow": {
    "actions": [
      {
        "metric_chart_rule": {
          "time_series": [
            {
              "aggregated_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
              "rate": {
                "denominator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "denominator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
                "group_by": {
                  "values": [
                    {
                      "log_body": false
                    }
                  ]
                },
                "numerator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "numerator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc"
              },
              "track_unique": {
                "device_id": true
              }
            }
          ]
        },
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
      }
    ],
    "created_at": "2024-01-15T09:30:00Z",
    "deployed_at": "2024-01-15T09:30:00Z",
    "deployment_expiration_time": "2024-01-15T09:30:00Z",
    "flows": [
      {
        "exclusive": {},
        "steps": [
          {
            "exit_conditions": [
              {
                "match_rule": {
                  "generic_match": {
                    "base_matcher": {
                      "log_field": "field_name",
                      "operator": "EQUAL",
                      "string_value": "example"
                    }
                  },
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "sample_rate": 100
                }
              }
            ],
            "loop_match_id": "_i1yUnHjKfmWpCaD5Tazo",
            "match_rule": {
              "generic_match": {
                "base_matcher": {
                  "log_field": "field_name",
                  "operator": "EQUAL",
                  "string_value": "example"
                }
              },
              "match_id": "_i1yUnHjKfmWpCaD5Tazo",
              "sample_rate": 100
            },
            "save_fields": [
              {
                "field_name": "",
                "id": "",
                "regex_capture": ""
              }
            ]
          }
        ]
      }
    ],
    "group_by_fields": [
      "field_name"
    ],
    "id": "DFg5",
    "name": "Workflow name",
    "owner": {
      "email": "user@example.com",
      "id": "usr_abc123",
      "name": "Jane Doe"
    },
    "platform_targets": [
      {
        "apple": {
          "apps": [
            {
              "app_id": "com.example.app"
            }
          ]
        }
      }
    ],
    "state": "LIVE",
    "updated_at": "2024-01-15T09:30:00Z"
  }
}
```

### <a id="StopWorkflow"></a>StopWorkflow

Stops a running workflow.

Request: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">StopWorkflowRequest</i>](bitdrift_public_unary_workflows_v1_StopWorkflowRequest.md#bitdrift.public.unary.workflows.v1.StopWorkflowRequest){ title="bitdrift.public.unary.workflows.v1.StopWorkflowRequest"}</span>

Response: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">StopWorkflowResponse</i>](bitdrift_public_unary_workflows_v1_StopWorkflowResponse.md#bitdrift.public.unary.workflows.v1.StopWorkflowResponse){ title="bitdrift.public.unary.workflows.v1.StopWorkflowResponse"}</span>

#### Example CURL
```bash
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.workflows.v1.WorkflowService/StopWorkflow \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "workflow_id": "DFg5"
}'
```

#### Example Response
```json
{
  "metadata": {
    "deployment_expiration": {
      "fixed_time": {
        "time": "3600s"
      }
    },
    "description": "Workflow description",
    "per_rule_metadata": [
      {
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo",
        "title": "Rule title"
      }
    ]
  },
  "per_rule_chart_metadata": [
    {
      "metadata": {
        "metric_chart_metadata": {
          "metadata": [
            {
              "connector_export_config": [
                {
                  "cloudwatch_connector_export_config": {
                    "fixed_dimensions": {
                      "key": ""
                    },
                    "metric_name": "foreground_launches",
                    "namespace": "mobile_metrics"
                  },
                  "connector_name": "cloudwatch-primary"
                }
              ],
              "limit_strategy": {},
              "sort_order": "DESC",
              "title": "Time series title",
              "top_k_algorithm": "MAX",
              "y_axis": {
                "description": "Count",
                "unit": "COUNT"
              }
            }
          ],
          "time_series_display_mode": {}
        },
        "no_data_message": "Example text",
        "summary": {
          "description": "Example text"
        },
        "title": "Chart title"
      },
      "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
    }
  ],
  "workflow": {
    "actions": [
      {
        "metric_chart_rule": {
          "time_series": [
            {
              "aggregated_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
              "rate": {
                "denominator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "denominator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
                "group_by": {
                  "values": [
                    {
                      "log_body": false
                    }
                  ]
                },
                "numerator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "numerator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc"
              },
              "track_unique": {
                "device_id": true
              }
            }
          ]
        },
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
      }
    ],
    "created_at": "2024-01-15T09:30:00Z",
    "deployed_at": "2024-01-15T09:30:00Z",
    "deployment_expiration_time": "2024-01-15T09:30:00Z",
    "flows": [
      {
        "exclusive": {},
        "steps": [
          {
            "exit_conditions": [
              {
                "match_rule": {
                  "generic_match": {
                    "base_matcher": {
                      "log_field": "field_name",
                      "operator": "EQUAL",
                      "string_value": "example"
                    }
                  },
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "sample_rate": 100
                }
              }
            ],
            "loop_match_id": "_i1yUnHjKfmWpCaD5Tazo",
            "match_rule": {
              "generic_match": {
                "base_matcher": {
                  "log_field": "field_name",
                  "operator": "EQUAL",
                  "string_value": "example"
                }
              },
              "match_id": "_i1yUnHjKfmWpCaD5Tazo",
              "sample_rate": 100
            },
            "save_fields": [
              {
                "field_name": "",
                "id": "",
                "regex_capture": ""
              }
            ]
          }
        ]
      }
    ],
    "group_by_fields": [
      "field_name"
    ],
    "id": "DFg5",
    "name": "Workflow name",
    "owner": {
      "email": "user@example.com",
      "id": "usr_abc123",
      "name": "Jane Doe"
    },
    "platform_targets": [
      {
        "apple": {
          "apps": [
            {
              "app_id": "com.example.app"
            }
          ]
        }
      }
    ],
    "state": "LIVE",
    "updated_at": "2024-01-15T09:30:00Z"
  }
}
```

### <a id="UpdateWorkflow"></a>UpdateWorkflow

Updates a workflow, replacing the existing configuration with the provided definition.

Request: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">UpdateWorkflowRequest</i>](bitdrift_public_unary_workflows_v1_UpdateWorkflowRequest.md#bitdrift.public.unary.workflows.v1.UpdateWorkflowRequest){ title="bitdrift.public.unary.workflows.v1.UpdateWorkflowRequest"}</span>

Response: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">UpdateWorkflowResponse</i>](bitdrift_public_unary_workflows_v1_UpdateWorkflowResponse.md#bitdrift.public.unary.workflows.v1.UpdateWorkflowResponse){ title="bitdrift.public.unary.workflows.v1.UpdateWorkflowResponse"}</span>

#### Example CURL
```bash
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.workflows.v1.WorkflowService/UpdateWorkflow \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "metadata": {
    "deployment_expiration": {
      "fixed_time": {
        "time": "3600s"
      }
    },
    "description": "Workflow description",
    "per_rule_metadata": [
      {
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo",
        "title": "Rule title"
      }
    ]
  },
  "per_rule_chart_metadata": [
    {
      "metadata": {
        "metric_chart_metadata": {
          "metadata": [
            {
              "connector_export_config": [
                {
                  "cloudwatch_connector_export_config": {
                    "fixed_dimensions": {
                      "key": ""
                    },
                    "metric_name": "foreground_launches",
                    "namespace": "mobile_metrics"
                  },
                  "connector_name": "cloudwatch-primary"
                }
              ],
              "limit_strategy": {},
              "sort_order": "DESC",
              "title": "Time series title",
              "top_k_algorithm": "MAX",
              "y_axis": {
                "description": "Count",
                "unit": "COUNT"
              }
            }
          ],
          "time_series_display_mode": {}
        },
        "no_data_message": "Example text",
        "summary": {
          "description": "Example text"
        },
        "title": "Chart title"
      },
      "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
    }
  ],
  "workflow": {
    "actions": [
      {
        "metric_chart_rule": {
          "time_series": [
            {
              "rate": {
                "denominator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "group_by": {
                  "values": [
                    {
                      "log_body": false
                    }
                  ]
                },
                "numerator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                }
              },
              "track_unique": {
                "device_id": true
              }
            }
          ]
        },
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
      }
    ],
    "flows": [
      {
        "exclusive": {},
        "steps": [
          {
            "exit_conditions": [
              {
                "match_rule": {
                  "generic_match": {
                    "base_matcher": {
                      "log_field": "field_name",
                      "operator": "EQUAL",
                      "string_value": "example"
                    }
                  },
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "sample_rate": 100
                }
              }
            ],
            "loop_match_id": "_i1yUnHjKfmWpCaD5Tazo",
            "match_rule": {
              "generic_match": {
                "base_matcher": {
                  "log_field": "field_name",
                  "operator": "EQUAL",
                  "string_value": "example"
                }
              },
              "match_id": "_i1yUnHjKfmWpCaD5Tazo",
              "sample_rate": 100
            },
            "save_fields": [
              {
                "field_name": "",
                "id": "",
                "regex_capture": ""
              }
            ]
          }
        ]
      }
    ],
    "group_by_fields": [
      "field_name"
    ],
    "name": "Workflow name",
    "platform_targets": [
      {
        "apple": {
          "apps": [
            {
              "app_id": "com.example.app"
            }
          ]
        }
      }
    ]
  },
  "workflow_id": "DFg5"
}'
```

#### Example Response
```json
{
  "metadata": {
    "deployment_expiration": {
      "fixed_time": {
        "time": "3600s"
      }
    },
    "description": "Workflow description",
    "per_rule_metadata": [
      {
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo",
        "title": "Rule title"
      }
    ]
  },
  "per_rule_chart_metadata": [
    {
      "metadata": {
        "metric_chart_metadata": {
          "metadata": [
            {
              "connector_export_config": [
                {
                  "cloudwatch_connector_export_config": {
                    "fixed_dimensions": {
                      "key": ""
                    },
                    "metric_name": "foreground_launches",
                    "namespace": "mobile_metrics"
                  },
                  "connector_name": "cloudwatch-primary"
                }
              ],
              "limit_strategy": {},
              "sort_order": "DESC",
              "title": "Time series title",
              "top_k_algorithm": "MAX",
              "y_axis": {
                "description": "Count",
                "unit": "COUNT"
              }
            }
          ],
          "time_series_display_mode": {}
        },
        "no_data_message": "Example text",
        "summary": {
          "description": "Example text"
        },
        "title": "Chart title"
      },
      "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
    }
  ],
  "violations": [
    {
      "modified_chart_has_alert": {
        "aggregated_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
      }
    }
  ],
  "workflow": {
    "actions": [
      {
        "metric_chart_rule": {
          "time_series": [
            {
              "aggregated_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
              "rate": {
                "denominator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "denominator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
                "group_by": {
                  "values": [
                    {
                      "log_body": false
                    }
                  ]
                },
                "numerator": {
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "name": "field_name"
                },
                "numerator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc"
              },
              "track_unique": {
                "device_id": true
              }
            }
          ]
        },
        "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
      }
    ],
    "created_at": "2024-01-15T09:30:00Z",
    "deployed_at": "2024-01-15T09:30:00Z",
    "deployment_expiration_time": "2024-01-15T09:30:00Z",
    "flows": [
      {
        "exclusive": {},
        "steps": [
          {
            "exit_conditions": [
              {
                "match_rule": {
                  "generic_match": {
                    "base_matcher": {
                      "log_field": "field_name",
                      "operator": "EQUAL",
                      "string_value": "example"
                    }
                  },
                  "match_id": "_i1yUnHjKfmWpCaD5Tazo",
                  "sample_rate": 100
                }
              }
            ],
            "loop_match_id": "_i1yUnHjKfmWpCaD5Tazo",
            "match_rule": {
              "generic_match": {
                "base_matcher": {
                  "log_field": "field_name",
                  "operator": "EQUAL",
                  "string_value": "example"
                }
              },
              "match_id": "_i1yUnHjKfmWpCaD5Tazo",
              "sample_rate": 100
            },
            "save_fields": [
              {
                "field_name": "",
                "id": "",
                "regex_capture": ""
              }
            ]
          }
        ]
      }
    ],
    "group_by_fields": [
      "field_name"
    ],
    "id": "DFg5",
    "name": "Workflow name",
    "owner": {
      "email": "user@example.com",
      "id": "usr_abc123",
      "name": "Jane Doe"
    },
    "platform_targets": [
      {
        "apple": {
          "apps": [
            {
              "app_id": "com.example.app"
            }
          ]
        }
      }
    ],
    "state": "LIVE",
    "updated_at": "2024-01-15T09:30:00Z"
  }
}
```

### <a id="UpsertWorkflowChartMetadata"></a>UpsertWorkflowChartMetadata

Creates or updates chart metadata for a workflow.

 Chart metadata includes information such as the chart title, description, and
 the metric query that the chart is based on. This determines how workflow output
 data is rendered in the UI.

Request: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">charts</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">UpsertWorkflowChartMetadataRequest</i>](bitdrift_public_unary_charts_v1_UpsertWorkflowChartMetadataRequest.md#bitdrift.public.unary.charts.v1.UpsertWorkflowChartMetadataRequest){ title="bitdrift.public.unary.charts.v1.UpsertWorkflowChartMetadataRequest"}</span>

Response: <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">charts</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">UpsertWorkflowChartMetadataResponse</i>](bitdrift_public_unary_charts_v1_UpsertWorkflowChartMetadataResponse.md#bitdrift.public.unary.charts.v1.UpsertWorkflowChartMetadataResponse){ title="bitdrift.public.unary.charts.v1.UpsertWorkflowChartMetadataResponse"}</span>

#### Example CURL
```bash
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.workflows.v1.WorkflowService/UpsertWorkflowChartMetadata \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "metadata": {
    "metric_chart_metadata": {
      "metadata": [
        {
          "connector_export_config": [
            {
              "cloudwatch_connector_export_config": {
                "fixed_dimensions": {
                  "key": ""
                },
                "metric_name": "foreground_launches",
                "namespace": "mobile_metrics"
              },
              "connector_name": "cloudwatch-primary"
            }
          ],
          "limit_strategy": {},
          "sort_order": "DESC",
          "title": "Time series title",
          "top_k_algorithm": "MAX",
          "y_axis": {
            "description": "Count",
            "unit": "COUNT"
          }
        }
      ],
      "time_series_display_mode": {}
    },
    "no_data_message": "Example text",
    "summary": {
      "description": "Example text"
    },
    "title": "Chart title"
  },
  "rule_id": "_i1yUnHjKfmWpCaD5Tazo",
  "workflow_id": "DFg5"
}'
```

#### Example Response
```json
{}
```

