Rulebase Roles API

The Roles API from Rulebase — 2 operation(s) for roles.

Operations 6

GET /roles Get roles #
POST /roles Create roles #
GET /roles/{id} Get roles by id #
PUT /roles/{id} Replace roles by id #
PATCH /roles/{id} Update roles by id #
DELETE /roles/{id} Delete roles by id #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/rulebase:rulebase-roles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

rulebase-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Rulebase API2 Roles API
  version: 0.0.1
tags:
- name: Roles
paths:
  /roles:
    get:
      responses:
        '200':
          description: Roles visible to the current organization
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        description:
                          type: string
                          nullable: true
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        memberships_count:
                          type: number
                        global:
                          type: boolean
                        permissions:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              description:
                                type: string
                                nullable: true
                            required:
                            - id
                            - description
                      required:
                      - id
                      - name
                      - description
                      - created_at
                      - updated_at
                      - memberships_count
                      - global
                      - permissions
                required:
                - data
        '503':
          description: Rails organization unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
      tags:
      - Roles
      summary: Get roles
      x-summary-source: derived
      operationId: getRoles
      x-operation-id-source: derived
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: object
                  properties:
                    name:
                      type: string
                      nullable: true
                    description:
                      type: string
                      nullable: true
                    permission_ids:
                      type: array
                      nullable: true
                      items:
                        type: string
              required:
              - role
      responses:
        '201':
          description: Role created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      memberships_count:
                        type: number
                      global:
                        type: boolean
                      permissions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            description:
                              type: string
                              nullable: true
                          required:
                          - id
                          - description
                    required:
                    - id
                    - name
                    - description
                    - created_at
                    - updated_at
                    - memberships_count
                    - global
                    - permissions
                required:
                - data
        '400':
          description: Validation failed
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '503':
          description: Rails organization unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
      tags:
      - Roles
      summary: Create roles
      x-summary-source: derived
      operationId: postRoles
      x-operation-id-source: derived
  /roles/{id}:
    get:
      parameters:
      - schema:
          type: string
        required: true
        name: id
        in: path
      responses:
        '200':
          description: A role
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      memberships_count:
                        type: number
                      global:
                        type: boolean
                      permissions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            description:
                              type: string
                              nullable: true
                          required:
                          - id
                          - description
                    required:
                    - id
                    - name
                    - description
                    - created_at
                    - updated_at
                    - memberships_count
                    - global
                    - permissions
                required:
                - data
        '404':
          description: Role not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '503':
          description: Rails organization unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
      tags:
      - Roles
      summary: Get roles by id
      x-summary-source: derived
      operationId: getRolesById
      x-operation-id-source: derived
    put:
      parameters:
      - schema:
          type: string
        required: true
        name: id
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: object
                  properties:
                    name:
                      type: string
                      nullable: true
                    description:
                      type: string
                      nullable: true
                    permission_ids:
                      type: array
                      nullable: true
                      items:
                        type: string
              required:
              - role
      responses:
        '200':
          description: Role updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      memberships_count:
                        type: number
                      global:
                        type: boolean
                      permissions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            description:
                              type: string
                              nullable: true
                          required:
                          - id
                          - description
                    required:
                    - id
                    - name
                    - description
                    - created_at
                    - updated_at
                    - memberships_count
                    - global
                    - permissions
                required:
                - data
        '400':
          description: Validation failed
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '404':
          description: Role not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '503':
          description: Rails organization unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
      tags:
      - Roles
      summary: Replace roles by id
      x-summary-source: derived
      operationId: putRolesById
      x-operation-id-source: derived
    patch:
      parameters:
      - schema:
          type: string
        required: true
        name: id
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: object
                  properties:
                    name:
                      type: string
                      nullable: true
                    description:
                      type: string
                      nullable: true
                    permission_ids:
                      type: array
                      nullable: true
                      items:
                        type: string
              required:
              - role
      responses:
        '200':
          description: Role updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      memberships_count:
                        type: number
                      global:
                        type: boolean
                      permissions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            description:
                              type: string
                              nullable: true
                          required:
                          - id
                          - description
                    required:
                    - id
                    - name
                    - description
                    - created_at
                    - updated_at
                    - memberships_count
                    - global
                    - permissions
                required:
                - data
        '400':
          description: Validation failed
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '404':
          description: Role not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '503':
          description: Rails organization unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
      tags:
      - Roles
      summary: Update roles by id
      x-summary-source: derived
      operationId: patchRolesById
      x-operation-id-source: derived
    delete:
      parameters:
      - schema:
          type: string
        required: true
        name: id
        in: path
      responses:
        '204':
          description: Role deleted
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '404':
          description: Role not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '422':
          description: Role still has members
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '503':
          description: Rails organization unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
      tags:
      - Roles
      summary: Delete roles by id
      x-summary-source: derived
      operationId: deleteRolesById
      x-operation-id-source: derived
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Rulebase organization API key