Skip to content

toggle

toggle

ToggleConfig_CRUD_Error

ToggleConfig_CRUD_Error(
    res: ResponseGetData, message: str | None = None
)

Bases: Config_CRUD_Error

Raised when a toggle configuration update operation fails.

This exception is used for failures during PUT operations on toggle features, including API errors and unexpected response formats.

Source code in src/crew_dcs/routes/instance_config/toggle.py
41
42
def __init__(self, res: rgd.ResponseGetData, message: str | None = None):
    super().__init__(res=res, message=message)

get_is_invite_social_users_enabled async

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

GET /api/content/v3/customers/{customer_id}/features/free-invite - Retrieve social user invite setting.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object containing Domo credentials.

required
customer_id str

Customer ID for the instance.

required
return_raw bool

If True, return the raw ResponseGetData object. If False (default), return parsed configuration.

False
context RouteContext | None

Optional RouteContext for API request configuration.

None
**context_kwargs Any

Additional context parameters (session, debug_api, etc.).

{}

Returns:

Type Description
ResponseGetData

ResponseGetData object with response field containing a dict with "name"

ResponseGetData

and "is_enabled" keys when return_raw is False, or raw API response

ResponseGetData

when return_raw is True.

Raises:

Type Description
Config_GET_Error

If the API request fails or returns an error status.

Source code in src/crew_dcs/routes/instance_config/toggle.py
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_is_invite_social_users_enabled(
    auth: DomoAuth,
    customer_id: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """GET /api/content/v3/customers/{customer_id}/features/free-invite - Retrieve social user invite setting.

    Args:
        auth: Authentication object containing Domo credentials.
        customer_id: Customer ID for the instance.
        return_raw: If True, return the raw ResponseGetData object.
            If False (default), return parsed configuration.
        context: Optional RouteContext for API request configuration.
        **context_kwargs: Additional context parameters (session, debug_api, etc.).

    Returns:
        ResponseGetData object with response field containing a dict with "name"
        and "is_enabled" keys when return_raw is False, or raw API response
        when return_raw is True.

    Raises:
        Config_GET_Error: If the API request fails or returns an error status.
    """
    # must pass the customer as the short form API endpoint (without customer_id) does not support a GET request
    # url = f"https://{auth.domo_instance}.domo.com/api/content/v3/customers/features/free-invite"

    url = f"https://{auth.domo_instance}.domo.com/api/content/v3/customers/{customer_id}/features/free-invite"

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

    if return_raw:
        return res

    if not res.is_success:
        raise Config_GET_Error(
            res=res,
        )

    res.response = {"name": "free-invite", "is_enabled": res.response["enabled"]}

    return res

get_is_left_nav_enabled async

get_is_left_nav_enabled(
    auth: DomoAuth,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

2025-09-15 current version of leftnav enabled

Source code in src/crew_dcs/routes/instance_config/toggle.py
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_is_left_nav_enabled(
    auth: DomoAuth,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """
    2025-09-15 current version of leftnav enabled
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/nav/v1/leftnav/enabled"

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

    if return_raw:
        return res

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

    res.response = {
        "is_enabled": res.response or False,
        "feature": "use-left-nav",
    }

    return res

get_is_user_invite_notifications_enabled async

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

GET /api/customer/v1/properties/user.invite.email.enabled - Retrieve user invite notification setting.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object containing Domo credentials.

required
return_raw bool

If True, return the raw ResponseGetData object. If False (default), return parsed configuration.

False
context RouteContext | None

Optional RouteContext for API request configuration.

None
**context_kwargs Any

Additional context parameters (session, debug_api, etc.).

{}

Returns:

Type Description
ResponseGetData

ResponseGetData object with response field containing a dict with "name"

ResponseGetData

and "is_enabled" keys when return_raw is False. The "is_enabled" value is

ResponseGetData

converted from the API's string representation via convert_string_to_bool,

ResponseGetData

defaulting to False if the response is not a dict or value is missing.

ResponseGetData

Raw API response is returned when return_raw is True.

Raises:

Type Description
Config_GET_Error

If the API request fails or returns an error status.

Source code in src/crew_dcs/routes/instance_config/toggle.py
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
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
208
209
210
211
212
213
214
215
216
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_is_user_invite_notifications_enabled(
    auth: DomoAuth,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """GET /api/customer/v1/properties/user.invite.email.enabled - Retrieve user invite notification setting.

    Args:
        auth: Authentication object containing Domo credentials.
        return_raw: If True, return the raw ResponseGetData object.
            If False (default), return parsed configuration.
        context: Optional RouteContext for API request configuration.
        **context_kwargs: Additional context parameters (session, debug_api, etc.).

    Returns:
        ResponseGetData object with response field containing a dict with "name"
        and "is_enabled" keys when return_raw is False. The "is_enabled" value is
        converted from the API's string representation via convert_string_to_bool,
        defaulting to False if the response is not a dict or value is missing.
        Raw API response is returned when return_raw is True.

    Raises:
        Config_GET_Error: If the API request fails or returns an error status.
    """
    url = f"https://{auth.domo_instance}.domo.com/api/customer/v1/properties/user.invite.email.enabled"

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

    if return_raw:
        return res

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

    res.response = {
        "name": "user.invite.email.enabled",
        "is_enabled": (
            convert_string_to_bool(res.response.get("value", False))
            if isinstance(res.response, dict)
            else False
        ),
    }

    return res

get_is_weekly_digest_enabled async

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

GET /api/content/v1/customer-states/come-back-to-domo-all-users - Retrieve weekly digest setting.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object containing Domo credentials.

required
return_raw bool

If True, return the raw ResponseGetData object. If False (default), return parsed configuration.

False
context RouteContext | None

Optional RouteContext for API request configuration.

None
**context_kwargs Any

Additional context parameters (session, debug_api, etc.).

{}

Returns:

Type Description
ResponseGetData

ResponseGetData object with response field containing a dict with "is_enabled"

ResponseGetData

and "feature" keys when return_raw is False. The "is_enabled" value is

ResponseGetData

converted from the API's string representation via convert_string_to_bool.

ResponseGetData

Raw API response is returned when return_raw is True.

Raises:

Type Description
Config_CRUD_Error

If the API returns a 404 with "Not Found" response, or if the API request fails or returns any other error status.

Source code in src/crew_dcs/routes/instance_config/toggle.py
261
262
263
264
265
266
267
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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_is_weekly_digest_enabled(
    auth: DomoAuth,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """GET /api/content/v1/customer-states/come-back-to-domo-all-users - Retrieve weekly digest setting.

    Args:
        auth: Authentication object containing Domo credentials.
        return_raw: If True, return the raw ResponseGetData object.
            If False (default), return parsed configuration.
        context: Optional RouteContext for API request configuration.
        **context_kwargs: Additional context parameters (session, debug_api, etc.).

    Returns:
        ResponseGetData object with response field containing a dict with "is_enabled"
        and "feature" keys when return_raw is False. The "is_enabled" value is
        converted from the API's string representation via convert_string_to_bool.
        Raw API response is returned when return_raw is True.

    Raises:
        Config_CRUD_Error: If the API returns a 404 with "Not Found" response,
            or if the API request fails or returns any other error status.
    """
    url = f"https://{auth.domo_instance}.domo.com/api/content/v1/customer-states/come-back-to-domo-all-users"

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

    if return_raw:
        return res

    if res.status == 404 and res.response == "Not Found":
        raise Config_CRUD_Error(res=res)

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

    res.response = {
        "is_enabled": convert_string_to_bool(res.response["value"]),
        "feature": "come-back-to-domo-all-users",
    }

    return res

toggle_is_invite_social_users_enabled async

toggle_is_invite_social_users_enabled(
    auth: DomoAuth,
    customer_id: str,
    is_enabled: bool,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Toggle whether social users can be invited to the instance.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object

required
customer_id str

Customer ID for the instance

required
is_enabled bool

True to enable social user invites, False to disable

required
return_raw bool

Return raw response without processing

False

Returns:

Type Description
ResponseGetData

ResponseGetData with the updated configuration

Source code in src/crew_dcs/routes/instance_config/toggle.py
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
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
151
152
153
154
155
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def toggle_is_invite_social_users_enabled(
    auth: DomoAuth,
    customer_id: str,
    is_enabled: bool,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """
    Toggle whether social users can be invited to the instance.

    Args:
        auth: Authentication object
        customer_id: Customer ID for the instance
        is_enabled: True to enable social user invites, False to disable
        return_raw: Return raw response without processing

    Returns:
        ResponseGetData with the updated configuration
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/content/v3/customers/{customer_id}/features/free-invite"

    body = {"enabled": is_enabled}

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

    if return_raw:
        return res

    if not res.is_success:
        raise ToggleConfig_CRUD_Error(
            res=res,
            message=f"Failed to toggle social user invites to {is_enabled}",
        )

    res.response = {"name": "free-invite", "is_enabled": is_enabled}

    return res

toggle_is_left_nav_enabled async

toggle_is_left_nav_enabled(
    auth: DomoAuth,
    is_use_left_nav: bool = True,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

2025-09-15 -- switched to new leftnav API

Source code in src/crew_dcs/routes/instance_config/toggle.py
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def toggle_is_left_nav_enabled(
    auth: DomoAuth,
    is_use_left_nav: bool = True,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """
    2025-09-15 -- switched to new leftnav API
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/nav/v1/leftnav/customer-settings"

    body = {"enabled": "CUSTOMER"} if is_use_left_nav else {"enabled": "NONE"}

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

    if return_raw:
        return res

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

    res.response = {
        "is_enabled": res.response,
        "feature": "use-left-nav",
    }

    return res

toggle_is_user_invite_enabled async

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

Admin > Company Settings > Notifications

Source code in src/crew_dcs/routes/instance_config/toggle.py
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def toggle_is_user_invite_enabled(
    auth: DomoAuth,
    is_enabled: bool,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """
    Admin > Company Settings > Notifications
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/customer/v1/properties/user.invite.email.enabled"

    body = {"value": is_enabled}

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

    if not res.is_success:
        raise ToggleConfig_CRUD_Error(res=res, message=str(res.response))

    if return_raw:
        return res

    return await get_is_user_invite_notifications_enabled(
        auth=auth,
        context=context,
    )

toggle_is_weekly_digest_enabled async

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

PUT /api/content/v1/customer-states/come-back-to-domo-all-users - Toggle weekly digest feature.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object containing Domo credentials.

required
is_enabled bool

True to enable weekly digest, False to disable (default: True).

True
return_raw bool

If True, return the raw ResponseGetData object. If False (default), return parsed configuration.

False
context RouteContext | None

Optional RouteContext for API request configuration.

None
**context_kwargs Any

Additional context parameters (session, debug_api, etc.).

{}

Returns:

Type Description
ResponseGetData

ResponseGetData object. When return_raw is False, calls get_is_weekly_digest_enabled

ResponseGetData

and returns its result with the updated configuration. When return_raw is True,

ResponseGetData

returns the raw API response from the PUT operation.

Raises:

Type Description
Config_CRUD_Error

If the API request fails or returns an error status.

Source code in src/crew_dcs/routes/instance_config/toggle.py
321
322
323
324
325
326
327
328
329
330
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
360
361
362
363
364
365
366
367
368
369
370
371
372
373
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def toggle_is_weekly_digest_enabled(
    auth: DomoAuth,
    is_enabled: bool = True,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """PUT /api/content/v1/customer-states/come-back-to-domo-all-users - Toggle weekly digest feature.

    Args:
        auth: Authentication object containing Domo credentials.
        is_enabled: True to enable weekly digest, False to disable (default: True).
        return_raw: If True, return the raw ResponseGetData object.
            If False (default), return parsed configuration.
        context: Optional RouteContext for API request configuration.
        **context_kwargs: Additional context parameters (session, debug_api, etc.).

    Returns:
        ResponseGetData object. When return_raw is False, calls get_is_weekly_digest_enabled
        and returns its result with the updated configuration. When return_raw is True,
        returns the raw API response from the PUT operation.

    Raises:
        Config_CRUD_Error: If the API request fails or returns an error status.
    """
    url = f"https://{auth.domo_instance}.domo.com/api/content/v1/customer-states/come-back-to-domo-all-users"

    body = {"name": "come-back-to-domo-all-users", "value": is_enabled}

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

    if return_raw:
        return res

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

    return await get_is_weekly_digest_enabled(
        auth=auth,
        context=context,
    )