Skip to content

objectives

objectives

Objectives (Goals) Package

This package provides objective/goal management functionality for Domo's Goals product, split across multiple modules for better organization.

Modules:

Name Description
exceptions

Exception classes for objective operations

core

Core objective retrieval functions (search, profile, periods, events, reports)

crud

Create, read, update, delete operations for objectives

key_results

Read, create, update, delete operations for key results

tags

Create, read, update, delete operations for tags and tag categories

Category_CRUD_Error

Category_CRUD_Error(
    operation: str = "CRUD",
    category_id: str | None = None,
    res=None,
    message: str | None = None,
    **kwargs
)

Bases: RouteError

Raised when objective tag category create, update, or delete operations fail.

Source code in src/crew_dcs/routes/objectives/exceptions.py
104
105
106
107
108
109
110
111
112
113
114
def __init__(
    self,
    operation: str = "CRUD",
    category_id: str | None = None,
    res=None,
    message: str | None = None,
    **kwargs,
):
    if not message:
        message = f"Objective tag category {operation} operation failed"
    super().__init__(message=message, entity_id=category_id, res=res, **kwargs)

KeyResult_CRUD_Error

KeyResult_CRUD_Error(
    operation: str = "CRUD",
    key_result_id: str | None = None,
    res=None,
    message: str | None = None,
    **kwargs
)

Bases: RouteError

Raised when key result create, update, or delete operations fail.

Source code in src/crew_dcs/routes/objectives/exceptions.py
72
73
74
75
76
77
78
79
80
81
82
def __init__(
    self,
    operation: str = "CRUD",
    key_result_id: str | None = None,
    res=None,
    message: str | None = None,
    **kwargs,
):
    if not message:
        message = f"Key result {operation} operation failed"
    super().__init__(message=message, entity_id=key_result_id, res=res, **kwargs)

KeyResult_GET_Error

KeyResult_GET_Error(
    key_result_id: str | None = None, res=None, **kwargs
)

Bases: RouteError

Raised when key result retrieval operations fail.

Source code in src/crew_dcs/routes/objectives/exceptions.py
60
61
62
63
64
65
66
def __init__(self, key_result_id: str | None = None, res=None, **kwargs):
    super().__init__(
        message="Key result retrieval failed",
        entity_id=key_result_id,
        res=res,
        **kwargs,
    )

Objectives_CRUD_Error

Objectives_CRUD_Error(
    operation: str = "CRUD",
    objective_id: str | None = None,
    res=None,
    message: str | None = None,
    **kwargs
)

Bases: RouteError

Raised when objective create, update, or delete operations fail.

Source code in src/crew_dcs/routes/objectives/exceptions.py
37
38
39
40
41
42
43
44
45
46
47
def __init__(
    self,
    operation: str = "CRUD",
    objective_id: str | None = None,
    res=None,
    message: str | None = None,
    **kwargs,
):
    if not message:
        message = f"Objective {operation} operation failed"
    super().__init__(message=message, entity_id=objective_id, res=res, **kwargs)

Objectives_CreateParams_Error

Objectives_CreateParams_Error(message: str, **kwargs)

Bases: RouteError

Raised when objective creation parameters are invalid.

Source code in src/crew_dcs/routes/objectives/exceptions.py
53
54
def __init__(self, message: str, **kwargs):
    super().__init__(message=message, **kwargs)

Objectives_GET_Error

Objectives_GET_Error(
    objective_id: str | None = None, res=None, **kwargs
)

Bases: RouteError

Raised when objective retrieval operations fail.

Source code in src/crew_dcs/routes/objectives/exceptions.py
25
26
27
28
29
30
31
def __init__(self, objective_id: str | None = None, res=None, **kwargs):
    super().__init__(
        message="Objective retrieval failed",
        entity_id=objective_id,
        res=res,
        **kwargs,
    )

Tag_CRUD_Error

Tag_CRUD_Error(
    operation: str = "CRUD",
    tag_id: str | None = None,
    res=None,
    message: str | None = None,
    **kwargs
)

Bases: RouteError

Raised when objective tag create, update, or delete operations fail.

Source code in src/crew_dcs/routes/objectives/exceptions.py
88
89
90
91
92
93
94
95
96
97
98
def __init__(
    self,
    operation: str = "CRUD",
    tag_id: str | None = None,
    res=None,
    message: str | None = None,
    **kwargs,
):
    if not message:
        message = f"Objective tag {operation} operation failed"
    super().__init__(message=message, entity_id=tag_id, res=res, **kwargs)

create_category async

create_category(
    auth: DomoAuth,
    name: str | None = None,
    payload: dict | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Create a new objective tag category.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
name str | None

Name for the new tag category

None
payload dict | None

Pre-built payload (overrides name)

None
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing the created tag category

Raises:

Type Description
Category_CRUD_Error

If category creation fails

Source code in src/crew_dcs/routes/objectives/tags.py
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def create_category(
    auth: DomoAuth,
    name: str | None = None,
    payload: dict | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Create a new objective tag category.

    Args:
        auth: Authentication object for API requests
        name: Name for the new tag category
        payload: Pre-built payload (overrides name)
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing the created tag category

    Raises:
        Category_CRUD_Error: If category creation fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    payload = payload or generate_create_category_body(name=name)
    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/tags/categories"

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

    if return_raw:
        return res
    if not res.is_success:
        raise Category_CRUD_Error(operation="create", category_id=name, res=res)
    return res

create_key_result async

create_key_result(
    auth: DomoAuth,
    name: str | None = None,
    owner_id: int | None = None,
    payload: dict | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Create a new key result.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
name str | None

Name for the new key result

None
owner_id int | None

Owner ID for the new key result

None
payload dict | None

Pre-built {"keyResult": {...}} payload (overrides name/owner_id, see generate_create_key_result_body for the full set of supported fields)

None
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing the created key result

Raises:

Type Description
KeyResult_CRUD_Error

If key result creation fails

Source code in src/crew_dcs/routes/objectives/key_results.py
156
157
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def create_key_result(
    auth: DomoAuth,
    name: str | None = None,
    owner_id: int | None = None,
    payload: dict | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Create a new key result.

    Args:
        auth: Authentication object for API requests
        name: Name for the new key result
        owner_id: Owner ID for the new key result
        payload: Pre-built `{"keyResult": {...}}` payload (overrides
            name/owner_id, see generate_create_key_result_body for the full
            set of supported fields)
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing the created key result

    Raises:
        KeyResult_CRUD_Error: If key result creation fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    payload = payload or generate_create_key_result_body(name=name, owner_id=owner_id)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/key-results"

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

    if return_raw:
        return res
    if not res.is_success:
        raise KeyResult_CRUD_Error(operation="create", key_result_id=name, res=res)
    return res

create_objective async

create_objective(
    auth: DomoAuth,
    name: str | None = None,
    period_id: int | None = None,
    payload: dict | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Create a new objective.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
name str | None

Name for the new objective

None
period_id int | None

Period ID the objective belongs to

None
payload dict | None

Pre-built payload (overrides name/period_id, see generate_create_objective_body for the full set of supported fields)

None
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing the created objective

Raises:

Type Description
Objectives_CreateParams_Error

If required parameters are missing

Objectives_CRUD_Error

If objective creation fails

Source code in src/crew_dcs/routes/objectives/crud.py
 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
102
103
104
105
106
107
108
109
110
111
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def create_objective(
    auth: DomoAuth,
    name: str | None = None,
    period_id: int | None = None,
    payload: dict | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Create a new objective.

    Args:
        auth: Authentication object for API requests
        name: Name for the new objective
        period_id: Period ID the objective belongs to
        payload: Pre-built payload (overrides name/period_id, see
            generate_create_objective_body for the full set of supported fields)
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing the created objective

    Raises:
        Objectives_CreateParams_Error: If required parameters are missing
        Objectives_CRUD_Error: If objective creation fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    if not payload and not (name and period_id):
        raise Objectives_CreateParams_Error(
            "Either payload must be provided or both name and period_id are required"
        )

    payload = payload or generate_create_objective_body(name=name, period_id=period_id)
    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives"

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_CRUD_Error(operation="create", objective_id=name, res=res)
    return res

create_tag async

create_tag(
    auth: DomoAuth,
    name: str | None = None,
    category_id: int | None = None,
    category_name: str | None = None,
    payload: dict | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Create a new objective tag.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
name str | None

Name for the new tag

None
category_id int | None

Optional category ID to assign the tag to

None
category_name str | None

Optional category name to assign the tag to

None
payload dict | None

Pre-built payload (overrides name/category_id/category_name)

None
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing the created tag

Raises:

Type Description
Tag_CRUD_Error

If tag creation fails

Source code in src/crew_dcs/routes/objectives/tags.py
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
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(result_processor=ResponseGetDataProcessor()),
)
async def create_tag(
    auth: DomoAuth,
    name: str | None = None,
    category_id: int | None = None,
    category_name: str | None = None,
    payload: dict | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Create a new objective tag.

    Args:
        auth: Authentication object for API requests
        name: Name for the new tag
        category_id: Optional category ID to assign the tag to
        category_name: Optional category name to assign the tag to
        payload: Pre-built payload (overrides name/category_id/category_name)
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing the created tag

    Raises:
        Tag_CRUD_Error: If tag creation fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    payload = payload or generate_create_tag_body(
        name=name, category_id=category_id, category_name=category_name
    )
    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/tags"

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

    if return_raw:
        return res
    if not res.is_success:
        raise Tag_CRUD_Error(operation="create", tag_id=name, res=res)
    return res

delete_category async

delete_category(
    auth: DomoAuth,
    category_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Delete an objective tag category.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
category_id int | str

ID of the tag category to delete

required
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object confirming deletion

Raises:

Type Description
Category_CRUD_Error

If category deletion fails

Source code in src/crew_dcs/routes/objectives/tags.py
365
366
367
368
369
370
371
372
373
374
375
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def delete_category(
    auth: DomoAuth,
    category_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Delete an objective tag category.

    Args:
        auth: Authentication object for API requests
        category_id: ID of the tag category to delete
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object confirming deletion

    Raises:
        Category_CRUD_Error: If category deletion fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/tags/categories/{category_id}"

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

    if return_raw:
        return res
    if not res.is_success:
        raise Category_CRUD_Error(
            operation="delete", category_id=str(category_id), res=res
        )
    return res

delete_key_result async

delete_key_result(
    auth: DomoAuth,
    key_result_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Delete a key result.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
key_result_id int | str

ID of the key result to delete

required
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object confirming deletion

Raises:

Type Description
KeyResult_CRUD_Error

If key result deletion fails

Source code in src/crew_dcs/routes/objectives/key_results.py
308
309
310
311
312
313
314
315
316
317
318
319
320
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def delete_key_result(
    auth: DomoAuth,
    key_result_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Delete a key result.

    Args:
        auth: Authentication object for API requests
        key_result_id: ID of the key result to delete
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object confirming deletion

    Raises:
        KeyResult_CRUD_Error: If key result deletion fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/key-results/{key_result_id}"

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

    if return_raw:
        return res
    if not res.is_success:
        raise KeyResult_CRUD_Error(
            operation="delete", key_result_id=str(key_result_id), res=res
        )
    return res

delete_objective async

delete_objective(
    auth: DomoAuth,
    objective_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Delete an objective.

Note: the Postman collection lists this endpoint without the {{baseUrl}} prefix (i.e. just /social/v1/objectives/:id), which appears to be a collection bug. This function uses the full {{baseUrl}}-prefixed URL, consistent with every other endpoint in the API.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
objective_id int | str

ID of the objective to delete

required
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object confirming deletion

Raises:

Type Description
Objectives_CRUD_Error

If objective deletion fails

Source code in src/crew_dcs/routes/objectives/crud.py
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
217
218
219
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def delete_objective(
    auth: DomoAuth,
    objective_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Delete an objective.

    Note: the Postman collection lists this endpoint without the {{baseUrl}}
    prefix (i.e. just `/social/v1/objectives/:id`), which appears to be a
    collection bug. This function uses the full `{{baseUrl}}`-prefixed URL,
    consistent with every other endpoint in the API.

    Args:
        auth: Authentication object for API requests
        objective_id: ID of the objective to delete
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object confirming deletion

    Raises:
        Objectives_CRUD_Error: If objective deletion fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = (
        f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/{objective_id}"
    )

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_CRUD_Error(
            operation="delete", objective_id=str(objective_id), res=res
        )
    return res

delete_tag async

delete_tag(
    auth: DomoAuth,
    tag_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Delete an objective tag.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
tag_id int | str

ID of the tag to delete

required
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object confirming deletion

Raises:

Type Description
Tag_CRUD_Error

If tag deletion fails

Source code in src/crew_dcs/routes/objectives/tags.py
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
259
260
261
262
263
264
265
266
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def delete_tag(
    auth: DomoAuth,
    tag_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Delete an objective tag.

    Args:
        auth: Authentication object for API requests
        tag_id: ID of the tag to delete
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object confirming deletion

    Raises:
        Tag_CRUD_Error: If tag deletion fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = (
        f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/tags/{tag_id}"
    )

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

    if return_raw:
        return res
    if not res.is_success:
        raise Tag_CRUD_Error(operation="delete", tag_id=str(tag_id), res=res)
    return res

generate_create_category_body

generate_create_category_body(name: str) -> dict

Generate payload for objective tag category creation.

Source code in src/crew_dcs/routes/objectives/tags.py
269
270
271
def generate_create_category_body(name: str) -> dict:
    """Generate payload for objective tag category creation."""
    return {"name": name}

generate_create_key_result_body

generate_create_key_result_body(
    name: str,
    owner_id: int,
    owner_type: str = "USER",
    owners: list[dict] | None = None,
    state: str = "OPEN",
    description: str | None = None,
    alert_id: int | None = None,
    resource_id: str | None = None,
    resource_type: str | None = None,
    data_achievement_score: float = 0.0,
    measurement: str = "",
    start_value: float = 0,
    current_value: float = 0,
    target_value: float = 0,
    status: str = "NOT_STARTED",
    color_value: str = "#F34847",
    operator: str = "GREATER_THAN_EQUALS_TO",
) -> dict

Generate payload for key result creation.

Returns the full {"keyResult": {...}} envelope expected by the create key result endpoint.

Source code in src/crew_dcs/routes/objectives/key_results.py
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
def generate_create_key_result_body(
    name: str,
    owner_id: int,
    owner_type: str = "USER",
    owners: list[dict] | None = None,
    state: str = "OPEN",
    description: str | None = None,
    alert_id: int | None = None,
    resource_id: str | None = None,
    resource_type: str | None = None,
    data_achievement_score: float = 0.0,
    measurement: str = "",
    start_value: float = 0,
    current_value: float = 0,
    target_value: float = 0,
    status: str = "NOT_STARTED",
    color_value: str = "#F34847",
    operator: str = "GREATER_THAN_EQUALS_TO",
) -> dict:
    """Generate payload for key result creation.

    Returns the full `{"keyResult": {...}}` envelope expected by the create
    key result endpoint.
    """
    return {
        "keyResult": {
            "state": state,
            "ownerId": owner_id,
            "ownerType": owner_type,
            "owners": owners or [{"ownerId": owner_id, "ownerType": owner_type}],
            "alertId": alert_id,
            "resourceId": resource_id,
            "resourceType": resource_type,
            "name": name,
            "description": description,
            "dataAchievementScore": data_achievement_score,
            "measurement": measurement,
            "startValue": start_value,
            "currentValue": current_value,
            "targetValue": target_value,
            "status": status,
            "colorValue": color_value,
            "operator": operator,
        }
    }

generate_create_objective_body

generate_create_objective_body(
    name: str,
    period_id: int,
    description: str | None = None,
    starts_at: str | None = None,
    expires_at: str | None = None,
    status: str = "NOT_STARTED",
    owner_id: int | None = None,
    owners: list[dict] | None = None,
    assignees: list[dict] | None = None,
    parent_id: int | None = None,
    key_results: list[dict] | None = None,
    tags: list | None = None,
    write_access: bool = True,
    type: str = "PERSONAL",
) -> dict

Generate payload for objective creation.

Source code in src/crew_dcs/routes/objectives/crud.py
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
def generate_create_objective_body(
    name: str,
    period_id: int,
    description: str | None = None,
    starts_at: str | None = None,
    expires_at: str | None = None,
    status: str = "NOT_STARTED",
    owner_id: int | None = None,
    owners: list[dict] | None = None,
    assignees: list[dict] | None = None,
    parent_id: int | None = None,
    key_results: list[dict] | None = None,
    tags: list | None = None,
    write_access: bool = True,
    type: str = "PERSONAL",
) -> dict:
    """Generate payload for objective creation."""
    return {
        "name": name,
        "description": description,
        "startsAt": starts_at,
        "expiresAt": expires_at,
        "status": status,
        "ownerId": owner_id,
        "owners": owners or [],
        "assignees": assignees or [],
        "periodId": period_id,
        "parentId": parent_id,
        "keyResults": key_results or [],
        "tags": tags or [],
        "writeAccess": write_access,
        "type": type,
    }

generate_create_tag_body

generate_create_tag_body(
    name: str,
    category_id: int | None = None,
    category_name: str | None = None,
) -> dict

Generate payload for objective tag creation.

Source code in src/crew_dcs/routes/objectives/tags.py
118
119
120
121
122
123
124
125
126
127
def generate_create_tag_body(
    name: str,
    category_id: int | None = None,
    category_name: str | None = None,
) -> dict:
    """Generate payload for objective tag creation."""
    payload = {"name": name}
    if category_id is not None or category_name is not None:
        payload["category"] = {"id": category_id, "name": category_name}
    return payload

get_events async

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

List objective events.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing objective events

Raises:

Type Description
Objectives_GET_Error

If event retrieval fails

Source code in src/crew_dcs/routes/objectives/core.py
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
259
260
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_events(
    auth: DomoAuth,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """List objective events.

    Args:
        auth: Authentication object for API requests
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing objective events

    Raises:
        Objectives_GET_Error: If event retrieval fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/events"

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_GET_Error(res=res)
    return res

get_key_result_chart async

get_key_result_chart(
    auth: DomoAuth,
    key_result_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Get chart data for a key result.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
key_result_id int | str

ID of the key result

required
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing key result chart data

Raises:

Type Description
KeyResult_GET_Error

If chart retrieval fails

Source code in src/crew_dcs/routes/objectives/key_results.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_key_result_chart(
    auth: DomoAuth,
    key_result_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Get chart data for a key result.

    Args:
        auth: Authentication object for API requests
        key_result_id: ID of the key result
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing key result chart data

    Raises:
        KeyResult_GET_Error: If chart retrieval fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/key-results/{key_result_id}/chart"

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

    if return_raw:
        return res
    if not res.is_success:
        raise KeyResult_GET_Error(key_result_id=str(key_result_id), res=res)
    return res

get_key_result_values async

get_key_result_values(
    auth: DomoAuth,
    key_result_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Get historical values for a key result.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
key_result_id int | str

ID of the key result

required
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing key result values

Raises:

Type Description
KeyResult_GET_Error

If value retrieval fails

Source code in src/crew_dcs/routes/objectives/key_results.py
 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
102
103
104
105
106
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_key_result_values(
    auth: DomoAuth,
    key_result_id: int | str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Get historical values for a key result.

    Args:
        auth: Authentication object for API requests
        key_result_id: ID of the key result
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing key result values

    Raises:
        KeyResult_GET_Error: If value retrieval fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/key-results/{key_result_id}/values"

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

    if return_raw:
        return res
    if not res.is_success:
        raise KeyResult_GET_Error(key_result_id=str(key_result_id), res=res)
    return res

get_objective_drafts async

get_objective_drafts(
    auth: DomoAuth,
    filter_key_results: bool = False,
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

List objective drafts.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
filter_key_results bool

Whether to filter out key results from the response

False
period_id int | None

Optional period ID to filter objective drafts by

None
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing objective drafts

Raises:

Type Description
Objectives_GET_Error

If draft retrieval fails

Source code in src/crew_dcs/routes/objectives/core.py
310
311
312
313
314
315
316
317
318
319
320
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_objective_drafts(
    auth: DomoAuth,
    filter_key_results: bool = False,
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """List objective drafts.

    Args:
        auth: Authentication object for API requests
        filter_key_results: Whether to filter out key results from the response
        period_id: Optional period ID to filter objective drafts by
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing objective drafts

    Raises:
        Objectives_GET_Error: If draft retrieval fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v2/objectives/draft"
    params = {"filterKeyResults": filter_key_results}
    if period_id is not None:
        params["periodId"] = period_id

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_GET_Error(res=res)
    return res

get_objectives async

get_objectives(
    auth: DomoAuth,
    filter_key_results: bool = False,
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Search objectives.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
filter_key_results bool

Whether to filter out key results from the response

False
period_id int | None

Optional period ID to filter objectives by

None
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing matching objectives

Raises:

Type Description
Objectives_GET_Error

If objective search fails

Source code in src/crew_dcs/routes/objectives/core.py
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_objectives(
    auth: DomoAuth,
    filter_key_results: bool = False,
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Search objectives.

    Args:
        auth: Authentication object for API requests
        filter_key_results: Whether to filter out key results from the response
        period_id: Optional period ID to filter objectives by
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing matching objectives

    Raises:
        Objectives_GET_Error: If objective search fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/search"
    params = {"filterKeyResults": filter_key_results}
    if period_id is not None:
        params["periodId"] = period_id

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_GET_Error(res=res)
    return res

get_objectives_needing_update async

get_objectives_needing_update(
    auth: DomoAuth,
    filter_key_results: bool = False,
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

List objectives that need an update.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
filter_key_results bool

Whether to filter out key results from the response

False
period_id int | None

Optional period ID to filter objectives by

None
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing objectives needing an update

Raises:

Type Description
Objectives_GET_Error

If objective retrieval fails

Source code in src/crew_dcs/routes/objectives/core.py
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_objectives_needing_update(
    auth: DomoAuth,
    filter_key_results: bool = False,
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """List objectives that need an update.

    Args:
        auth: Authentication object for API requests
        filter_key_results: Whether to filter out key results from the response
        period_id: Optional period ID to filter objectives by
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing objectives needing an update

    Raises:
        Objectives_GET_Error: If objective retrieval fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/needs-update"
    params = {"filterKeyResults": filter_key_results}
    if period_id is not None:
        params["periodId"] = period_id

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_GET_Error(res=res)
    return res

get_objectives_report async

get_objectives_report(
    auth: DomoAuth,
    filter_key_results: bool = False,
    period_id: int | None = None,
    type: str = "COMPANY",
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Get an objectives report (e.g. the company objectives report).

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
filter_key_results bool

Whether to filter out key results from the response

False
period_id int | None

Optional period ID to filter the report by

None
type str

Report scope type (e.g. "COMPANY", "PERSONAL", "TEAM")

'COMPANY'
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing the objectives report

Raises:

Type Description
Objectives_GET_Error

If report retrieval fails

Source code in src/crew_dcs/routes/objectives/core.py
357
358
359
360
361
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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_objectives_report(
    auth: DomoAuth,
    filter_key_results: bool = False,
    period_id: int | None = None,
    type: str = "COMPANY",
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Get an objectives report (e.g. the company objectives report).

    Args:
        auth: Authentication object for API requests
        filter_key_results: Whether to filter out key results from the response
        period_id: Optional period ID to filter the report by
        type: Report scope type (e.g. "COMPANY", "PERSONAL", "TEAM")
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing the objectives report

    Raises:
        Objectives_GET_Error: If report retrieval fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v2/objectives/report"
    params = {"filterKeyResults": filter_key_results, "type": type}
    if period_id is not None:
        params["periodId"] = period_id

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_GET_Error(res=res)
    return res

get_periods async

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

List objective periods.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
all bool

Whether to return all periods

True
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing objective periods

Raises:

Type Description
Objectives_GET_Error

If period retrieval fails

Source code in src/crew_dcs/routes/objectives/core.py
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
217
218
219
220
221
222
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_periods(
    auth: DomoAuth,
    all: bool = True,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """List objective periods.

    Args:
        auth: Authentication object for API requests
        all: Whether to return all periods
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing objective periods

    Raises:
        Objectives_GET_Error: If period retrieval fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/periods"
    params = {"all": all}

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_GET_Error(res=res)
    return res

get_personal_objectives async

get_personal_objectives(
    auth: DomoAuth,
    filter_key_results: bool = False,
    include_sample_goal: bool = False,
    period_id: int | None = None,
    type: str = "PERSONAL",
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

List objectives for the current user's profile.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
filter_key_results bool

Whether to filter out key results from the response

False
include_sample_goal bool

Whether to include Domo's sample goal in the response

False
period_id int | None

Optional period ID to filter objectives by

None
type str

Objective type to filter by (e.g. "PERSONAL")

'PERSONAL'
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing personal objectives

Raises:

Type Description
Objectives_GET_Error

If objective retrieval fails

Source code in src/crew_dcs/routes/objectives/core.py
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_personal_objectives(
    auth: DomoAuth,
    filter_key_results: bool = False,
    include_sample_goal: bool = False,
    period_id: int | None = None,
    type: str = "PERSONAL",
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """List objectives for the current user's profile.

    Args:
        auth: Authentication object for API requests
        filter_key_results: Whether to filter out key results from the response
        include_sample_goal: Whether to include Domo's sample goal in the response
        period_id: Optional period ID to filter objectives by
        type: Objective type to filter by (e.g. "PERSONAL")
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing personal objectives

    Raises:
        Objectives_GET_Error: If objective retrieval fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v2/objectives/profile"
    params = {
        "filterKeyResults": filter_key_results,
        "includeSampleGoal": include_sample_goal,
        "type": type,
    }
    if period_id is not None:
        params["periodId"] = period_id

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_GET_Error(res=res)
    return res

get_tag_categories async

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

List objective tag categories.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
all bool

Whether to return all tag categories

True
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing objective tag categories

Raises:

Type Description
Objectives_GET_Error

If category retrieval fails

Source code in src/crew_dcs/routes/objectives/tags.py
 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_tag_categories(
    auth: DomoAuth,
    all: bool = True,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """List objective tag categories.

    Args:
        auth: Authentication object for API requests
        all: Whether to return all tag categories
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing objective tag categories

    Raises:
        Objectives_GET_Error: If category retrieval fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/tags/categories"
    params = {"all": all}

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_GET_Error(res=res)
    return res

get_tags async

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

List objective tags.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
all bool

Whether to return all tags

True
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing objective tags

Raises:

Type Description
Objectives_GET_Error

If tag retrieval fails

Source code in src/crew_dcs/routes/objectives/tags.py
32
33
34
35
36
37
38
39
40
41
42
43
44
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_tags(
    auth: DomoAuth,
    all: bool = True,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """List objective tags.

    Args:
        auth: Authentication object for API requests
        all: Whether to return all tags
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing objective tags

    Raises:
        Objectives_GET_Error: If tag retrieval fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/tags"
    params = {"all": all}

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_GET_Error(res=res)
    return res

get_team_objectives async

get_team_objectives(
    auth: DomoAuth,
    filter_key_results: bool = False,
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

List objectives for teams.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
filter_key_results bool

Whether to filter out key results from the response

False
period_id int | None

Optional period ID to filter objectives by

None
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing team objectives

Raises:

Type Description
Objectives_GET_Error

If objective retrieval fails

Source code in src/crew_dcs/routes/objectives/core.py
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
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
179
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def get_team_objectives(
    auth: DomoAuth,
    filter_key_results: bool = False,
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """List objectives for teams.

    Args:
        auth: Authentication object for API requests
        filter_key_results: Whether to filter out key results from the response
        period_id: Optional period ID to filter objectives by
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing team objectives

    Raises:
        Objectives_GET_Error: If objective retrieval fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = (
        f"https://{auth.domo_instance}.domo.com/api/social/v2/objectives/teams-profile"
    )
    params = {"filterKeyResults": filter_key_results}
    if period_id is not None:
        params["periodId"] = period_id

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_GET_Error(res=res)
    return res

update_category async

update_category(
    auth: DomoAuth,
    category_id: int | str,
    payload: dict,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Update an existing objective tag category.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
category_id int | str

ID of the tag category to update

required
payload dict

Updated tag category payload

required
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing the updated tag category

Raises:

Type Description
Category_CRUD_Error

If category update fails

Source code in src/crew_dcs/routes/objectives/tags.py
319
320
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def update_category(
    auth: DomoAuth,
    category_id: int | str,
    payload: dict,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Update an existing objective tag category.

    Args:
        auth: Authentication object for API requests
        category_id: ID of the tag category to update
        payload: Updated tag category payload
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing the updated tag category

    Raises:
        Category_CRUD_Error: If category update fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/tags/categories/{category_id}"

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

    if return_raw:
        return res
    if not res.is_success:
        raise Category_CRUD_Error(
            operation="update", category_id=str(category_id), res=res
        )
    return res

update_key_result async

update_key_result(
    auth: DomoAuth,
    key_result_id: int | str,
    payload: dict,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Update an existing key result.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
key_result_id int | str

ID of the key result to update

required
payload dict

Updated key result payload

required
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing the updated key result

Raises:

Type Description
KeyResult_CRUD_Error

If key result update fails

Source code in src/crew_dcs/routes/objectives/key_results.py
206
207
208
209
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
238
239
240
241
242
243
244
245
246
247
248
249
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def update_key_result(
    auth: DomoAuth,
    key_result_id: int | str,
    payload: dict,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Update an existing key result.

    Args:
        auth: Authentication object for API requests
        key_result_id: ID of the key result to update
        payload: Updated key result payload
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing the updated key result

    Raises:
        KeyResult_CRUD_Error: If key result update fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/key-results/{key_result_id}"

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

    if return_raw:
        return res
    if not res.is_success:
        raise KeyResult_CRUD_Error(
            operation="update", key_result_id=str(key_result_id), res=res
        )
    return res

update_key_result_tags async

update_key_result_tags(
    auth: DomoAuth,
    key_result_id: int | str,
    tag_ids: list[int],
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Replace the tags assigned to a key result.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
key_result_id int | str

ID of the key result to tag

required
tag_ids list[int]

List of tag IDs to assign to the key result, e.g. [1]

required
period_id int | None

Optional period ID query parameter

None
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object confirming the tag update

Raises:

Type Description
KeyResult_CRUD_Error

If tag update fails

Source code in src/crew_dcs/routes/objectives/key_results.py
252
253
254
255
256
257
258
259
260
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def update_key_result_tags(
    auth: DomoAuth,
    key_result_id: int | str,
    tag_ids: list[int],
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Replace the tags assigned to a key result.

    Args:
        auth: Authentication object for API requests
        key_result_id: ID of the key result to tag
        tag_ids: List of tag IDs to assign to the key result, e.g. [1]
        period_id: Optional period ID query parameter
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object confirming the tag update

    Raises:
        KeyResult_CRUD_Error: If tag update fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/key-results/{key_result_id}/tags"
    params = {}
    if period_id is not None:
        params["periodId"] = period_id

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

    if return_raw:
        return res
    if not res.is_success:
        raise KeyResult_CRUD_Error(
            operation="update tags", key_result_id=str(key_result_id), res=res
        )
    return res

update_objective async

update_objective(
    auth: DomoAuth,
    objective_id: int | str,
    payload: dict,
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Update an existing objective.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
objective_id int | str

ID of the objective to update

required
payload dict

Updated objective payload (see generate_create_objective_body for the full set of supported fields)

required
period_id int | None

Optional period ID query parameter

None
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing the updated objective

Raises:

Type Description
Objectives_CRUD_Error

If objective update fails

Source code in src/crew_dcs/routes/objectives/crud.py
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def update_objective(
    auth: DomoAuth,
    objective_id: int | str,
    payload: dict,
    period_id: int | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Update an existing objective.

    Args:
        auth: Authentication object for API requests
        objective_id: ID of the objective to update
        payload: Updated objective payload (see generate_create_objective_body
            for the full set of supported fields)
        period_id: Optional period ID query parameter
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing the updated objective

    Raises:
        Objectives_CRUD_Error: If objective update fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = (
        f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/{objective_id}"
    )
    params = {}
    if period_id is not None:
        params["periodId"] = period_id

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

    if return_raw:
        return res
    if not res.is_success:
        raise Objectives_CRUD_Error(
            operation="update", objective_id=str(objective_id), res=res
        )
    return res

update_tag async

update_tag(
    auth: DomoAuth,
    tag_id: int | str,
    payload: dict,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
) -> ResponseGetData

Update an existing objective tag.

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object for API requests

required
tag_id int | str

ID of the tag to update

required
payload dict

Updated tag payload

required
return_raw bool

Return raw response without processing

False
context RouteContext | None

RouteContext for request configuration

None

Returns:

Type Description
ResponseGetData

ResponseGetData object containing the updated tag

Raises:

Type Description
Tag_CRUD_Error

If tag update fails

Source code in src/crew_dcs/routes/objectives/tags.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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def update_tag(
    auth: DomoAuth,
    tag_id: int | str,
    payload: dict,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Update an existing objective tag.

    Args:
        auth: Authentication object for API requests
        tag_id: ID of the tag to update
        payload: Updated tag payload
        return_raw: Return raw response without processing
        context: RouteContext for request configuration

    Returns:
        ResponseGetData object containing the updated tag

    Raises:
        Tag_CRUD_Error: If tag update fails
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    url = (
        f"https://{auth.domo_instance}.domo.com/api/social/v1/objectives/tags/{tag_id}"
    )

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

    if return_raw:
        return res
    if not res.is_success:
        raise Tag_CRUD_Error(operation="update", tag_id=str(tag_id), res=res)
    return res

Modules