Labels
Type | Base Path | Trigger Name |
---|---|---|
REST resource | ~{realm}/labels/ | labels |
This resource holds all user-defined labels, which can be attached to almost any other entity via their labels
array.
See Labels & Extended Properties for more information about labels and how they can be used.
Endpoints
Name | Method | Relative Path | Payload | Response | Description |
---|---|---|---|---|---|
addLabel | POST | ~{realm}/labels/ | Label | Stored_Label | Adds a new label to the list. |
listLabels | GET | ~{realm}/labels/ | N/A | Stored_Label[] | Retrieves a list of labels. |
getLabel | GET | ~{realm}/labels/{id} | N/A | Stored_Label | Retrieves a label. |
putLabel | PUT | ~{realm}/labels/{id} | Label | Stored_Label | Replaces a label. |
updateLabel | PATCH | ~{realm}/labels/{id} | Partial_Label | Stored_Label | Updates specified label fields. |
removeLabel | DELETE | ~{realm}/labels/{id} | N/A | N/A | Deletes a label. |
Permissions
Permission | Description |
---|---|
edit-labels | Client is allowed to add new labels and to modify or delete existing labels. |
show-labels | Client is allowed to query the label list and to fetch individual labels. |
Entities
Interface Label
interface Label {
'name': string;
'label-category': number;
'id'?: number;
'created'?: DateTime;
'updated'?: DateTime;
'deleted'?: DateTime;
'updated-by'?: number;
'updated-from'?: number;
'tags'?: string[];
'labels'?: number[];
}
Property | Data Type | Description |
---|---|---|
name | String | The label name. Must be unique. |
label-category | Int64 | ID of the LabelCategory the label belongs to. |
id | Int64? | The resource ID of this entity. |
created | DateTime? | Date and time when this entity was first created. |
updated | DateTime? | Date and time when this entity was last modified. |
deleted | DateTime? | Date and time when this entity was deleted. |
updated-by | Int64? | ID of User who last modified this entity. |
updated-from | Int64? | ID of Till (trusted device) which last modified this entity. |
labels | Int64[]? | A list of Label IDs associated with this entity—yes, labels can be labelled too. |