mcpField
B
bitrix-rest

bitrix-rest

github.com/bxmaximumDevelopment47268 installsUpdated 2w ago
Repository

About bitrix-rest

A skill for Bitrix module developers building REST endpoints. It covers registration options, access checks, and error handling, recommending REST 3.0 for new APIs while also documenting classic methods and controllers.

Key features

  1. 01Publish module REST methods
  2. 02Register REST 3.0 APIs
  3. 03Configure Engine controllers
  4. 04Define classic method maps
  5. 05Check user rights in actions
  6. 06Return errors in REST format

Use cases

  1. 01Expose a module through a REST API
  2. 02Implement REST events or placements
  3. 03Set stable permission scopes for apps

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bxmaximum/bitrix-framework-skills --skill bitrix-rest

After installing, type/bitrix-restin Claude Code to confirm it loaded.

Bundled filesrules/classic.mdrules/v3.md

Details

From the project README

REST server side (rest)

Baseline: main 23.0+ · Verified: rest 26.650.0, main 26.800.0

Publishing methods from your module. Calling REST (webhooks, OAuth, batch, limits, error handling on the client): bitrix24-rest-api.

PathRegistrationRead
REST 3.0 (/rest/api/…, DTO, JSON)module .settings.php → rest sectionrules/v3.md
Engine controller (same class as AJAX).settings.php → controllers.restIntegration.enabledrules/classic.md
Classic method map, REST events, placementsevent rest:OnRestServiceBuildDescriptionrules/classic.md

For new APIs: REST 3.0 (Since rest 26.200*), fallback Engine controller + restIntegration. Classic descriptions: for REST events, placements, or explicit method names.

Invariants

  • Loader::includeModule('rest'); code lives in /local/modules/<vendor.module>/, the module must be installed.
  • REST calls have no CSRF: authentication is the app token/webhook. Check the user's rights inside every action.
  • Scopes are the permission units granted to apps. Keep names stable and documented.
  • Return errors in REST form (v3 exceptions, controller addError, \Bitrix\Rest\RestException), never HTML or die().
  • Don't extend rest classes or implement Bitrix\Rest\Internal\* contracts: signatures change in minor releases (26.650: Engine\Access, Api\User, IncomingWebhookRepositoryInterface). Compose instead.
  • Landing blocks and placements via REST: bitrix-landing.

Comments

Markdown supported