Skip to main content

HUB API Reference

Module Information

Service Files:

  • Private: service/private/hub.js
  • Public: service/hub.js

Available Services: 40 Documented Services: 12


hub.get_settings

Get comprehensive hub settings including owner, visitor privileges, and member list

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/hub.get_settings

Returns

FieldTypeDescription
ownerobjectHub owner information
visitorobjectCurrent user's privilege information
visitor.privilegenumberUser's privilege level in this hub
usersarray<object>List of hub members (excluding system users)
users[].idstringUser ID
users[].privilegenumberUser privilege level
hubnamestringHub name
default_privilegenumberDefault privilege for new members

hub.get_attributes

Get hub's complete attributes as JSON

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/hub.get_attributes

Returns

FieldTypeDescription
idstringHub ID
namestringHub name
areastringHub area (private, public, share)
owner_idstringOwner user ID
settingsobjectHub settings object

hub.get_contributors

Get paginated list of hub contributors/members

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/hub.get_contributors

Parameters

ParameterTypeRequiredDefaultDescription
pagenumber (min: 1)No1Page number for pagination
privilegenumberNo0Filter by privilege level (0 for all)

Returns

FieldTypeDescription
contributorsarray<object>Array of contributor objects

hub.show_contributors

Show paginated list of hub contributors (alias for get_contributors)

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/hub.show_contributors

Parameters

ParameterTypeRequiredDefaultDescription
pagenumber (min: 1)No1Page number for pagination

Returns

FieldTypeDescription
contributorsarrayArray of contributor objects

hub.add_contributors

Add members to hub with privilege and expiry settings (sends notifications)

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.add_contributors

Parameters

ParameterTypeRequiredDefaultDescription
usersarray<string>Yes-Array of user IDs or emails to add
privilegenumberNo-Privilege level to grant (defaults to hub's default_privilege)
hoursnumberNo0Hours until membership expires
daysnumberNo0Days until membership expires
messagestringNo-Optional message to send to new members

Returns

FieldTypeDescription
membersarrayUpdated list of hub members (not_owner type)

hub.delete_contributor

Remove members from hub (broadcasts removal notification)

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.delete_contributor

Parameters

ParameterTypeRequiredDefaultDescription
usersarray<string>Yes-Array of user IDs to remove (cannot remove self)

Returns

FieldTypeDescription
membersarrayUpdated list of remaining hub members

hub.set_privilege

Set privilege level for multiple users (batch operation)

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.set_privilege

Parameters

ParameterTypeRequiredDefaultDescription
usersarray<string>Yes-Array of user IDs
privilegenumberNo-Privilege level to set (defaults to hub's default_privilege)
permissionnumberNo-Alias for privilege parameter

Returns

FieldTypeDescription
usersarrayArray of user IDs that were updated

hub.set_member_privilege

Set privilege level for a single member with optional expiry

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.set_member_privilege

Parameters

ParameterTypeRequiredDefaultDescription
uidstringYes-User ID to update
privilegenumberNo-Privilege level to grant
permissionnumberNo-Alias for privilege parameter
daysnumberNo0Days until privilege expires
hoursnumberNo0Hours until privilege expires

Returns

FieldTypeDescription
membersarrayUpdated list of hub members (not_owner type)

hub.get_space_usage

Get hub's disk space usage statistics

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/hub.get_space_usage

Returns

FieldTypeDescription
totalnumberTotal storage quota in bytes
selectednumberSpace used by this hub in bytes
othersnumberSpace used by other hubs and user data in bytes
freenumberFree space available in bytes

hub.update_name

Update hub name (must be unique, broadcasts change to members)

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.update_name

Parameters

ParameterTypeRequiredDefaultDescription
namestring (min: 1)Yes-New hub name

Returns

FieldTypeDescription
idstringHub ID
hubnamestringUpdated hub name
namestringUpdated hub name
fieldNamestringhubname
errorstringALREADY_EXISTS if name is taken

Possible Errors

Error CodeHTTP StatusDescription
ALREADY_EXISTS409Hub name is already in use

hub.poke

Send notification to a user about activity in this hub

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/hub.poke

Parameters

ParameterTypeRequiredDefaultDescription
uidstringYes-User ID to notify
nidstringYes-Node ID related to notification
kindstringYes-Type of notification

Returns

FieldTypeDescription
senderstringSender user ID (current user)
recipientstringRecipient user ID

Get hub logo URL (public API, no authentication required)

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/hub.logo

Parameters

ParameterTypeRequiredDefaultDescription
protocolstringNo-Protocol (http or https)
localhoststringNo-Localhost flag for local development

Returns

FieldTypeDescription
urlstringFull URL to hub logo image

hub.add_external_member

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.add_external_member

No description provided

PropertyValue
ScopeHub (requires hub context)
Permissiondelete

Endpoint:

https://hostname/-/svc/hub.add_font_link

hub.change_history

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.change_history

hub.change_owner

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.change_owner

hub.change_status

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.change_status

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.copy_link

hub.delete_external_member

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.delete_external_member

hub.delete_hub

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionOwner (7)

Endpoint:

https://hostname/-/svc/hub.delete_hub

hub.get_action_log

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/hub.get_action_log

hub.get_members_by_type

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/hub.get_members_by_type

hub.get_pr_node_attr

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.get_pr_node_attr

hub.get_statistics

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.get_statistics

hub.hub_get_members_by_type

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/hub.hub_get_members_by_type

hub.login_image

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/hub.login_image

hub.lookup_hubers

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/hub.lookup_hubers

hub.set_node_permission

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.set_node_permission

hub.show_privilege

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/hub.show_privilege

hub.update_contributor

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.update_contributor

hub.update_favicon

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.update_favicon

hub.update_ident

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.update_ident

hub.update_settings

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.update_settings

hub.update_title

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.update_title

hub.update_visibility

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.update_visibility

hub.update_external_members

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.update_external_members

hub.update_external_room

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.update_external_room

hub.update_external_settings

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.update_external_settings

hub.get_external_room_attr

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.get_external_room_attr

hub.external_notification

No description provided

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/hub.external_notification

  • ACL System - Permission model
  • Service Routing - URL patterns
  • Error Handling - Error codes