Skip to main content

Groups API

Groups are hierarchical containers that own resources, notes, and other groups. Custom relationships between groups are defined through the relations system.

List Groups

Retrieve a paginated list of groups with optional filtering.

GET /v1/groups

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
NamestringFilter by name (partial match)
DescriptionstringFilter by description (partial match)
Tagsinteger[]Filter by tag IDs
Groupsinteger[]Filter by related Groups or parent (checks both group_related_groups and owner_id)
Notesinteger[]Filter by associated note IDs
Resourcesinteger[]Filter by associated resource IDs
Categoriesinteger[]Filter by category IDs
CategoryIdintegerFilter by single category ID
OwnerIdintegerFilter by owner group ID
Idsinteger[]Filter by specific group IDs
URLstringFilter by URL field
CreatedBeforestringFilter by creation date (ISO 8601)
CreatedAfterstringFilter by creation date (ISO 8601)
RelationTypeIdintegerFilter by groups having this relation type
RelationSideintegerWhich side of the relation (0=from, non-zero=to)
MetaQuerystring[]Filter by metadata conditions (supports parent.key and child.key prefixes)
SearchParentsForNamebooleanSearch parent groups for name match
SearchChildrenForNamebooleanSearch child groups for name match
SearchParentsForTagsbooleanInclude parent groups when filtering by tags
SearchChildrenForTagsbooleanInclude child groups when filtering by tags
SortBystring[]Sort order

Example

# List all groups
curl http://localhost:8181/v1/groups

# Filter by category
curl "http://localhost:8181/v1/groups?CategoryId=1"

# Filter by tags
curl "http://localhost:8181/v1/groups?Tags=1&Tags=2"

# Find groups by relation
curl "http://localhost:8181/v1/groups?RelationTypeId=1&RelationSide=1"

Response

[
{
"ID": 1,
"Name": "Project Alpha",
"Description": "Main project group",
"URL": "https://example.com/project-alpha",
"CategoryId": 1,
"OwnerId": null,
"Meta": {"status": "active"},
"CreatedAt": "2024-01-15T10:00:00Z",
"UpdatedAt": "2024-01-15T10:00:00Z",
"Tags": [...],
"Groups": [...],
"Category": {...}
}
]

Get Single Group

Retrieve details for a specific group.

GET /v1/group?id={id}

Example

curl http://localhost:8181/v1/group?id=123

Get Group Parents

Get all parent groups of a specific group.

GET /v1/group/parents?id={id}

Example

curl http://localhost:8181/v1/group/parents?id=123

Response

[
{"ID": 1, "Name": "Parent Group 1", ...},
{"ID": 2, "Name": "Grandparent Group", ...}
]

Get Group Tree Children

Get child groups for a tree view with counts.

GET /v1/group/tree/children?parentId={parentId}

Query Parameters

ParameterTypeDescription
parentIdintegerRequired. Parent group ID (use 0 for root groups)
limitintegerMax children to return (default: 50, max: 100)

Example

# Get root-level groups
curl "http://localhost:8181/v1/group/tree/children?parentId=0"

# Get children of group 10
curl "http://localhost:8181/v1/group/tree/children?parentId=10&limit=25"

Response

[
{
"id": 10,
"name": "Sub-Group",
"categoryName": "Project",
"childCount": 3,
"ownerId": 1
}
]

Create or Update Group

Create a new group or update an existing one.

POST /v1/group

Parameters

ParameterTypeDescription
IDintegerGroup ID (include to update, omit to create)
NamestringRequired for create. Group name
DescriptionstringDescription text
CategoryIdintegerCategory ID
OwnerIdintegerParent/owner group ID
Groupsinteger[]Associated group IDs
Tagsinteger[]Tag IDs
MetastringJSON metadata object
URLstringAssociated URL

Example - Create

curl -X POST http://localhost:8181/v1/group \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"Name": "New Project",
"Description": "A new project group",
"CategoryId": 1,
"Tags": [1, 2],
"Meta": "{\"status\": \"planning\"}"
}'

Example - Update

curl -X POST http://localhost:8181/v1/group \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"ID": 123,
"Name": "Updated Project Name",
"Description": "Updated description"
}'

Delete Group

Delete a group.

POST /v1/group/delete?Id={id}

Example

curl -X POST "http://localhost:8181/v1/group/delete?Id=123" \
-H "Accept: application/json"

Clone Group

Create a copy of an existing group with all its metadata.

POST /v1/group/clone

Parameters

ParameterTypeDescription
IDintegerRequired. Group ID to clone

Example

curl -X POST http://localhost:8181/v1/group/clone \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"ID": 123}'

Response

Returns the newly created group:

{
"ID": 456,
"Name": "New Project",
...
}

The clone has identical name, description, meta, URL, owner, Category, and copies all related entity associations (Resources, Notes, Groups, Tags).

Get Group Meta Keys

Get all unique metadata keys used across groups.

GET /v1/groups/meta/keys

Example

curl http://localhost:8181/v1/groups/meta/keys

Response

["status", "priority", "deadline", "budget"]

Bulk Operations

Bulk Add Tags

Add tags to multiple groups at once.

POST /v1/groups/addTags

Parameters

ParameterTypeDescription
IDinteger[]Group IDs to modify
EditedIdinteger[]Tag IDs to add

Example

curl -X POST http://localhost:8181/v1/groups/addTags \
-H "Content-Type: application/json" \
-d '{
"ID": [1, 2, 3],
"EditedId": [10, 11]
}'

Bulk Remove Tags

Remove tags from multiple groups.

POST /v1/groups/removeTags

Bulk Add Metadata

Add or merge metadata to multiple groups.

POST /v1/groups/addMeta

Parameters

ParameterTypeDescription
IDinteger[]Group IDs to modify
MetastringJSON metadata to merge

Bulk Delete

Delete multiple groups.

POST /v1/groups/delete

Parameters

ParameterTypeDescription
IDinteger[]Group IDs to delete

Merge Groups

Merge multiple groups into one, combining their relationships.

POST /v1/groups/merge

Parameters

ParameterTypeDescription
WinnerintegerGroup ID to keep
Losersinteger[]Group IDs to merge and delete

Example

curl -X POST http://localhost:8181/v1/groups/merge \
-H "Content-Type: application/json" \
-d '{
"Winner": 1,
"Losers": [2, 3]
}'

Inline Editing

Edit Name

POST /v1/group/editName?id={id}

Edit Description

POST /v1/group/editDescription?id={id}

Group Relations API

Relations define typed, directional connections between groups (e.g., "Person works at Company").

List Relation Types

Get all available relation types.

GET /v1/relationTypes

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
NamestringFilter by name
DescriptionstringFilter by description
FromCategoryintegerFilter by source category ID
ToCategoryintegerFilter by target category ID
ForFromGroupintegerFilter types valid for this group's category (source)
ForToGroupintegerFilter types valid for this group's category (target)

Example

# List all relation types
curl http://localhost:8181/v1/relationTypes

# Filter by category constraints
curl "http://localhost:8181/v1/relationTypes?FromCategory=1&ToCategory=2"

Response

[
{
"ID": 1,
"Name": "works at",
"ReverseName": "employs",
"Description": "Employment relationship",
"FromCategory": 1,
"ToCategory": 2
}
]

Create Relation Type

Create a new relation type.

POST /v1/relationType

Parameters

ParameterTypeDescription
NamestringRelation name (e.g., "works at")
ReverseNamestringReverse relation name (e.g., "employs")
DescriptionstringDescription
FromCategoryintegerSource group category ID
ToCategoryintegerTarget group category ID

Example

curl -X POST http://localhost:8181/v1/relationType \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"Name": "works at",
"ReverseName": "employs",
"FromCategory": 1,
"ToCategory": 2
}'

Edit Relation Type

Update an existing relation type.

POST /v1/relationType/edit

Parameters

Same as create, but include the Id field to identify which relation type to update.

Delete Relation Type

Delete a relation type.

POST /v1/relationType/delete?Id={id}

Create or Update Relation

Create a relation instance between two groups.

POST /v1/relation

Parameters

ParameterTypeDescription
IdintegerRelation ID (include to update)
FromGroupIdintegerRequired. Source group ID
ToGroupIdintegerRequired. Target group ID
GroupRelationTypeIdintegerRequired. Relation type ID
NamestringOptional relation instance name
DescriptionstringOptional description

Example

curl -X POST http://localhost:8181/v1/relation \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"FromGroupId": 10,
"ToGroupId": 20,
"GroupRelationTypeId": 1
}'

Delete Relation

Delete a relation instance.

POST /v1/relation/delete?Id={id}

Example

curl -X POST "http://localhost:8181/v1/relation/delete?Id=5" \
-H "Accept: application/json"

Inline Editing for Relations

Edit Name

POST /v1/relation/editName?id={id}

Edit Description

POST /v1/relation/editDescription?id={id}