Skip to main content

TABLE API Reference

Module Information

Service Files:

  • Private: service/private/table.js

Available Services: 4 Documented Services: 4


table.insert_row

Insert a row into a custom hub table. Looks up the table by name or id, then calls custom_row_insert with the values array serialized as JSON. Values must be provided as an array; rejects with '_values_must_be_array' if not.

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/table.insert_row

Parameters

ParameterTypeRequiredDefaultDescription
namestringNo--
idstringNo--
valuesarrayYes--

Returns

FieldTypeDescription
typeany-
descriptionany-

Possible Errors

Error CodeHTTP StatusDescription
_values_must_be_array-The values parameter must be an array

table.create_table

Create a custom table attached to the current hub. Registers the table via custom_table_register, then executes a CREATE TABLE query built from the provided column and key definitions. Column types supported: mediumtext, enum, int, integer, float, and varchar/other string types. Key types can be PRIMARY, UNIQUE, INDEX, or empty.

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/table.create_table

Parameters

ParameterTypeRequiredDefaultDescription
namestringYes--
columnsarrayYes--
keysarrayYes--

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
QUERY ERROR-CREATE TABLE query execution failed

table.delete_table

Delete a registered custom table by name. Calls custom_table_delete stored procedure with the table name.

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/table.delete_table

Parameters

ParameterTypeRequiredDefaultDescription
namestringYes--

Returns

FieldTypeDescription
typeany-
descriptionany-

Possible Errors

Error codes not documented


table.fetch

Fetch rows from a custom hub table with optional column selection, filtering, ordering, and pagination. Looks up the table via custom_table_get, then executes a SELECT query with sanitized column, filter, and order clauses. Supports both page-based and limit-based result capping. Column, filter, and order tokens are sanitized to prevent injection.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/table.fetch

Parameters

ParameterTypeRequiredDefaultDescription
namestringNo--
idstringNo--
columnsarrayNo["*"]-
filterarrayNo--
orderarrayNo--
pageintegerNo--
page_lengthintegerNo15-
limitintegerNo--

Returns

FieldTypeDescription
typeany-
descriptionany-

Possible Errors

Error CodeHTTP StatusDescription
name is required-Neither name nor id was provided
QUERY ERROR-SELECT query execution failed

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