b24jssdk-rest

Installation
SKILL.md
Contains Shell Commands

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 @deprecated and scheduled for removal in 3.0.0 (see packages/jssdk/README-AI.md "Deprecation notice"). Do not generate new code against it.

The AjaxResult paging members — isMore(), hasMore(), getTotal(), getNext(), fetchNext() — are not in that set and are not deprecated. They are restApi: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, native tail/cursor, dotted relation select). Confirm a method exists on this portal's v3 via rest.documentation.openapi if unsure.
  • Version auto-detection (the deprecated legacy callMethod/callBatch shims) defaults to v2; v3 is opt-in only via the explicit actions.v3.* surface.
Installs
9
GitHub Stars
18
First Seen
Jun 14, 2026
b24jssdk-rest — bitrix24/b24jssdk