Skip to main content

TASK API Reference

Module Information

Service Files:

  • Private: service/private/task.js

Available Services: 18 Documented Services: 18


task.list

List tasks scoped to a folder node, ordered by Kanban column then rank. Returns all statuses for that folder.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/task.list

Parameters

ParameterTypeRequiredDefaultDescription
nidstringNo-Folder node id to scope to. Absent/null returns legacy unscoped (nid IS NULL) tasks.
include_unscopednumberNo0When 1 (workspace-root view), also include legacy tasks with no folder (nid IS NULL).

Returns

FieldTypeDescription
typeany-
docany-
itemsobject-
items.idstringTask ID
items.titlestringTask title
items.descriptionstringTask description (long text), null if not set
items.statusstringKanban column: todo
items.prioritystringPriority: low
items.due_datestringDue date (YYYY-MM-DD), null if not set
items.created_bystringUID of the user who created the task
items.nidstringFolder node id the task belongs to, null if workspace-level (legacy)
items.assignee_uidsstringComma-separated list of assignee UIDs, null if unassigned
items.ranknumberPosition within the status column
items.ctimenumberUnix timestamp of creation
items.mtimenumberUnix timestamp of last update
items.label_idsstringComma-separated list of label IDs attached to the task, null if none

task.create

Create a new task scoped to a folder node. The task is placed at the bottom of the target status column within that folder.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.create

Parameters

ParameterTypeRequiredDefaultDescription
titlestringYes-Task title
descriptionstringNo-Long-form task description. Optional.
statusstring (todo, in_progress, to_review, complete)No"todo"Initial Kanban column. Defaults to todo.
prioritystring (low, medium, high, urgent)No"medium"Task priority. Defaults to medium.
due_datestringNo-Due date in YYYY-MM-DD format. Optional.
nidstringNo-Folder node id the task belongs to. Absent/null = workspace-level.
assignee_uidsarray<string>No-UIDs of the users to assign. Optional. Each must be a valid drumate.
assignee_uidstringNo-Deprecated single-assignee form (use assignee_uids). Still accepted.
mention_uidsarray<string>No-UIDs @-mentioned in the description. Server notifies each (excluding self).

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error CodeHTTP StatusDescription
INVALID_ASSIGNEE400assignee_uid does not reference a valid user

task.update

Update a task's title, description, priority and/or due date. Title / description / priority: omit to keep existing value. due_date is always written through (pass null to clear).

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.update

Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID to update
titlestringNo-New task title. Omit to keep existing value.
descriptionstringNo-New task description. Omit to keep existing value; pass empty string to clear.
prioritystring (low, medium, high, urgent)No-New priority. Omit to keep existing value.
due_datestringNo-New due date in YYYY-MM-DD format. Pass null to clear.
mention_uidsarray<string>No-UIDs newly @-mentioned in this edit. Server notifies each (excluding self).

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error CodeHTTP StatusDescription
TASK_NOT_FOUND404No task found with the given ID
INVALID_PRIORITY400priority must be one of: low, medium, high, urgent

task.update_status

Move a task to a different Kanban column. The task is placed at the bottom of the destination column.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.update_status

Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID to move
statusstring (todo, in_progress, to_review, complete)Yes-Destination Kanban column

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error CodeHTTP StatusDescription
TASK_NOT_FOUND404No task found with the given ID
INVALID_STATUS400status must be one of: todo, in_progress, to_review, complete

task.update_assignee

Replace a task's assignee set (multi-assignee). Pass the full new set in assignee_uids; an empty array clears all assignees.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.update_assignee

Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID
assignee_uidsarray<string>No-Full new set of assignee UIDs. [] clears all. Each must be a valid drumate.
assignee_uidstringNo-Deprecated single-assignee form (use assignee_uids). Still accepted; null unassigns.

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error CodeHTTP StatusDescription
TASK_NOT_FOUND404No task found with the given ID
INVALID_ASSIGNEE400assignee_uid does not reference a valid user

task.delete

Delete a task permanently. All linked file and label associations are removed.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.delete

Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID to delete

Returns

FieldTypeDescription
typeany-
docany-
propertiesany-

Link a file (media node) to a task. Idempotent — linking the same file twice has no effect. Returns the full updated list of files linked to the task.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.link_file

Parameters

ParameterTypeRequiredDefaultDescription
task_idstringYes-Task ID to link the file to
file_nidstringYes-Media node ID of the file to link

Returns

FieldTypeDescription
typeany-
docany-
itemsobject-
items.task_idstringTask ID
items.file_nidstringFile media node ID
items.linked_bystringUID of the user who linked the file
items.ctimenumberUnix timestamp of when the file was linked
items.filenamestringFile display name (user_filename from media)
items.categorystringFile category (document, image, etc.)
items.extensionstringFile extension
items.filesizenumberFile size in bytes

Remove the link between a file and a task. The file itself is not deleted from the hub.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.unlink_file

Parameters

ParameterTypeRequiredDefaultDescription
task_idstringYes-Task ID to unlink the file from
file_nidstringYes-Media node ID of the file to unlink

Returns

FieldTypeDescription
typeany-
docany-
propertiesany-

task.get_linked_files

Get all files linked to a task, including file metadata from the media table.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/task.get_linked_files

Parameters

ParameterTypeRequiredDefaultDescription
task_idstringYes-Task ID to get linked files for

Returns

FieldTypeDescription
typeany-
docany-

Attach a label to a task. Idempotent — linking the same label twice has no effect. Returns the updated list of labels on the task.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.link_label

Parameters

ParameterTypeRequiredDefaultDescription
task_idstringYes-Task ID
label_idstringYes-Label ID

Returns

FieldTypeDescription
typeany-
docany-
itemsobject-
items.task_idstringTask ID
items.label_idstringLabel ID
items.ctimenumberUnix timestamp of when the label was linked
items.namestringLabel name
items.colorstringLabel color (hex with leading #)

Remove a label from a task. The label itself is not deleted from the hub.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.unlink_label

Parameters

ParameterTypeRequiredDefaultDescription
task_idstringYes-Task ID
label_idstringYes-Label ID

Returns

FieldTypeDescription
typeany-
docany-
propertiesany-

task.get_labels

Get all labels attached to a task.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/task.get_labels

Parameters

ParameterTypeRequiredDefaultDescription
task_idstringYes-Task ID

Returns

FieldTypeDescription
typeany-
docany-

task.search_files

Search media files in the current hub that can be linked to a task. Results are filtered by the caller's read-permission. If task_id is provided, files already linked to that task are excluded.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/task.search_files

Parameters

ParameterTypeRequiredDefaultDescription
patternstring (min: 1)Yes-Filename substring
task_idstringNo-Exclude files already linked to this task
pagenumber (min: 1)No1Page number for pagination

Returns

FieldTypeDescription
typeany-
docany-
itemsobject-
items.nidstringMedia node ID
items.filenamestringDisplay filename
items.extstringFile extension
items.categorystringFile category
items.filesizenumberFile size in bytes
items.mtimenumberUnix timestamp of last upload
items.scorenumberMatch score (higher = better)

task.comment_list

List a task's comments (flat, chronological). Author name/avatar is resolved client-side from the hub member list.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/task.comment_list

Parameters

ParameterTypeRequiredDefaultDescription
task_idstringYes-Task ID to list comments for

Returns

FieldTypeDescription
typeany-
docany-
itemsobject-
items.idstringComment ID
items.task_idstringParent task ID
items.author_uidstringUID of the comment author
items.bodystringComment body in marker form @Name
items.editednumber1 if the comment was edited
items.ctimenumberUnix timestamp of creation
items.mtimenumberUnix timestamp of last edit

task.comment_create

Add a comment to a task. @-mentioned members are notified.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.comment_create

Parameters

ParameterTypeRequiredDefaultDescription
task_idstringYes-Task ID to comment on
bodystringYes-Comment body in marker form @Name
parent_idstringNo-Root comment id when this is a reply; omit/null for a top-level comment
mention_uidsarray<string>No-UIDs @-mentioned in the body. Server notifies each (excluding self).

Returns

FieldTypeDescription
typeany-
docany-

task.comment_react

Toggle the caller's emoji reaction on a comment (add if absent, remove if present).

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.comment_react

Parameters

ParameterTypeRequiredDefaultDescription
comment_idstringYes-Comment ID to react to
task_idstringYes-Parent task ID (so the broadcast targets the right feed)
emojistringYes-Reaction emoji

Returns

FieldTypeDescription
typeany-
docany-
propertiesany-

task.comment_update

Edit your own comment. Returns COMMENT_NOT_FOUND if the caller is not the author.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.comment_update

Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Comment ID to edit
bodystringYes-New comment body in marker form
mention_uidsarray<string>No-UIDs @-mentioned in the body. Server notifies each (excluding self).

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error CodeHTTP StatusDescription
COMMENT_NOT_FOUND404No comment with that ID owned by the caller

task.comment_delete

Delete your own comment.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/task.comment_delete

Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Comment ID to delete
task_idstringYes-Parent task ID (so the broadcast targets the right feed)

Returns

FieldTypeDescription
typeany-
docany-
propertiesany-