---
search:
  exclude: true
---

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

**Source definition:** [`src/bitdrift/public/unary/workflows/v1/workflow.proto#L926-L941`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/workflows/v1/workflow.proto#L926-L941>)

<section class="proto-fields-table" markdown>
| Field | Type | Description |
|---|---|---|
| workflow_id | <span class="proto-type proto-type-primitive">string</span><br><em class="proto-field-annotation">up to 100 chars</em> | The ID of the workflow to update. |
| workflow | <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">Workflow</i>](bitdrift_public_unary_workflows_v1_Workflow.md "bitdrift.public.unary.workflows.v1.Workflow")</span> | The updated workflow. This should be the entire workflow with all changes applied, not just the  delta. The server will apply the changes and return the fully updated workflow in the response. |
| metadata | <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">WorkflowMetadata</i>](bitdrift_public_unary_workflows_v1_WorkflowMetadata.md "bitdrift.public.unary.workflows.v1.WorkflowMetadata")</span> | Optional updated metadata to attach to the workflow. Metadata can always be changed while  the workflow is deployed. |
| per_rule_chart_metadata | <span class="proto-type proto-type-message">array of [<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">PerRuleChartMetadata</i>](bitdrift_public_unary_workflows_v1_PerRuleChartMetadata.md "bitdrift.public.unary.workflows.v1.PerRuleChartMetadata")</span><br><em class="proto-field-annotation">up to 100 items</em> | Optional chart metadata to attach. This is useful inline with workflow updates to provide  defaults for rules with charts attached. |

</section>
#### Example
```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"
  },
  "workflow_id": "DFg5"
}
```

