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.
CreateWorkflow¶
Creates a new workflow.
Request:
Response:
Example CURL¶
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.explorations.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"
}
},
"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¶
{
"id": "abc-123-def"
}
DeleteWorkflow¶
Deletes a workflow permanently.
This removes the workflow and its configuration from the system. This operation is irreversible.
Request:
Response:
Example CURL¶
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.explorations.v1.WorkflowService/DeleteWorkflow \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"workflow_id": "DFg5"
}'
Example Response¶
{
"violations": [
{
"message": "Example text"
}
]
}
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:
Response:
Example CURL¶
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.explorations.v1.WorkflowService/DeployWorkflow \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"workflow_id": "DFg5"
}'
Example Response¶
{
"metadata": {
"deployment_expiration": {
"fixed_time": {
"time": "3600s"
}
},
"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"
}
}
GetWorkflow¶
Retrieves a workflow by ID.
Also updates the last viewed time of the workflow for the current user.
Request:
Response:
Example CURL¶
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.explorations.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¶
{
"metadata": {
"deployment_expiration": {
"fixed_time": {
"time": "3600s"
}
},
"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"
}
}
ListWorkflows¶
Lists all workflows available to the authenticated user.
Request:
Response:
Example CURL¶
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.explorations.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¶
{
"items": [
{
"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
}
RenameWorkflow¶
Renames a workflow without modifying any other fields.
Request:
Response:
Example CURL¶
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.explorations.v1.WorkflowService/RenameWorkflow \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"name": "Workflow name",
"workflow_id": "DFg5"
}'
Example Response¶
{
"metadata": {
"deployment_expiration": {
"fixed_time": {
"time": "3600s"
}
},
"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"
}
}
StopWorkflow¶
Stops a running workflow.
Request:
Response:
Example CURL¶
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.explorations.v1.WorkflowService/StopWorkflow \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"workflow_id": "DFg5"
}'
Example Response¶
{
"metadata": {
"deployment_expiration": {
"fixed_time": {
"time": "3600s"
}
},
"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"
}
}
UpdateWorkflow¶
Updates a workflow, replacing the existing configuration with the provided definition.
Request:
Response:
Example CURL¶
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.explorations.v1.WorkflowService/UpdateWorkflow \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"deployment_expiration": {
"fixed_time": {
"time": "3600s"
}
},
"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¶
{
"metadata": {
"deployment_expiration": {
"fixed_time": {
"time": "3600s"
}
},
"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"
}
}
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:
Response:
Example CURL¶
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.explorations.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¶
{}