Multi-Role Feature

Simulate app-role feature permission for a path

Dashboard-only. Given an app role slug and either an OpenAPI `operationId` **or** HTTP method + pathname, returns whether the role's `featurePermissions` would allow the operation for paths that have a feature gate. Unmapped paths or unknown operation IDs return `allowed: true` with reason `no_feature_gate_for_path` or `no_feature_gate_for_operation_id`.

AuthBearer (JWT)
GroupMulti-Role Feature
Rate limitSee Rate Limits
POST/api/projects/{projectId}/multi-role/simulate-permissions

SDK setup

Create a client and set credentials (JWT and/or API key) before calling the API. Match the authentication type shown above.

import { Configuration, MultiRoleFeatureApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
  accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});

const multirolefeature = new MultiRoleFeatureApi(configuration);
import { Configuration, MultiRoleFeatureApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
  accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});

const multirolefeature = new MultiRoleFeatureApi(configuration);

Example request

Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.

const { data: result } = await multirolefeature.simulateAppPermissions(
  "proj_S76hNECRfJ8U",
  {
    role: "alarm back up",
    roleSlug: "parched-veto-u3zt",
    operationId: "GEZQPcYKFXnAzwnb",
    method: "firewall compress",
    pathname: "Claudia Von DDS",
    path: "panel transmit"
  }
);
const { data: result } = await multirolefeature.simulateAppPermissions(
  "proj_S76hNECRfJ8U",
  {
    role: "alarm back up",
    roleSlug: "parched-veto-u3zt",
    operationId: "GEZQPcYKFXnAzwnb",
    method: "firewall compress",
    pathname: "Claudia Von DDS",
    path: "panel transmit"
  }
);

Playground

live

Test this endpoint with your own credentials. Your requests will be sent to the live API.

Use the auth endpoints to obtain a JWT.

No Request Yet

Send a request to see the full inspector

Authentication

Requires JWT
Note
Include your JWT in the Authorization: Bearer YOUR_TOKEN header (user-facing apps, RBAC). View authentication guide →

Path Parameters

NameTypeRequiredDescription
projectIdstringYes

Request Body

json
{
  "role": "customer",
  "roleSlug": "stylish-editor-xuyg",
  "operationId": "sendEmail",
  "method": "POST",
  "pathname": "/api/messaging/projects/685ad30be129932fbb7a1047/messaging/email",
  "path": "feed connect"
}
{
  "role": "customer",
  "roleSlug": "stylish-editor-xuyg",
  "operationId": "sendEmail",
  "method": "POST",
  "pathname": "/api/messaging/projects/685ad30be129932fbb7a1047/messaging/email",
  "path": "feed connect"
}

Responses

200Simulation result

Mapped path; role permits action

json
{
  "success": true,
  "allowed": true,
  "reason": "allowed",
  "evaluated": {
    "role": "customer",
    "pathname": "/api/messaging/projects/685ad30be129932fbb7a1047/messaging/email",
    "method": "POST",
    "resource": "messaging",
    "action": "send_email"
  }
}
{
  "success": true,
  "allowed": true,
  "reason": "allowed",
  "evaluated": {
    "role": "customer",
    "pathname": "/api/messaging/projects/685ad30be129932fbb7a1047/messaging/email",
    "method": "POST",
    "resource": "messaging",
    "action": "send_email"
  }
}

Mapped path; featurePermissions explicitly deny

json
{
  "success": true,
  "allowed": false,
  "reason": "feature_not_allowed",
  "evaluated": {
    "role": "viewer",
    "pathname": "/api/messaging/projects/685ad30be129932fbb7a1047/messaging/email",
    "method": "POST",
    "resource": "messaging",
    "action": "send_email"
  }
}
{
  "success": true,
  "allowed": false,
  "reason": "feature_not_allowed",
  "evaluated": {
    "role": "viewer",
    "pathname": "/api/messaging/projects/685ad30be129932fbb7a1047/messaging/email",
    "method": "POST",
    "resource": "messaging",
    "action": "send_email"
  }
}

Resolved via operationId (same resource/action as path-based)

json
{
  "success": true,
  "allowed": true,
  "reason": "allowed",
  "evaluated": {
    "role": "customer",
    "operationId": "sendEmail",
    "resource": "messaging",
    "action": "send_email"
  }
}
{
  "success": true,
  "allowed": true,
  "reason": "allowed",
  "evaluated": {
    "role": "customer",
    "operationId": "sendEmail",
    "resource": "messaging",
    "action": "send_email"
  }
}

Path not in app-role map (pass-through for app JWT)

json
{
  "success": true,
  "allowed": true,
  "reason": "no_feature_gate_for_path",
  "evaluated": {
    "role": "customer",
    "pathname": "/api/projects/685ad30be129932fbb7a1047/unknown-route",
    "method": "GET"
  }
}
{
  "success": true,
  "allowed": true,
  "reason": "no_feature_gate_for_path",
  "evaluated": {
    "role": "customer",
    "pathname": "/api/projects/685ad30be129932fbb7a1047/unknown-route",
    "method": "GET"
  }
}

operationId not listed in server map

json
{
  "success": true,
  "allowed": true,
  "reason": "no_feature_gate_for_operation_id",
  "evaluated": {
    "role": "customer",
    "operationId": "registerUser"
  }
}
{
  "success": true,
  "allowed": true,
  "reason": "no_feature_gate_for_operation_id",
  "evaluated": {
    "role": "customer",
    "operationId": "registerUser"
  }
}
Edit this page on GitHub