Uptrace · API Governance Rules

Uptrace API Rules

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

7 Rules warn 4 info 3
View Rules File View on GitHub

Rule Categories

uptrace

Rules

warn
uptrace-operation-ids-camel-case
Operation IDs must use camelCase
$.paths[*][*].operationId
warn
uptrace-path-kebab-case
Path segments must use kebab-case
$.paths[*]~
warn
uptrace-summaries-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
info
uptrace-bearer-auth
All non-ingestion operations should use BearerAuth or DSNAuth
$.paths[?(!@property.match(/prometheus\/write/))][get,post,put,delete]
warn
uptrace-delete-returns-204
DELETE operations must return 204
$.paths[*].delete.responses
info
uptrace-project-id-required
List and create operations should require projectId
$.paths[*].get
info
uptrace-api-prefix
API paths should use /api/ prefix
$.paths[*]~

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  uptrace-operation-ids-camel-case:
    description: Operation IDs must use camelCase
    message: "Operation ID '{{value}}' must be camelCase"
    severity: warn
    given: "$.paths[*][*].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"

  uptrace-path-kebab-case:
    description: Path segments must use kebab-case
    message: "Path '{{path}}' must use kebab-case segments"
    severity: warn
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "^(/[a-z0-9{}-]+)+$"

  uptrace-summaries-title-case:
    description: Operation summaries must use Title Case
    message: "Summary '{{value}}' must use Title Case"
    severity: warn
    given: "$.paths[*][*].summary"
    then:
      function: pattern
      functionOptions:
        match: "^([A-Z][a-z0-9]* ?)+$"

  uptrace-bearer-auth:
    description: All non-ingestion operations should use BearerAuth or DSNAuth
    message: "Operation should use BearerAuth or DSNAuth security"
    severity: info
    given: "$.paths[?(!@property.match(/prometheus\\/write/))][get,post,put,delete]"
    then:
      function: schema
      functionOptions:
        schema:
          type: object

  uptrace-delete-returns-204:
    description: DELETE operations must return 204
    message: "DELETE should return 204 No Content"
    severity: warn
    given: "$.paths[*].delete.responses"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          required: ['204']

  uptrace-project-id-required:
    description: List and create operations should require projectId
    message: "Collection endpoint should require projectId parameter"
    severity: info
    given: "$.paths[*].get"
    then:
      function: schema
      functionOptions:
        schema:
          type: object

  uptrace-api-prefix:
    description: API paths should use /api/ prefix
    message: "Uptrace API paths should start with /api/"
    severity: info
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "^/api/.*"

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/uptrace-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.