Oura · API Governance Rules

Oura API Rules

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

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

Rule Categories

oura

Rules

warn
oura-paths-must-start-with-v2
All Oura paths must start with /v2/.
$.paths[*]~
warn
oura-info-title-must-be-oura-api
info.title should be 'Oura API'.
$.info.title
warn
oura-openapi-version-3_1
Oura uses OpenAPI 3.1.
$.openapi
warn
oura-operation-needs-summary
Every operation must have a summary.
$.paths.*[get,post,put,delete,patch]
error
oura-operation-needs-operationid
Every operation must have an operationId.
$.paths.*[get,post,put,delete,patch]
warn
oura-bearer-or-oauth2-security
Security schemes should include HTTPBearer and/or OAuth2.
$.components.securitySchemes
info
oura-sandbox-mirror-usercollection
Every /v2/sandbox/usercollection/* path should mirror a /v2/usercollection/* path.
$.paths[?(@property.match(/^\/v2\/sandbox\/usercollection\//))]~

Spectral Ruleset

Raw ↑
extends:
  - [spectral:oas, all]
documentationUrl: https://cloud.ouraring.com/v2/docs
description: Spectral ruleset capturing Oura Developer Cloud v2 conventions. Enforces consistent path prefixes,
  bearer-token security, and OpenAPI 3.1 compliance across the production usercollection, sandbox, and webhook
  surfaces.
rules:
  oura-paths-must-start-with-v2:
    description: All Oura paths must start with /v2/.
    message: "Path '{{value}}' should start with /v2/."
    severity: warn
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        match: "^/v2/"
  oura-info-title-must-be-oura-api:
    description: info.title should be 'Oura API'.
    severity: warn
    given: $.info.title
    then:
      function: pattern
      functionOptions:
        match: "^Oura API"
  oura-openapi-version-3_1:
    description: Oura uses OpenAPI 3.1.
    severity: warn
    given: $.openapi
    then:
      function: pattern
      functionOptions:
        match: "^3\\.1"
  oura-operation-needs-summary:
    description: Every operation must have a summary.
    severity: warn
    given: $.paths.*[get,post,put,delete,patch]
    then:
      field: summary
      function: truthy
  oura-operation-needs-operationid:
    description: Every operation must have an operationId.
    severity: error
    given: $.paths.*[get,post,put,delete,patch]
    then:
      field: operationId
      function: truthy
  oura-bearer-or-oauth2-security:
    description: Security schemes should include HTTPBearer and/or OAuth2.
    severity: warn
    given: $.components.securitySchemes
    then:
      function: truthy
  oura-sandbox-mirror-usercollection:
    description: Every /v2/sandbox/usercollection/* path should mirror a /v2/usercollection/* path.
    severity: info
    given: $.paths[?(@property.match(/^\/v2\/sandbox\/usercollection\//))]~
    then:
      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/oura-ring-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.