Skip to content

workflows

workflows

Workflow_CRUD_Error

Workflow_CRUD_Error(
    operation: str,
    workflow_id: str | None = None,
    message: str | None = None,
    res=None,
    **kwargs
)

Bases: RouteError

Raised when workflow create, update, delete, or trigger operations fail.

Source code in src/crew_dcs/routes/workflows.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
def __init__(
    self,
    operation: str,
    workflow_id: str | None = None,
    message: str | None = None,
    res=None,
    **kwargs,
):
    super().__init__(
        message=message or f"Workflow {operation} operation failed",
        entity_id=workflow_id,
        res=res,
        **kwargs,
    )

Workflow_GET_Error

Workflow_GET_Error(
    workflow_id: str | None = None,
    message: str | None = None,
    res=None,
    **kwargs
)

Bases: RouteError

Raised when workflow retrieval operations fail.

Source code in src/crew_dcs/routes/workflows.py
61
62
63
64
65
66
67
68
69
70
71
72
73
def __init__(
    self,
    workflow_id: str | None = None,
    message: str | None = None,
    res=None,
    **kwargs,
):
    super().__init__(
        message=message or "Workflow retrieval failed",
        entity_id=workflow_id,
        res=res,
        **kwargs,
    )

create_workflow async

create_workflow(
    auth: DomoAuth,
    body: dict | None = None,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Create a new workflow.

Source code in src/crew_dcs/routes/workflows.py
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def create_workflow(
    auth: DomoAuth,
    body: dict | None = None,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Create a new workflow."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v2/models"
    res = await gd.get_data(
        auth=auth,
        method="POST",
        url=url,
        body=body or {},
        context=context,
    )

    if not res.is_success:
        raise Workflow_CRUD_Error(operation="create", res=res)

    return res

create_workflow_trigger async

create_workflow_trigger(
    auth: DomoAuth,
    name: str,
    trigger_type: str,
    model_id: str,
    model_version: str,
    entity_type: str,
    entity_id: str,
    metadata: dict,
    default_values: dict | None = None,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

POST creates a trigger (e.g. TIMER) that fires a workflow model/version.

entity_type/entity_id scope trigger ownership — for TIMER triggers Domo requires entity_type="USER" and entity_id=the creating user's ID (a token can only create timer triggers for itself). metadata must include a "type" discriminator matching trigger_type (e.g. {"type": "TIMER", "cron": "0 0 2 * * ?", "timeZone": "UTC"}).

Source code in src/crew_dcs/routes/workflows.py
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def create_workflow_trigger(
    auth: DomoAuth,
    name: str,
    trigger_type: str,
    model_id: str,
    model_version: str,
    entity_type: str,
    entity_id: str,
    metadata: dict,
    default_values: dict | None = None,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """POST creates a trigger (e.g. TIMER) that fires a workflow model/version.

    `entity_type`/`entity_id` scope trigger ownership — for TIMER triggers
    Domo requires entity_type="USER" and entity_id=the creating user's ID
    (a token can only create timer triggers for itself).
    `metadata` must include a "type" discriminator matching `trigger_type`
    (e.g. {"type": "TIMER", "cron": "0 0 2 * * ?", "timeZone": "UTC"}).
    """
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v2/triggers"
    body = {
        "name": name,
        "type": trigger_type,
        "modelId": model_id,
        "modelVersion": model_version,
        "entityType": entity_type,
        "entityId": entity_id,
        "defaultValues": default_values or {},
        "metadata": metadata,
    }
    res = await gd.get_data(
        auth=auth,
        method="POST",
        url=url,
        body=body,
        context=context,
    )

    if not res.is_success:
        raise Workflow_CRUD_Error(
            operation="create_trigger", workflow_id=model_id, res=res
        )

    return res

create_workflow_version async

create_workflow_version(
    auth: DomoAuth,
    workflow_id: str,
    body: dict | None = None,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Create a new version of a workflow.

Source code in src/crew_dcs/routes/workflows.py
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def create_workflow_version(
    auth: DomoAuth,
    workflow_id: str,
    body: dict | None = None,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Create a new version of a workflow."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v2/models/{workflow_id}/versions"
    res = await gd.get_data(
        auth=auth,
        method="POST",
        url=url,
        body=body or {},
        context=context,
    )

    if not res.is_success:
        raise Workflow_CRUD_Error(
            operation="create_version", workflow_id=workflow_id, res=res
        )

    return res

create_workflow_version_from_saved_json async

create_workflow_version_from_saved_json(
    auth: DomoAuth,
    model_id: str,
    version: str,
    saved_json: str,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

POST creates a brand-new version on a model that has no versions yet.

Uses the v1 API with a savedJson payload. For the generic v2 body-dict route see create_workflow_version.

Source code in src/crew_dcs/routes/workflows.py
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def create_workflow_version_from_saved_json(
    auth: DomoAuth,
    model_id: str,
    version: str,
    saved_json: str,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """POST creates a brand-new version on a model that has no versions yet.

    Uses the v1 API with a `savedJson` payload. For the generic v2 body-dict
    route see `create_workflow_version`.
    """
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v1/models/{model_id}/versions"
    body = {"savedJson": saved_json, "version": version}
    res = await gd.get_data(
        auth=auth,
        method="POST",
        url=url,
        body=body,
        context=context,
    )

    if not res.is_success:
        raise Workflow_CRUD_Error(
            operation="create_version", workflow_id=model_id, res=res
        )

    return res

delete_workflow async

delete_workflow(
    auth: DomoAuth,
    workflow_id: str,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Delete a workflow.

Source code in src/crew_dcs/routes/workflows.py
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def delete_workflow(
    auth: DomoAuth,
    workflow_id: str,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Delete a workflow."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v1/models/{workflow_id}"
    res = await gd.get_data(
        auth=auth,
        method="DELETE",
        url=url,
        context=context,
    )

    if not res.is_success:
        raise Workflow_CRUD_Error(operation="delete", workflow_id=workflow_id, res=res)

    return res

delete_workflow_trigger async

delete_workflow_trigger(
    auth: DomoAuth,
    trigger_id: str,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

DELETE soft-deletes a trigger (sets deletedAt; stops future firings).

Source code in src/crew_dcs/routes/workflows.py
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def delete_workflow_trigger(
    auth: DomoAuth,
    trigger_id: str,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """DELETE soft-deletes a trigger (sets deletedAt; stops future firings)."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v2/triggers/{trigger_id}"

    res = await gd.get_data(
        auth=auth,
        method="DELETE",
        url=url,
        context=context,
    )

    if not res.is_success:
        raise Workflow_CRUD_Error(
            operation="delete_trigger", workflow_id=trigger_id, res=res
        )

    return res

get_workflow_by_id async

get_workflow_by_id(
    auth: DomoAuth,
    workflow_id: str,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Get a workflow by its ID.

Source code in src/crew_dcs/routes/workflows.py
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_workflow_by_id(
    auth: DomoAuth,
    workflow_id: str,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Get a workflow by its ID."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v1/models/{workflow_id}"
    res = await gd.get_data(
        auth=auth,
        method="GET",
        url=url,
        context=context,
    )

    if not res.is_success:
        raise Workflow_GET_Error(workflow_id=workflow_id, res=res)

    return res

get_workflow_execution_by_id async

get_workflow_execution_by_id(
    auth: DomoAuth,
    execution_id: str,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Get a workflow execution by its ID.

Source code in src/crew_dcs/routes/workflows.py
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_workflow_execution_by_id(
    auth: DomoAuth,
    execution_id: str,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Get a workflow execution by its ID."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v2/executions/{execution_id}"
    res = await gd.get_data(
        auth=auth,
        method="GET",
        url=url,
        context=context,
    )

    if not res.is_success:
        raise Workflow_GET_Error(workflow_id=execution_id, res=res)

    return res

get_workflow_execution_metrics async

get_workflow_execution_metrics(
    auth: DomoAuth,
    model_id: str,
    model_version: str | None = None,
    status: str | None = None,
    trigger_types: str | None = None,
    started_by: str | None = None,
    started_after: str | None = None,
    finished_before: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any
) -> ResponseGetData

Get execution metrics for a workflow (Postman: Get Execution Metrics).

GET /api/workflow/v2/executions/metrics. Response shape is unverified against a live Domo.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
model_id str

Workflow UUID (sent as modelId; required by Domo).

required
model_version str | None

Optional semantic version (modelVersion).

None
status str | None

Optional comma-separated statuses (COMPLETED, IN_PROGRESS, CANCELLED, FAILED).

None
trigger_types str | None

Optional comma-separated trigger types (triggerTypes).

None
started_by str | None

Optional user ID (startedBy).

None
started_after str | None

Optional ISO 8601 timestamp (startedAfter).

None
finished_before str | None

Optional ISO 8601 timestamp (finishedBefore).

None
return_raw bool

If True, return the response without raising on failure.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides consumed by route_function.

{}

Returns:

Type Description
ResponseGetData

The API response.

Raises:

Type Description
Workflow_GET_Error

If the response is not successful and return_raw is False.

Source code in src/crew_dcs/routes/workflows.py
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_workflow_execution_metrics(
    auth: DomoAuth,
    model_id: str,
    model_version: str | None = None,
    status: str | None = None,
    trigger_types: str | None = None,
    started_by: str | None = None,
    started_after: str | None = None,
    finished_before: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get execution metrics for a workflow (Postman: Get Execution Metrics).

    ``GET /api/workflow/v2/executions/metrics``. Response shape is unverified
    against a live Domo.

    Args:
        auth: Authenticated Domo session.
        model_id: Workflow UUID (sent as ``modelId``; required by Domo).
        model_version: Optional semantic version (``modelVersion``).
        status: Optional comma-separated statuses (COMPLETED, IN_PROGRESS,
            CANCELLED, FAILED).
        trigger_types: Optional comma-separated trigger types (``triggerTypes``).
        started_by: Optional user ID (``startedBy``).
        started_after: Optional ISO 8601 timestamp (``startedAfter``).
        finished_before: Optional ISO 8601 timestamp (``finishedBefore``).
        return_raw: If True, return the response without raising on failure.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides consumed by ``route_function``.

    Returns:
        The API response.

    Raises:
        Workflow_GET_Error: If the response is not successful and ``return_raw`` is False.
    """
    params = _drop_none(
        {
            "modelId": model_id,
            "modelVersion": model_version,
            "status": status,
            "triggerTypes": trigger_types,
            "startedBy": started_by,
            "startedAfter": started_after,
            "finishedBefore": finished_before,
        }
    )
    return await _get_workflow_path(
        auth,
        "/v2/executions/metrics",
        entity_id=model_id,
        params=params,
        return_raw=return_raw,
        context=context,
    )

get_workflow_execution_outputs async

get_workflow_execution_outputs(
    auth: DomoAuth,
    execution_id: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any
) -> ResponseGetData

Get the outputs of a workflow execution (Postman: Get Execution Outputs).

GET /api/workflow/v2/executions/{execution_id}/outputs. Response shape is unverified against a live Domo.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
execution_id str

Workflow execution UUID.

required
return_raw bool

If True, return the response without raising on failure.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides consumed by route_function.

{}

Returns:

Type Description
ResponseGetData

The API response.

Raises:

Type Description
Workflow_GET_Error

If the response is not successful and return_raw is False.

Source code in src/crew_dcs/routes/workflows.py
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_workflow_execution_outputs(
    auth: DomoAuth,
    execution_id: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the outputs of a workflow execution (Postman: Get Execution Outputs).

    ``GET /api/workflow/v2/executions/{execution_id}/outputs``. Response shape
    is unverified against a live Domo.

    Args:
        auth: Authenticated Domo session.
        execution_id: Workflow execution UUID.
        return_raw: If True, return the response without raising on failure.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides consumed by ``route_function``.

    Returns:
        The API response.

    Raises:
        Workflow_GET_Error: If the response is not successful and ``return_raw`` is False.
    """
    return await _get_workflow_path(
        auth,
        f"/v2/executions/{execution_id}/outputs",
        entity_id=execution_id,
        params=None,
        return_raw=return_raw,
        context=context,
    )

get_workflow_locks async

get_workflow_locks(
    auth: DomoAuth,
    model_id: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any
) -> ResponseGetData

Get the locks held on a workflow model (Postman: Get Locks).

GET /api/workflow/v1/models/{model_id}/locks. Response shape is unverified against a live Domo.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
model_id str

Workflow model UUID.

required
return_raw bool

If True, return the response without raising on failure.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides consumed by route_function.

{}

Returns:

Type Description
ResponseGetData

The API response.

Raises:

Type Description
Workflow_GET_Error

If the response is not successful and return_raw is False.

Source code in src/crew_dcs/routes/workflows.py
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_workflow_locks(
    auth: DomoAuth,
    model_id: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the locks held on a workflow model (Postman: Get Locks).

    ``GET /api/workflow/v1/models/{model_id}/locks``. Response shape is
    unverified against a live Domo.

    Args:
        auth: Authenticated Domo session.
        model_id: Workflow model UUID.
        return_raw: If True, return the response without raising on failure.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides consumed by ``route_function``.

    Returns:
        The API response.

    Raises:
        Workflow_GET_Error: If the response is not successful and ``return_raw`` is False.
    """
    return await _get_workflow_path(
        auth,
        f"/v1/models/{model_id}/locks",
        entity_id=model_id,
        params=None,
        return_raw=return_raw,
        context=context,
    )

get_workflow_models_usage async

get_workflow_models_usage(
    auth: DomoAuth,
    entity_type: str | None = None,
    entity_id: str | None = None,
    parts: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any
) -> ResponseGetData

List workflow usage of an entity (Postman: List Code Engine Package Usage).

GET /api/workflow/v2/models/usage. The Postman example uses entityType=CODEENGINE_FUNCTION, a Code Engine package UUID as entityId and parts=items. Response shape is unverified against a live Domo.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
entity_type str | None

Optional entity type (entityType).

None
entity_id str | None

Optional entity UUID (entityId).

None
parts str | None

Optional response parts (for example items).

None
return_raw bool

If True, return the response without raising on failure.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides consumed by route_function.

{}

Returns:

Type Description
ResponseGetData

The API response.

Raises:

Type Description
Workflow_GET_Error

If the response is not successful and return_raw is False.

Source code in src/crew_dcs/routes/workflows.py
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_workflow_models_usage(
    auth: DomoAuth,
    entity_type: str | None = None,
    entity_id: str | None = None,
    parts: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """List workflow usage of an entity (Postman: List Code Engine Package Usage).

    ``GET /api/workflow/v2/models/usage``. The Postman example uses
    ``entityType=CODEENGINE_FUNCTION``, a Code Engine package UUID as
    ``entityId`` and ``parts=items``. Response shape is unverified against a
    live Domo.

    Args:
        auth: Authenticated Domo session.
        entity_type: Optional entity type (``entityType``).
        entity_id: Optional entity UUID (``entityId``).
        parts: Optional response parts (for example ``items``).
        return_raw: If True, return the response without raising on failure.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides consumed by ``route_function``.

    Returns:
        The API response.

    Raises:
        Workflow_GET_Error: If the response is not successful and ``return_raw`` is False.
    """
    params = _drop_none(
        {"entityType": entity_type, "entityId": entity_id, "parts": parts}
    )
    return await _get_workflow_path(
        auth,
        "/v2/models/usage",
        entity_id=entity_id,
        params=params,
        return_raw=return_raw,
        context=context,
    )

get_workflow_permissions async

get_workflow_permissions(
    auth: DomoAuth,
    model_id: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any
) -> ResponseGetData

Get the permissions on a workflow model (Postman: Get Permissions).

GET /api/workflow/v1/models/{model_id}/permissions. Response shape is unverified against a live Domo.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
model_id str

Workflow model UUID.

required
return_raw bool

If True, return the response without raising on failure.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides consumed by route_function.

{}

Returns:

Type Description
ResponseGetData

The API response.

Raises:

Type Description
Workflow_GET_Error

If the response is not successful and return_raw is False.

Source code in src/crew_dcs/routes/workflows.py
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_workflow_permissions(
    auth: DomoAuth,
    model_id: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the permissions on a workflow model (Postman: Get Permissions).

    ``GET /api/workflow/v1/models/{model_id}/permissions``. Response shape is
    unverified against a live Domo.

    Args:
        auth: Authenticated Domo session.
        model_id: Workflow model UUID.
        return_raw: If True, return the response without raising on failure.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides consumed by ``route_function``.

    Returns:
        The API response.

    Raises:
        Workflow_GET_Error: If the response is not successful and ``return_raw`` is False.
    """
    return await _get_workflow_path(
        auth,
        f"/v1/models/{model_id}/permissions",
        entity_id=model_id,
        params=None,
        return_raw=return_raw,
        context=context,
    )

get_workflow_trigger_form async

get_workflow_trigger_form(
    auth: DomoAuth,
    model_id: str,
    version: str,
    trigger_id: str | None = None,
    deployment_id: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any
) -> ResponseGetData

Get the trigger form of a workflow version (Postman: Get Trigger Form).

GET /api/workflow/v2/models/{model_id}/versions/{version}/form. Response shape is unverified against a live Domo.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
model_id str

Workflow model UUID.

required
version str

Workflow version number.

required
trigger_id str | None

Optional trigger UUID (triggerId).

None
deployment_id str | None

Optional deployment UUID (deploymentId).

None
return_raw bool

If True, return the response without raising on failure.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides consumed by route_function.

{}

Returns:

Type Description
ResponseGetData

The API response.

Raises:

Type Description
Workflow_GET_Error

If the response is not successful and return_raw is False.

Source code in src/crew_dcs/routes/workflows.py
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_workflow_trigger_form(
    auth: DomoAuth,
    model_id: str,
    version: str,
    trigger_id: str | None = None,
    deployment_id: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the trigger form of a workflow version (Postman: Get Trigger Form).

    ``GET /api/workflow/v2/models/{model_id}/versions/{version}/form``.
    Response shape is unverified against a live Domo.

    Args:
        auth: Authenticated Domo session.
        model_id: Workflow model UUID.
        version: Workflow version number.
        trigger_id: Optional trigger UUID (``triggerId``).
        deployment_id: Optional deployment UUID (``deploymentId``).
        return_raw: If True, return the response without raising on failure.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides consumed by ``route_function``.

    Returns:
        The API response.

    Raises:
        Workflow_GET_Error: If the response is not successful and ``return_raw`` is False.
    """
    params = _drop_none({"triggerId": trigger_id, "deploymentId": deployment_id})
    return await _get_workflow_path(
        auth,
        f"/v2/models/{model_id}/versions/{version}/form",
        entity_id=model_id,
        params=params,
        return_raw=return_raw,
        context=context,
    )

get_workflow_version async

get_workflow_version(
    auth: DomoAuth,
    workflow_id: str,
    version_number: str,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Get a specific version of a workflow.

Source code in src/crew_dcs/routes/workflows.py
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_workflow_version(
    auth: DomoAuth,
    workflow_id: str,
    version_number: str,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Get a specific version of a workflow."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v2/models/{workflow_id}/versions/{version_number}"
    res = await gd.get_data(
        auth=auth,
        method="GET",
        url=url,
        context=context,
    )

    if not res.is_success:
        raise Workflow_GET_Error(workflow_id=workflow_id, res=res)

    return res

get_workflow_version_definition async

get_workflow_version_definition(
    auth: DomoAuth,
    workflow_id: str,
    version_number: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any
) -> ResponseGetData

Get the definition of a workflow version (Postman: Get Version Definition).

GET /api/workflow/v2/models/{workflow_id}/versions/{version_number}/definition. Response shape is unverified against a live Domo.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
workflow_id str

Workflow UUID.

required
version_number str

Workflow version number.

required
return_raw bool

If True, return the response without raising on failure.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides consumed by route_function.

{}

Returns:

Type Description
ResponseGetData

The API response.

Raises:

Type Description
Workflow_GET_Error

If the response is not successful and return_raw is False.

Source code in src/crew_dcs/routes/workflows.py
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_workflow_version_definition(
    auth: DomoAuth,
    workflow_id: str,
    version_number: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the definition of a workflow version (Postman: Get Version Definition).

    ``GET /api/workflow/v2/models/{workflow_id}/versions/{version_number}/definition``.
    Response shape is unverified against a live Domo.

    Args:
        auth: Authenticated Domo session.
        workflow_id: Workflow UUID.
        version_number: Workflow version number.
        return_raw: If True, return the response without raising on failure.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides consumed by ``route_function``.

    Returns:
        The API response.

    Raises:
        Workflow_GET_Error: If the response is not successful and ``return_raw`` is False.
    """
    return await _get_workflow_path(
        auth,
        f"/v2/models/{workflow_id}/versions/{version_number}/definition",
        entity_id=workflow_id,
        params=None,
        return_raw=return_raw,
        context=context,
    )

list_workflow_executions async

list_workflow_executions(
    auth: DomoAuth,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

List all workflow executions.

Source code in src/crew_dcs/routes/workflows.py
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def list_workflow_executions(
    auth: DomoAuth,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """List all workflow executions."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v2/executions"
    res = await gd.get_data(
        auth=auth,
        method="GET",
        url=url,
        context=context,
    )

    if not res.is_success:
        raise Workflow_GET_Error(res=res)

    return res

list_workflow_trigger_types async

list_workflow_trigger_types(
    auth: DomoAuth,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any
) -> ResponseGetData

List the available workflow trigger types (Postman: List Trigger Types).

GET /api/workflow/v2/triggers/types. Response shape is unverified against a live Domo.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
return_raw bool

If True, return the response without raising on failure.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides consumed by route_function.

{}

Returns:

Type Description
ResponseGetData

The API response.

Raises:

Type Description
Workflow_GET_Error

If the response is not successful and return_raw is False.

Source code in src/crew_dcs/routes/workflows.py
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def list_workflow_trigger_types(
    auth: DomoAuth,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """List the available workflow trigger types (Postman: List Trigger Types).

    ``GET /api/workflow/v2/triggers/types``. Response shape is unverified
    against a live Domo.

    Args:
        auth: Authenticated Domo session.
        return_raw: If True, return the response without raising on failure.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides consumed by ``route_function``.

    Returns:
        The API response.

    Raises:
        Workflow_GET_Error: If the response is not successful and ``return_raw`` is False.
    """
    return await _get_workflow_path(
        auth,
        "/v2/triggers/types",
        entity_id=None,
        params=None,
        return_raw=return_raw,
        context=context,
    )

list_workflow_triggers_by_entity async

list_workflow_triggers_by_entity(
    auth: DomoAuth,
    entity_type: str,
    entity_id: str,
    entity_versions: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any
) -> ResponseGetData

List triggers attached to an entity (Postman: List Triggers by Entity).

GET /api/workflow/v2/triggers/entity/{entity_type}/{entity_id}. Response shape is unverified against a live Domo.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
entity_type str

Entity type path segment.

required
entity_id str

Entity UUID.

required
entity_versions str | None

Optional entity versions to filter by (entityVersions).

None
return_raw bool

If True, return the response without raising on failure.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides consumed by route_function.

{}

Returns:

Type Description
ResponseGetData

The API response.

Raises:

Type Description
Workflow_GET_Error

If the response is not successful and return_raw is False.

Source code in src/crew_dcs/routes/workflows.py
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def list_workflow_triggers_by_entity(
    auth: DomoAuth,
    entity_type: str,
    entity_id: str,
    entity_versions: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """List triggers attached to an entity (Postman: List Triggers by Entity).

    ``GET /api/workflow/v2/triggers/entity/{entity_type}/{entity_id}``.
    Response shape is unverified against a live Domo.

    Args:
        auth: Authenticated Domo session.
        entity_type: Entity type path segment.
        entity_id: Entity UUID.
        entity_versions: Optional entity versions to filter by (``entityVersions``).
        return_raw: If True, return the response without raising on failure.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides consumed by ``route_function``.

    Returns:
        The API response.

    Raises:
        Workflow_GET_Error: If the response is not successful and ``return_raw`` is False.
    """
    params = _drop_none({"entityVersions": entity_versions})
    return await _get_workflow_path(
        auth,
        f"/v2/triggers/entity/{entity_type}/{entity_id}",
        entity_id=entity_id,
        params=params,
        return_raw=return_raw,
        context=context,
    )

list_workflow_triggers_by_model async

list_workflow_triggers_by_model(
    auth: DomoAuth,
    workflow_id: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any
) -> ResponseGetData

List the triggers of a workflow (Postman: List Triggers).

GET /api/workflow/v2/triggers/model/{workflow_id}. Response shape is unverified against a live Domo.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
workflow_id str

Workflow UUID.

required
return_raw bool

If True, return the response without raising on failure.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides consumed by route_function.

{}

Returns:

Type Description
ResponseGetData

The API response.

Raises:

Type Description
Workflow_GET_Error

If the response is not successful and return_raw is False.

Source code in src/crew_dcs/routes/workflows.py
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def list_workflow_triggers_by_model(
    auth: DomoAuth,
    workflow_id: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """List the triggers of a workflow (Postman: List Triggers).

    ``GET /api/workflow/v2/triggers/model/{workflow_id}``. Response shape is
    unverified against a live Domo.

    Args:
        auth: Authenticated Domo session.
        workflow_id: Workflow UUID.
        return_raw: If True, return the response without raising on failure.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides consumed by ``route_function``.

    Returns:
        The API response.

    Raises:
        Workflow_GET_Error: If the response is not successful and ``return_raw`` is False.
    """
    return await _get_workflow_path(
        auth,
        f"/v2/triggers/model/{workflow_id}",
        entity_id=workflow_id,
        params=None,
        return_raw=return_raw,
        context=context,
    )

list_workflow_versions async

list_workflow_versions(
    auth: DomoAuth,
    model_id: str,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

List all versions of a workflow model.

Source code in src/crew_dcs/routes/workflows.py
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def list_workflow_versions(
    auth: DomoAuth,
    model_id: str,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """List all versions of a workflow model."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v1/models/{model_id}/versions"
    res = await gd.get_data(
        auth=auth,
        method="GET",
        url=url,
        context=context,
    )

    if not res.is_success:
        raise Workflow_GET_Error(workflow_id=model_id, res=res)

    return res

list_workflows async

list_workflows(
    auth: DomoAuth,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

List all workflows.

Source code in src/crew_dcs/routes/workflows.py
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def list_workflows(
    auth: DomoAuth,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """List all workflows."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v1/models"
    res = await gd.get_data(
        auth=auth,
        method="GET",
        url=url,
        context=context,
    )

    if not res.is_success:
        raise Workflow_GET_Error(res=res)

    return res

release_workflow_version async

release_workflow_version(
    auth: DomoAuth,
    model_id: str,
    version: str,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

POST releases (deploys/activates) a workflow version.

The version must have a valid savedJson with proper style/zIndex fields for the release to succeed. After release, the version becomes active and can receive triggers (TIMER, MANUAL, etc.).

Source code in src/crew_dcs/routes/workflows.py
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def release_workflow_version(
    auth: DomoAuth,
    model_id: str,
    version: str,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """POST releases (deploys/activates) a workflow version.

    The version must have a valid savedJson with proper style/zIndex fields
    for the release to succeed. After release, the version becomes active
    and can receive triggers (TIMER, MANUAL, etc.).
    """
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v2/models/{model_id}/versions/{version}/release"
    res = await gd.get_data(
        auth=auth,
        method="POST",
        url=url,
        body={},
        context=context,
    )

    if not res.is_success:
        raise Workflow_CRUD_Error(operation="release", workflow_id=model_id, res=res)

    return res

update_workflow async

update_workflow(
    auth: DomoAuth,
    workflow_id: str,
    body: dict | None = None,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Update a workflow.

Source code in src/crew_dcs/routes/workflows.py
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def update_workflow(
    auth: DomoAuth,
    workflow_id: str,
    body: dict | None = None,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Update a workflow."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v1/models/{workflow_id}"
    res = await gd.get_data(
        auth=auth,
        method="PUT",
        url=url,
        body=body or {},
        context=context,
    )

    if not res.is_success:
        raise Workflow_CRUD_Error(operation="update", workflow_id=workflow_id, res=res)

    return res

upsert_workflow_model async

upsert_workflow_model(
    auth: DomoAuth,
    name: str,
    description: str = "",
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Create a workflow model shell (no versions) via the v1 API.

Source code in src/crew_dcs/routes/workflows.py
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def upsert_workflow_model(
    auth: DomoAuth,
    name: str,
    description: str = "",
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Create a workflow model shell (no versions) via the v1 API."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v1/models"
    body = {"name": name, "description": description}
    res = await gd.get_data(
        auth=auth,
        method="POST",
        url=url,
        body=body,
        context=context,
    )

    if not res.is_success:
        raise Workflow_CRUD_Error(operation="upsert_model", res=res)

    return res

upsert_workflow_version async

upsert_workflow_version(
    auth: DomoAuth,
    model_id: str,
    version: str,
    saved_json: str,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

PUT updates an existing version with the provided savedJson string.

Source code in src/crew_dcs/routes/workflows.py
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def upsert_workflow_version(
    auth: DomoAuth,
    model_id: str,
    version: str,
    saved_json: str,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """PUT updates an existing version with the provided savedJson string."""
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v1/models/{model_id}/versions/{version}"
    body = {"savedJson": saved_json}
    res = await gd.get_data(
        auth=auth,
        method="PUT",
        url=url,
        body=body,
        context=context,
    )

    if not res.is_success:
        message = None
        if res.status == 403:
            message = (
                "Unable to update workflow version. Validate that the version is not "
                "deployed/active and that your token has edit permission. "
                "If the version is deployed, create a new version instead of updating "
                "the deployed version in place."
            )
            try:
                version_res = await get_workflow(
                    auth=auth,
                    model_id=model_id,
                    version_id=version,
                    context=context,
                )
                version_meta = version_res.response or {}
                message += (
                    " "
                    f"Current metadata: active={version_meta.get('active')}, "
                    f"deployedOn={version_meta.get('deployedOn')}."
                )
            except Exception:  # noqa: BLE001
                # Keep the core 403 hint even if metadata lookup fails.
                pass
        raise Workflow_CRUD_Error(
            operation="upsert_version", workflow_id=model_id, res=res, message=message
        )

    return res

validate_workflow_model async

validate_workflow_model(
    auth: DomoAuth,
    body: dict,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Validate a workflow graph payload using Domo's official validator API.

Endpoint: POST /api/workflow/v2/models/validate

Source code in src/crew_dcs/routes/workflows.py
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def validate_workflow_model(
    auth: DomoAuth,
    body: dict,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Validate a workflow graph payload using Domo's official validator API.

    Endpoint: ``POST /api/workflow/v2/models/validate``
    """
    url = f"https://{auth.domo_instance}.domo.com/api/workflow/v2/models/validate"
    res = await gd.get_data(
        auth=auth,
        method="POST",
        url=url,
        body=body,
        context=context,
    )

    if not res.is_success:
        raise Workflow_CRUD_Error(operation="validate", res=res)

    return res