Skip to content

Commit bb61a78

Browse files
Vitexusclaude
andcommitted
Document Task/EventRule/EventSource/RBAC-role/company-membership API endpoints
These were previously undocumented because they either 501'd (no concrete server class) or silently fell into DefaultApi due to missing OpenAPI tags - now fixed in multiflexi-server/multiflexi-api. Also disambiguate the two independent RBAC-adjacent mechanisms in concepts/rbac.rst: company_user (per-company membership/role, what that page documents) vs. rbac_roles/rbac_user_roles (system-wide roles, newly formalized as a migration and exposed via /user/{userId}/roles/) - they're easy to conflate but are separate, independently maintained systems. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 5acef48 commit bb61a78

2 files changed

Lines changed: 70 additions & 0 deletions

File tree

source/concepts/rbac.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,25 @@ Page Shows "Access Denied" When It Shouldn't
467467

468468
---
469469

470+
Relationship to system-wide RBAC roles
471+
---------------------------------------
472+
473+
.. note::
474+
475+
Everything above describes **company membership** (the ``company_user``
476+
table): which companies a user can see, with a simple per-company role
477+
(``viewer``/``manager``/``admin``). It is managed via
478+
``POST /company/{companyId}/user/`` and ``DELETE
479+
/company/{companyId}/user/{userId}``.
480+
481+
MultiFlexi separately has **system-wide RBAC roles** (``rbac_roles`` /
482+
``rbac_user_roles``, e.g. ``super_admin``, ``admin``, ``editor``,
483+
``user``, ``viewer``), assigned independently of company membership via
484+
``multiflexi-cli user-role:set`` or ``POST /user/{userId}/roles/``. These
485+
are two distinct, independently maintained mechanisms — a user's
486+
system-wide role does not imply company access, and company membership
487+
does not grant any system-wide role.
488+
470489
See Also
471490
--------
472491

source/reference/api.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,57 @@ This endpoint allows you to manage topics. You can retrieve and update topics.
8383
- **POST /topic/{topicId}.{suffix}**: Update Topic
8484
- **GET /topics.{suffix}**: Get All Topics
8585

86+
/task/
87+
------
88+
This endpoint exposes :doc:`Tasks <../concepts/tasks>` — the per-scheduling-window
89+
obligation record derived from a RunTemplate's interval, holding one or more
90+
Job attempts.
91+
92+
- **GET /task/{taskId}.{suffix}**: Get Task by ID, including its embedded job
93+
attempt history
94+
- **GET /tasks.{suffix}**: List Tasks, optionally filtered by ``state``,
95+
``runtemplate_id``, ``from``, and ``to``
96+
97+
/eventrule/
98+
-----------
99+
This endpoint manages EventRules — the event-to-RunTemplate mapping used to
100+
chain a RunTemplate's completion into scheduling another one.
101+
102+
- **GET /eventrule/{eventRuleId}.{suffix}**: Get EventRule by ID
103+
- **POST /eventrule/**: Create or Update EventRule
104+
- **DELETE /eventrule/{eventRuleId}.{suffix}**: Delete EventRule by ID
105+
- **GET /eventrules.{suffix}**: Show All EventRules
106+
107+
/eventsource/
108+
-------------
109+
This endpoint manages EventSources — webhook adapter database connections
110+
that EventRules can react to.
111+
112+
- **GET /eventsource/{eventSourceId}.{suffix}**: Get EventSource by ID
113+
- **POST /eventsource/**: Create or Update EventSource
114+
- **DELETE /eventsource/{eventSourceId}.{suffix}**: Delete EventSource by ID
115+
- **GET /eventsources.{suffix}**: Show All EventSources
116+
- **POST /eventsource/{eventSourceId}/test.{suffix}**: Test whether the
117+
adapter database is reachable
118+
119+
/user/{userId}/roles/
120+
----------------------
121+
This endpoint manages RBAC role assignments for a user.
122+
123+
- **GET /user/{userId}/roles.{suffix}**: Get the RBAC roles assigned to a user
124+
- **POST /user/{userId}/roles/**: Set (replace or extend, via the ``replace``
125+
query parameter) the RBAC roles assigned to a user
126+
127+
/company/{companyId}/user/
128+
---------------------------
129+
This endpoint manages company membership — which users have access to a
130+
company and with what role.
131+
132+
- **GET /company/{companyId}/users.{suffix}**: List users assigned to a
133+
company, with their roles
134+
- **POST /company/{companyId}/user/**: Assign a user to a company (upsert)
135+
- **DELETE /company/{companyId}/user/{userId}**: Remove a user from a company
136+
86137
Other Endpoints
87138
===============
88139

0 commit comments

Comments
 (0)