Skip to main content

LABEL API Reference

Module Information​

Service Files:

  • Private: service/private/label.js

Available Services: 4 Documented Services: 4


label.list​

List all labels in the current hub.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

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

Parameters​

No parameters

Returns​

FieldTypeDescription
typeany-
docany-
itemsobject-
items.idstringLabel ID
items.namestringLabel name
items.colorstringHex color including leading #
items.created_bystringUID of the creator
items.ctimenumberUnix timestamp of creation
items.mtimenumberUnix timestamp of last update

label.create​

Create a new label in the current hub.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

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

Parameters​

ParameterTypeRequiredDefaultDescription
namestringYes-Label name (must be unique within the hub)
colorstring (pattern: ^#([0-9a-fA-F]3[0-9a-fA-F]6[0-9a-fA-F]8)$)No

Returns​

FieldTypeDescription
typeany-
docany-

Possible Errors​

Error CodeHTTP StatusDescription
INVALID_COLOR400color must be a valid hex string starting with #

label.update​

Update a label's name and/or color. Omit a field to keep its existing value.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

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

Parameters​

ParameterTypeRequiredDefaultDescription
idstringYes-Label ID
namestringNo-New label name
colorstring (pattern: ^#([0-9a-fA-F]3[0-9a-fA-F]6[0-9a-fA-F]8)$)No

Returns​

FieldTypeDescription
typeany-
docany-

Possible Errors​

Error CodeHTTP StatusDescription
LABEL_NOT_FOUND404No label found with the given ID
INVALID_COLOR400color must be a valid hex string starting with #

label.delete​

Delete a label permanently. All task_label associations are removed.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

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

Parameters​

ParameterTypeRequiredDefaultDescription
idstringYes-Label ID

Returns​

FieldTypeDescription
typeany-
docany-
propertiesany-