Scalar Rules API

The rules API from Scalar — 6 operation(s) for rules.

Operations 10

GET /rulesets/{namespace}/{slug} Getrulesets namespace slug #
PATCH /rulesets/{namespace}/{slug} Patchrulesets namespace slug #
DELETE /rulesets/{namespace}/{slug} Deleterulesets namespace slug #
GET /rulesets/get-by-id/{uid} Getrulesets get by id uid #
GET /rulesets/{namespace} Getrulesets namespace #
POST /rulesets/{namespace} Postrulesets namespace #
POST /rulesets/upload Postrulesets upload #
POST /rules/access-group Postrules access group #
DELETE /rules/access-group Deleterules access group #
POST /rulesets/check-slug Postrulesets check slug #

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/scalar-rules-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

scalar-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Scalar Rules API
  contact:
    name: Marc from Scalar
    url: https://scalar.com
    email: support@scalar.com
  version: '1.0'
  description: 'Operations tagged rules across 2 of this provider''s published API definitions: scalar-core.json, scalar-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.scalar.com/core
security:
- BearerAuth: []
tags:
- name: Rules
paths:
  /rulesets/{namespace}/{slug}:
    get:
      tags:
      - Rules
      description: Get a the rule document
      operationId: getrulesetsNamespaceSlug
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema: {}
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      parameters:
      - schema:
          type: string
        in: path
        name: namespace
        required: true
      - schema:
          type: string
        in: path
        name: slug
        required: true
      summary: Getrulesets namespace slug
      x-summary-source: derived
    patch:
      tags:
      - Rules
      description: Update rule metadata
      operationId: patchrulesetsNamespaceSlug
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: 'null'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                namespace:
                  type: string
                slug:
                  type: string
                title:
                  type: string
                description:
                  type: string
                isPrivate:
                  type: boolean
                blockPublishOn:
                  type: string
                  enum:
                  - error
                  - warning
                  - info
                  - hint
                  - none
              additionalProperties: false
        required: true
      parameters:
      - schema:
          type: string
        in: path
        name: namespace
        required: true
      - schema:
          type: string
        in: path
        name: slug
        required: true
      summary: Patchrulesets namespace slug
      x-summary-source: derived
    delete:
      tags:
      - Rules
      description: Delete a specific rule
      operationId: deleterulesetsNamespaceSlug
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: 'null'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      parameters:
      - schema:
          type: string
        in: path
        name: namespace
        required: true
      - schema:
          type: string
        in: path
        name: slug
        required: true
      summary: Deleterulesets namespace slug
      x-summary-source: derived
  /rulesets/get-by-id/{uid}:
    get:
      tags:
      - Rules
      description: Get a the rule document
      operationId: getrulesetsGetByIdUid
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema: {}
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      parameters:
      - schema:
          type: string
        in: path
        name: uid
        required: true
      summary: Getrulesets get by id uid
      x-summary-source: derived
  /rulesets/{namespace}:
    get:
      tags:
      - Rules
      description: Get a list of all rulesets for the namespace
      operationId: getrulesetsNamespace
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    uid:
                      default: nanoid()
                      $ref: '#/components/schemas/nanoid'
                    title:
                      default: ''
                      type: string
                      maxLength: 100
                    description:
                      default: ''
                      type: string
                    slug:
                      default: randomManagedDocSlug()
                      $ref: '#/components/schemas/slug'
                    namespace:
                      $ref: '#/components/schemas/namespace'
                    isPrivate:
                      default: false
                      type: boolean
                  required:
                  - uid
                  - title
                  - description
                  - slug
                  - namespace
                  - isPrivate
                  additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      parameters:
      - schema:
          type: string
        in: path
        name: namespace
        required: true
      summary: Getrulesets namespace
      x-summary-source: derived
    post:
      tags:
      - Rules
      description: Create a new rule for the namespace
      operationId: postrulesetsNamespace
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  uid:
                    type: string
                required:
                - uid
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                description:
                  type: string
                slug:
                  type: string
                isPrivate:
                  type: boolean
                blockPublishOn:
                  type: string
                  enum:
                  - error
                  - warning
                  - info
                  - hint
                  - none
                document:
                  type: string
              required:
              - title
              - slug
              additionalProperties: false
        required: true
      parameters:
      - schema:
          type: string
        in: path
        name: namespace
        required: true
      summary: Postrulesets namespace
      x-summary-source: derived
  /rulesets/upload:
    post:
      tags:
      - Rules
      description: Update rule content
      operationId: postrulesetsUpload
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: 'null'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uid:
                  type: string
                data:
                  type: string
              required:
              - uid
              - data
              additionalProperties: false
        required: true
      summary: Postrulesets upload
      x-summary-source: derived
  /rules/access-group:
    post:
      tags:
      - Rules
      description: Adds an access group to a rule
      operationId: postrulesAccessGroup
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: 'null'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                namespace:
                  type: string
                slug:
                  type: string
                groupUid:
                  $ref: '#/components/schemas/nanoid'
              required:
              - namespace
              - slug
              - groupUid
              additionalProperties: false
        required: true
      summary: Postrules access group
      x-summary-source: derived
    delete:
      tags:
      - Rules
      description: Removes an access group from a rule
      operationId: deleterulesAccessGroup
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: 'null'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                namespace:
                  type: string
                slug:
                  type: string
                groupUid:
                  $ref: '#/components/schemas/nanoid'
              required:
              - namespace
              - slug
              - groupUid
              additionalProperties: false
        required: true
      summary: Deleterules access group
      x-summary-source: derived
  /rulesets/check-slug:
    post:
      tags:
      - Rules
      description: Checks if a ruleset slug is available for the provided namespace
      operationId: postrulesetsCheckSlug
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  available:
                    type: boolean
                required:
                - available
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400'
        '401':
          description: No auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/422'
        '500':
          description: Uncaught error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                namespace:
                  $ref: '#/components/schemas/namespace'
                slug:
                  $ref: '#/components/schemas/slug'
              required:
              - namespace
              - slug
              additionalProperties: false
        required: true
      summary: Postrulesets check slug
      x-summary-source: derived
components:
  schemas:
    nanoid:
      type: string
      minLength: 5
    namespace:
      type: string
      minLength: 3
      maxLength: 50
      pattern: ^[a-zA-Z0-9-_]+$
    '404':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    slug:
      type: string
      minLength: 3
      maxLength: 60
      pattern: ^[a-z](?:[a-z0-9-]*[a-z0-9])?$
    '403':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    '422':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    '401':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    '400':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    '500':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
    nanoid_2:
      type: string
      minLength: 5
      examples:
      - UakgbKJ5m9gl0JDMbcJqL
    namespace_2:
      type: string
      minLength: 2
      maxLength: 50
      pattern: ^[a-zA-Z0-9-_]+$
      examples:
      - acme
    '404_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: Resource not found.
        code: not-found
    slug_2:
      type: string
      minLength: 1
      maxLength: 60
      pattern: ^[a-z](?:[a-z0-9-]*[a-z0-9])?$
      examples:
      - acme-api
    '403_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: You do not have permission to access this resource.
        code: forbidden
    '422_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: The request body contains invalid values.
        code: invalid-payload
    '401_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: Invalid authentication token.
        code: unauthorized
    '400_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: Invalid request parameters.
        code: bad-request
    '500_2':
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      examples:
      - message: An unexpected error occurred.
        code: unknown
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-refined-from:
- scalar-core.json
- scalar-openapi.json