Skip to main content

BOOTSTRAP API Reference

Module Information

Service Files:

  • Private: service/bootstrap.js
  • Public: service/bootstrap.js

Available Services: 8 Documented Services: 8


bootstrap.js

Generate and return the JavaScript bootstrap bundle for the current hub. Merges runtime environment data with hub configuration, injects bundle paths (core, vendor, sprite, locale, entry), sets the Authorization header on the response, and renders the bootstrap.js.tpl template. Response is served as application/javascript.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/bootstrap.js

Parameters

ParameterTypeRequiredDefaultDescription
AuthorizationstringNo-HTTP Authorization header. Read from the request header. Used to set keysel and propagate auth context to the rendered template.

Returns

FieldTypeDescription
contentstringRendered bootstrap JavaScript content served as application/javascript. Includes hub configuration, runtime environment, and asset bundle paths.

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR500Failed to resolve runtime environment or render the bootstrap template

bootstrap.plugin

Resolve the entry point path for a named UI plugin. Searches first under the endpoint-specific plugin base directory, then falls back to the runtime plugin directory. Returns the resolved endpoint path for the plugin entry file, or an empty path if the plugin is not found.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/bootstrap.plugin

Parameters

ParameterTypeRequiredDefaultDescription
namestringNo""Plugin name. File extension is stripped automatically before lookup.

Returns

FieldTypeDescription
pathstringResolved endpoint path to the plugin entry file. Empty string when the plugin is not found.

bootstrap.css

Generate and return the CSS font stylesheet for the current hub. Renders the fonts.tpl template and serves the result as text/css.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/bootstrap.css

Parameters

No parameters

Returns

FieldTypeDescription
contentstringRendered font CSS content served as text/css

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR500Failed to render the fonts template

bootstrap.dom

Generate and return the DOM bootstrap JavaScript for the current hub. Merges runtime environment data with hub configuration, injects the request host, sets the Authorization header on the response, and renders the bootstrap.dom.tpl template. Response is served as application/javascript.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/bootstrap.dom

Parameters

ParameterTypeRequiredDefaultDescription
AuthorizationstringNo-HTTP Authorization header. Read from the request header. Used to set keysel and propagate auth context to the rendered template.

Returns

FieldTypeDescription
contentstringRendered DOM bootstrap JavaScript content served as application/javascript. Includes hub configuration, runtime environment, and the resolved request host.

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR500Failed to resolve runtime environment or render the DOM bootstrap template

bootstrap.report_error

Accept and log a client-side error report. Reads the raw request payload for debug logging and responds with a plain text acknowledgement. No structured response body is returned.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/bootstrap.report_error

Parameters

ParameterTypeRequiredDefaultDescription
dataobjectNo-Arbitrary client error payload. Logged server-side for diagnostics only; not processed or stored.

Returns

FieldTypeDescription
contentstringPlain text response: OK

bootstrap.publicKey

Return the platform RSA public key in PEM format. Reads the key from /etc/drumee/credential/crypto/public.pem. Returns a fallback string if the key file does not exist.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/bootstrap.publicKey

Parameters

No parameters

Returns

FieldTypeDescription
contentstringPEM-encoded RSA public key, or the literal string -----NO PUBLIC KEY----- when the key file is absent.

bootstrap.getSyncTimes

Return a pair of timestamps used for client-server time synchronization. t2 is derived from the request timestamp (parsed from the incoming request), t3 is the server wall-clock time at the moment of processing.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/bootstrap.getSyncTimes

Parameters

No parameters

Returns

FieldTypeDescription
t2numberTimestamp extracted from the incoming request via input.timestamp()
t3numberServer-side wall-clock time in milliseconds since Unix epoch (Date.now()) at the moment of processing

bootstrap.authn

Exchange an HTTP Authorization header credential for a short-lived opaque token. Generates a 22-character token, stores it via the authn_store stored procedure, and optionally includes the user OTP key in the response. For DMZ or share hub areas, the auth type is forced to guest.

PropertyValue
ScopeHub (requires hub context)
Permissionanyone

Endpoint:

https://hostname/-/svc/bootstrap.authn

Parameters

ParameterTypeRequiredDefaultDescription
AuthorizationstringYes-HTTP Authorization header. Read from the request header. The auth type is overridden to guest when the hub area is dmz or share.

Returns

FieldTypeDescription
tokenstring22-character opaque authentication token generated by uniqueId(22) and persisted via the authn_store stored procedure
otp_keystringOne-time-password key from the current user session. Included in the response only when the user has an otp_key set.

Possible Errors

Error CodeHTTP StatusDescription
UNAUTHORIZED401Authorization header is missing or malformed
INTERNAL_ERROR500Failed to persist token via authn_store procedure

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