ExplorationService¶
Service for managing explorations and workflows.
CreateWorkflow¶
Create a new workflow and attach it to the exploration for the given id.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.explorations.v1.ExplorationService/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": "actn_ghi789",
"title": "My Workflow"
}
]
},
"per_rule_chart_metadata": [
{
"metadata": {
"metric_chart_metadata": {
"metadata": [
{
"connector_export_config": [
{
"cloudwatch_connector_export_config": {
"fixed_dimensions": {
"key": ""
},
"namespace": "payments"
},
"connector_name": "primary-cloudwatch"
}
],
"limit_strategy": {},
"sort_order": "DESC",
"title": "My Workflow",
"top_k_algorithm": "MAX",
"y_axis": {
"description": "Example text",
"unit": "COUNT"
}
}
],
"time_series_display_mode": {}
},
"no_data_message": "Example text",
"summary": {
"description": "Example text"
},
"title": "My Workflow"
},
"rule_id": "actn_ghi789"
}
],
"workflow": {
"actions": [
{
"metric_chart_rule": {
"time_series": [
{
"rate": {
"denominator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "match-abc",
"name": "My Workflow"
}
},
"track_unique": {
"device_id": true
}
}
]
},
"rule_id": "actn_ghi789"
}
],
"flows": [
{
"exclusive": {},
"steps": [
{
"exit_conditions": [
{
"match_rule": {
"generic_match": {
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
},
"match_id": "match-abc",
"sample_rate": 100
}
}
],
"loop_match_id": "match-abc",
"match_rule": {
"generic_match": {
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
},
"match_id": "match-abc",
"sample_rate": 100
},
"save_fields": [
{}
]
}
]
}
],
"group_by_fields": [
"field_name"
],
"name": "My Workflow",
"platform_targets": [
{
"apple": {
"apps": [
{
"app_id": "com.example.app"
}
]
}
}
]
}
}'
Example Response¶
JSON
{
"id": "abc-123-def"
}
DeleteWorkflow¶
Remove a workflow and detach it from the parent exploration.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.explorations.v1.ExplorationService/DeleteWorkflow \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"workflow_id": "wrkf_abc123"
}'
Example Response¶
JSON
{
"violations": [
{
"message": "Example text"
}
]
}
DeployWorkflow¶
Deploy and starts running an existing workflow.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.explorations.v1.ExplorationService/DeployWorkflow \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"workflow_id": "wrkf_abc123"
}'
Example Response¶
JSON
{
"metadata": {
"deployment_expiration": {
"fixed_time": {
"time": "3600s"
}
},
"per_rule_metadata": [
{
"rule_id": "actn_ghi789",
"title": "My Workflow"
}
]
},
"per_rule_chart_metadata": [
{
"metadata": {
"metric_chart_metadata": {
"metadata": [
{
"connector_export_config": [
{
"cloudwatch_connector_export_config": {
"fixed_dimensions": {
"key": ""
},
"namespace": "payments"
},
"connector_name": "primary-cloudwatch"
}
],
"limit_strategy": {},
"sort_order": "DESC",
"title": "My Workflow",
"top_k_algorithm": "MAX",
"y_axis": {
"description": "Example text",
"unit": "COUNT"
}
}
],
"time_series_display_mode": {}
},
"no_data_message": "Example text",
"summary": {
"description": "Example text"
},
"title": "My Workflow"
},
"rule_id": "actn_ghi789"
}
],
"violations": [
{
"match_or_rule_id": "actn_ghi789",
"message": "Example text"
}
],
"workflow": {
"actions": [
{
"metric_chart_rule": {
"time_series": [
{
"aggregated_id": "abc-123-def",
"rate": {
"denominator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"denominator_id": "abc-123-def",
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"numerator_id": "abc-123-def"
},
"track_unique": {
"device_id": true
}
}
]
},
"rule_id": "actn_ghi789"
}
],
"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": "match-abc",
"sample_rate": 100
}
}
],
"loop_match_id": "match-abc",
"match_rule": {
"generic_match": {
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
},
"match_id": "match-abc",
"sample_rate": 100
},
"save_fields": [
{}
]
}
]
}
],
"group_by_fields": [
"field_name"
],
"id": "wrkf_abc123",
"name": "My Workflow",
"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¶
Get a specific workflow for a given id. Note that calling this API will adjust the last viewed time of the workflow for the current user.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.explorations.v1.ExplorationService/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"
}
},
"per_rule_metadata": [
{
"rule_id": "actn_ghi789",
"title": "My Workflow"
}
]
},
"per_rule_chart_metadata": [
{
"metadata": {
"metric_chart_metadata": {
"metadata": [
{
"connector_export_config": [
{
"cloudwatch_connector_export_config": {
"fixed_dimensions": {
"key": ""
},
"namespace": "payments"
},
"connector_name": "primary-cloudwatch"
}
],
"limit_strategy": {},
"sort_order": "DESC",
"title": "My Workflow",
"top_k_algorithm": "MAX",
"y_axis": {
"description": "Example text",
"unit": "COUNT"
}
}
],
"time_series_display_mode": {}
},
"no_data_message": "Example text",
"summary": {
"description": "Example text"
},
"title": "My Workflow"
},
"rule_id": "actn_ghi789"
}
],
"workflow": {
"actions": [
{
"metric_chart_rule": {
"time_series": [
{
"aggregated_id": "abc-123-def",
"rate": {
"denominator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"denominator_id": "abc-123-def",
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"numerator_id": "abc-123-def"
},
"track_unique": {
"device_id": true
}
}
]
},
"rule_id": "actn_ghi789"
}
],
"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": "match-abc",
"sample_rate": 100
}
}
],
"loop_match_id": "match-abc",
"match_rule": {
"generic_match": {
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
},
"match_id": "match-abc",
"sample_rate": 100
},
"save_fields": [
{}
]
}
]
}
],
"group_by_fields": [
"field_name"
],
"id": "wrkf_abc123",
"name": "My Workflow",
"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¶
Get all available workflows for the logged in user.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.explorations.v1.ExplorationService/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_by": [
{
"direction": "ASC",
"field": "field_name"
}
]
}'
Example Response¶
JSON
{
"items": [
{
"workflow": {
"actions": [
{
"metric_chart_rule": {
"time_series": [
{
"aggregated_id": "abc-123-def",
"rate": {
"denominator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"denominator_id": "abc-123-def",
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"numerator_id": "abc-123-def"
},
"track_unique": {
"device_id": true
}
}
]
},
"rule_id": "actn_ghi789"
}
],
"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": "match-abc",
"sample_rate": 100
}
}
],
"loop_match_id": "match-abc",
"match_rule": {
"generic_match": {
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
},
"match_id": "match-abc",
"sample_rate": 100
},
"save_fields": [
{}
]
}
]
}
],
"group_by_fields": [
"field_name"
],
"id": "wrkf_abc123",
"name": "My Workflow",
"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¶
Rename an existing workflow.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.explorations.v1.ExplorationService/RenameWorkflow \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"name": "My Workflow",
"workflow_id": "wrkf_abc123"
}'
Example Response¶
JSON
{
"metadata": {
"deployment_expiration": {
"fixed_time": {
"time": "3600s"
}
},
"per_rule_metadata": [
{
"rule_id": "actn_ghi789",
"title": "My Workflow"
}
]
},
"per_rule_chart_metadata": [
{
"metadata": {
"metric_chart_metadata": {
"metadata": [
{
"connector_export_config": [
{
"cloudwatch_connector_export_config": {
"fixed_dimensions": {
"key": ""
},
"namespace": "payments"
},
"connector_name": "primary-cloudwatch"
}
],
"limit_strategy": {},
"sort_order": "DESC",
"title": "My Workflow",
"top_k_algorithm": "MAX",
"y_axis": {
"description": "Example text",
"unit": "COUNT"
}
}
],
"time_series_display_mode": {}
},
"no_data_message": "Example text",
"summary": {
"description": "Example text"
},
"title": "My Workflow"
},
"rule_id": "actn_ghi789"
}
],
"workflow": {
"actions": [
{
"metric_chart_rule": {
"time_series": [
{
"aggregated_id": "abc-123-def",
"rate": {
"denominator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"denominator_id": "abc-123-def",
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"numerator_id": "abc-123-def"
},
"track_unique": {
"device_id": true
}
}
]
},
"rule_id": "actn_ghi789"
}
],
"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": "match-abc",
"sample_rate": 100
}
}
],
"loop_match_id": "match-abc",
"match_rule": {
"generic_match": {
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
},
"match_id": "match-abc",
"sample_rate": 100
},
"save_fields": [
{}
]
}
]
}
],
"group_by_fields": [
"field_name"
],
"id": "wrkf_abc123",
"name": "My Workflow",
"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¶
Stop an existing workflow from running.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.explorations.v1.ExplorationService/StopWorkflow \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"workflow_id": "wrkf_abc123"
}'
Example Response¶
JSON
{
"metadata": {
"deployment_expiration": {
"fixed_time": {
"time": "3600s"
}
},
"per_rule_metadata": [
{
"rule_id": "actn_ghi789",
"title": "My Workflow"
}
]
},
"per_rule_chart_metadata": [
{
"metadata": {
"metric_chart_metadata": {
"metadata": [
{
"connector_export_config": [
{
"cloudwatch_connector_export_config": {
"fixed_dimensions": {
"key": ""
},
"namespace": "payments"
},
"connector_name": "primary-cloudwatch"
}
],
"limit_strategy": {},
"sort_order": "DESC",
"title": "My Workflow",
"top_k_algorithm": "MAX",
"y_axis": {
"description": "Example text",
"unit": "COUNT"
}
}
],
"time_series_display_mode": {}
},
"no_data_message": "Example text",
"summary": {
"description": "Example text"
},
"title": "My Workflow"
},
"rule_id": "actn_ghi789"
}
],
"workflow": {
"actions": [
{
"metric_chart_rule": {
"time_series": [
{
"aggregated_id": "abc-123-def",
"rate": {
"denominator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"denominator_id": "abc-123-def",
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"numerator_id": "abc-123-def"
},
"track_unique": {
"device_id": true
}
}
]
},
"rule_id": "actn_ghi789"
}
],
"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": "match-abc",
"sample_rate": 100
}
}
],
"loop_match_id": "match-abc",
"match_rule": {
"generic_match": {
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
},
"match_id": "match-abc",
"sample_rate": 100
},
"save_fields": [
{}
]
}
]
}
],
"group_by_fields": [
"field_name"
],
"id": "wrkf_abc123",
"name": "My Workflow",
"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¶
Update a given workflow in full.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.explorations.v1.ExplorationService/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": "actn_ghi789",
"title": "My Workflow"
}
]
},
"per_rule_chart_metadata": [
{
"metadata": {
"metric_chart_metadata": {
"metadata": [
{
"connector_export_config": [
{
"cloudwatch_connector_export_config": {
"fixed_dimensions": {
"key": ""
},
"namespace": "payments"
},
"connector_name": "primary-cloudwatch"
}
],
"limit_strategy": {},
"sort_order": "DESC",
"title": "My Workflow",
"top_k_algorithm": "MAX",
"y_axis": {
"description": "Example text",
"unit": "COUNT"
}
}
],
"time_series_display_mode": {}
},
"no_data_message": "Example text",
"summary": {
"description": "Example text"
},
"title": "My Workflow"
},
"rule_id": "actn_ghi789"
}
],
"workflow": {
"actions": [
{
"metric_chart_rule": {
"time_series": [
{
"rate": {
"denominator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "match-abc",
"name": "My Workflow"
}
},
"track_unique": {
"device_id": true
}
}
]
},
"rule_id": "actn_ghi789"
}
],
"flows": [
{
"exclusive": {},
"steps": [
{
"exit_conditions": [
{
"match_rule": {
"generic_match": {
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
},
"match_id": "match-abc",
"sample_rate": 100
}
}
],
"loop_match_id": "match-abc",
"match_rule": {
"generic_match": {
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
},
"match_id": "match-abc",
"sample_rate": 100
},
"save_fields": [
{}
]
}
]
}
],
"group_by_fields": [
"field_name"
],
"name": "My Workflow",
"platform_targets": [
{
"apple": {
"apps": [
{
"app_id": "com.example.app"
}
]
}
}
]
},
"workflow_id": "wrkf_abc123"
}'
Example Response¶
JSON
{
"metadata": {
"deployment_expiration": {
"fixed_time": {
"time": "3600s"
}
},
"per_rule_metadata": [
{
"rule_id": "actn_ghi789",
"title": "My Workflow"
}
]
},
"per_rule_chart_metadata": [
{
"metadata": {
"metric_chart_metadata": {
"metadata": [
{
"connector_export_config": [
{
"cloudwatch_connector_export_config": {
"fixed_dimensions": {
"key": ""
},
"namespace": "payments"
},
"connector_name": "primary-cloudwatch"
}
],
"limit_strategy": {},
"sort_order": "DESC",
"title": "My Workflow",
"top_k_algorithm": "MAX",
"y_axis": {
"description": "Example text",
"unit": "COUNT"
}
}
],
"time_series_display_mode": {}
},
"no_data_message": "Example text",
"summary": {
"description": "Example text"
},
"title": "My Workflow"
},
"rule_id": "actn_ghi789"
}
],
"violations": [
{
"modified_chart_has_alert": {
"aggregated_id": "abc-123-def",
"rule_id": "actn_ghi789"
}
}
],
"workflow": {
"actions": [
{
"metric_chart_rule": {
"time_series": [
{
"aggregated_id": "abc-123-def",
"rate": {
"denominator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"denominator_id": "abc-123-def",
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "match-abc",
"name": "My Workflow"
},
"numerator_id": "abc-123-def"
},
"track_unique": {
"device_id": true
}
}
]
},
"rule_id": "actn_ghi789"
}
],
"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": "match-abc",
"sample_rate": 100
}
}
],
"loop_match_id": "match-abc",
"match_rule": {
"generic_match": {
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
},
"match_id": "match-abc",
"sample_rate": 100
},
"save_fields": [
{}
]
}
]
}
],
"group_by_fields": [
"field_name"
],
"id": "wrkf_abc123",
"name": "My Workflow",
"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¶
Upsert workflow chart metadata.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.explorations.v1.ExplorationService/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": ""
},
"namespace": "payments"
},
"connector_name": "primary-cloudwatch"
}
],
"limit_strategy": {},
"sort_order": "DESC",
"title": "My Workflow",
"top_k_algorithm": "MAX",
"y_axis": {
"description": "Example text",
"unit": "COUNT"
}
}
],
"time_series_display_mode": {}
},
"no_data_message": "Example text",
"summary": {
"description": "Example text"
},
"title": "My Workflow"
},
"rule_id": "actn_ghi789",
"workflow_id": "wrkf_abc123"
}'
Example Response¶
JSON
{}