b24jssdk-rest
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
b24jssdk REST patterns (actions API)
Every example uses $b24 of type TypeB24, so the same code runs on B24Hook, B24Frame, and B24OAuth. The actions surface is published per API version under $b24.actions.v2.* and $b24.actions.v3.*.
The previous SDK surface —
callMethod,callBatch,callBatchByChunk,callListMethod,fetchListMethod— is@deprecatedand scheduled for removal in3.0.0(seepackages/jssdk/README-AI.md"Deprecation notice"). Do not generate new code against it.The
AjaxResultpaging members —isMore(),hasMore(),getTotal(),getNext(),fetchNext()— are not in that set and are not deprecated. They arerestApi:v2-only; see "restApi:v2 paging members" below.
Pick the API version
The SDK exposes both v2 and v3 under $b24.actions. The SDK no longer keeps a hardcoded v3 method allowlist — the server is the source of truth for which methods exist on a portal (the authoritative list is the portal's own OpenAPI document, rest.documentation.openapi). So $b24.actions.v3.* will send any method to the v3 endpoint; if the method isn't a v3 method, the server returns a METHODNOTFOUNDEXCEPTION (a soft error on the AjaxResult, not an SDK throw).
Method families that are known to exist on v3 today (non-exhaustive): tasks.task.* (incl. list), mail.*, humanresources.*, timeman.record.* (read-only), main.eventlog.* (incl. native tail), note.*, rest.application.*, rest.incomingwebhook.*, plus infrastructure (batch, scopes, rest.scope.list, rest.documentation.openapi).
Rule of thumb:
- Default to
$b24.actions.v2.*— it works for every classic method. - Use
$b24.actions.v3.*when you specifically want the v3 representation of a method (camelCase fields, the unified{result}envelope, nativetail/cursor, dotted relation select). Confirm a method exists on this portal's v3 viarest.documentation.openapiif unsure. - Version auto-detection (the deprecated legacy
callMethod/callBatchshims) defaults to v2; v3 is opt-in only via the explicitactions.v3.*surface.