Frappe · API Governance Rules

Frappe API Rules

Spectral linting rules defining API design standards and conventions for Frappe.

0 Rules
View Rules File View on GitHub

Spectral Ruleset

Raw ↑
x-aid: frappe:rest-rules
x-name: Frappe Framework REST API Operational Rules
description: >-
  Operational rules for working with the Frappe Framework REST API including
  authentication options, filtering syntax, pagination, and common pitfalls.
x-modified: '2026-04-28'
rules:
  - id: authentication-required
    title: Authentication Required
    description: >-
      All resource and method endpoints require authentication via API key
      and secret token, OAuth bearer token, or session cookie established
      through password login.
    severity: required
  - id: token-format
    title: Token Authorization Format
    description: >-
      For token-based auth use the header
      "Authorization: token api_key:api_secret" exactly as shown; the colon
      separator is required.
    severity: required
  - id: oauth-bearer
    title: OAuth Bearer Token
    description: >-
      For OAuth flows use "Authorization: Bearer access_token". Do not mix
      bearer and token schemes on the same request.
    severity: required
  - id: filter-syntax
    title: Filter Syntax
    description: >-
      Filters and or_filters parameters expect a JSON-encoded list of
      [fieldname, operator, value] tuples. URL-encode the JSON before
      sending.
    severity: required
  - id: pagination-limits
    title: Pagination Defaults
    description: >-
      List endpoints default to a small page size; use limit_start and
      limit_page_length to page through large result sets explicitly.
    severity: recommended
  - id: field-projection
    title: Field Projection
    description: >-
      Default list responses include only name and limited fields; use the
      fields parameter to project required attributes and reduce payload
      size.
    severity: recommended
  - id: doctype-permissions
    title: DocType Permissions
    description: >-
      Access to a DocType depends on the role permissions configured in the
      system; expect 403 for unauthorized DocType access even with valid
      credentials.
    severity: required
  - id: whitelist-required
    title: Whitelisted Methods Only
    description: >-
      Only methods explicitly decorated with @frappe.whitelist() are
      callable via the /api/method endpoint. Custom methods must be
      whitelisted to be invoked over HTTP.
    severity: required
  - id: csrf-token
    title: CSRF Token for Cookie Auth
    description: >-
      Session-cookie authenticated POST/PUT/DELETE calls require a valid
      X-Frappe-CSRF-Token header retrieved from the boot info or login
      response.
    severity: required
  - id: debug-flag
    title: Debug Flag in Production
    description: >-
      Avoid passing debug=True to production endpoints; it can expose
      executed SQL and is intended for development environments only.
    severity: required

Work with this as data

Every ruleset 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 spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • 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 ruleset
curl "https://apis.io/api/v1/rules/frappe-rest-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?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.