Skip to content
View as Markdown

UpdateWorkflowResponse

Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L943-L977

Field Type Description
workflow bitdrift.public.unary.workflows.v1.Workflow The updated workflow with all server-generated fields. If the update has failed with violations, this will be the state of the workflow before the update. Most violations are held until deployment time as we expect the user to have broken workflows during development, but some need user action right away.
metadata bitdrift.public.unary.workflows.v1.WorkflowMetadata The updated metadata with all server-generated fields.
per_rule_chart_metadata array of bitdrift.public.unary.workflows.v1.PerRuleChartMetadata The chart metadata that applies to this workflow.
violations array of bitdrift.public.unary.workflows.v1.UpdateWorkflowResponse.BlockingViolation If non-empty, the operation failed. These are violations that need to be resolved before the workflow can be updated.

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"
    }
  ],
  "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"
  }
}

UpdateWorkflowResponse.BlockingViolation

Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L944-L961

Field Type Description
modified_chart_has_alert bitdrift.public.unary.workflows.v1.UpdateWorkflowResponse.BlockingViolation.ModifiedChartHasAlert A chart was modified in a way that would invalidate an attached alert.

Example

JSON
{
  "modified_chart_has_alert": {
    "aggregated_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
    "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
  }
}

UpdateWorkflowResponse.BlockingViolation.ModifiedChartHasAlert

Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L948-L955

A chart has been removed or modified in a way that would cause the alert to no longer be valid (the target aggregated ID has changed). The user must be notified to remove the alert before proceeding.

Field Type Description
rule_id string The ID of the rule that has an alert.
aggregated_id string The time series aggregated ID that the alert is targeting. This can be used for linking out to the alert configuration as alert CRUD operations use this ID.

Example

JSON
{
  "aggregated_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
  "rule_id": "_i1yUnHjKfmWpCaD5Tazo"
}