Barclays · API Governance Rules

Barclays API Rules

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

7 Rules error 5 warn 1 info 1
View Rules File View on GitHub

Rule Categories

barclays

Rules

error
barclays-api-has-documentation
All Barclays API entries must have a Documentation property.
$.apis[*]
error
barclays-api-has-description
All Barclays API entries must have a description.
$.apis[*]
error
barclays-api-has-name
All Barclays API entries must have a name.
$.apis[*]
error
barclays-api-has-human-url
All Barclays API entries must have a humanURL.
$.apis[*]
warn
barclays-api-has-tags
All Barclays API entries must have tags.
$.apis[*]
info
barclays-open-banking-has-psd2-tag
Barclays Open Banking APIs should be tagged with Open Banking or PSD2.
$.apis[?(@.name =~ /Open Banking|Account|Payment|Confirmation/i)]
error
barclays-apis-json-has-description
Barclays APIs.json must have a description.
$

Spectral Ruleset

barclays-spectral-rules.yml Raw ↑
rules:
  barclays-api-has-documentation:
    description: All Barclays API entries must have a Documentation property.
    message: "{{description}}"
    severity: error
    given: "$.apis[*]"
    then:
      field: properties
      function: schema
      functionOptions:
        schema:
          type: array
          contains:
            type: object
            properties:
              type:
                const: Documentation
            required:
              - type

  barclays-api-has-description:
    description: All Barclays API entries must have a description.
    message: "{{description}}"
    severity: error
    given: "$.apis[*]"
    then:
      field: description
      function: truthy

  barclays-api-has-name:
    description: All Barclays API entries must have a name.
    message: "{{description}}"
    severity: error
    given: "$.apis[*]"
    then:
      field: name
      function: truthy

  barclays-api-has-human-url:
    description: All Barclays API entries must have a humanURL.
    message: "{{description}}"
    severity: error
    given: "$.apis[*]"
    then:
      field: humanURL
      function: truthy

  barclays-api-has-tags:
    description: All Barclays API entries must have tags.
    message: "{{description}}"
    severity: warn
    given: "$.apis[*]"
    then:
      field: tags
      function: truthy

  barclays-open-banking-has-psd2-tag:
    description: Barclays Open Banking APIs should be tagged with Open Banking or PSD2.
    message: "{{description}}"
    severity: info
    given: "$.apis[?(@.name =~ /Open Banking|Account|Payment|Confirmation/i)]"
    then:
      field: tags
      function: schema
      functionOptions:
        schema:
          type: array
          contains:
            type: string
            pattern: "Open Banking|PSD2"

  barclays-apis-json-has-description:
    description: Barclays APIs.json must have a description.
    message: "{{description}}"
    severity: error
    given: "$"
    then:
      field: description
      function: truthy

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/barclays-spectral-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 email required.

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