Buildkite · API Governance Rules

Buildkite API Rules

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

7 Rules error 5 warn 2
View Rules File View on GitHub

Rule Categories

buildkite

Rules

error
buildkite-server-url
REST surface MUST be served from api.buildkite.com/v2.
$.servers[*].url
error
buildkite-bearer-auth
REST API uses HTTP Bearer authentication with an API access token.
$.components.securitySchemes.bearerAuth
warn
buildkite-title-case-summaries
Operation summaries should use Title Case.
$.paths[*][*].summary
error
buildkite-org-slug-param
Organization-scoped paths MUST include the `org` slug parameter.
$.paths['/organizations/{org}/pipelines'].get.parameters[*].name
warn
buildkite-operation-id-camel
operationId MUST be camelCase.
$.paths[*][*].operationId
error
buildkite-build-state-enum
Build state enum MUST include the canonical lifecycle states.
$.components.schemas.Build.properties.state.enum
error
buildkite-agent-connection-state-enum
Agent connection_state enum MUST cover the documented states.
$.components.schemas.Agent.properties.connection_state.enum

Spectral Ruleset

Raw ↑
# Spectral ruleset enforcing Buildkite REST API conventions.
extends:
- spectral:oas
rules:
  buildkite-server-url:
    description: REST surface MUST be served from api.buildkite.com/v2.
    given: $.servers[*].url
    severity: error
    then:
      function: pattern
      functionOptions:
        match: '^https://api\.buildkite\.com/v2$'
  buildkite-bearer-auth:
    description: REST API uses HTTP Bearer authentication with an API access token.
    given: $.components.securitySchemes.bearerAuth
    severity: error
    then:
    - field: type
      function: enumeration
      functionOptions:
        values: [http]
    - field: scheme
      function: enumeration
      functionOptions:
        values: [bearer]
  buildkite-title-case-summaries:
    description: Operation summaries should use Title Case.
    given: $.paths[*][*].summary
    severity: warn
    then:
      function: casing
      functionOptions:
        type: pascal
        separator:
          char: ' '
          allowLeading: true
  buildkite-org-slug-param:
    description: Organization-scoped paths MUST include the `org` slug parameter.
    given: "$.paths['/organizations/{org}/pipelines'].get.parameters[*].name"
    severity: error
    then:
      function: pattern
      functionOptions:
        match: '^org$|^.*$'
  buildkite-operation-id-camel:
    description: operationId MUST be camelCase.
    given: $.paths[*][*].operationId
    severity: warn
    then:
      function: casing
      functionOptions:
        type: camel
  buildkite-build-state-enum:
    description: Build state enum MUST include the canonical lifecycle states.
    given: $.components.schemas.Build.properties.state.enum
    severity: error
    then:
      function: schema
      functionOptions:
        schema:
          type: array
          contains:
            type: string
            enum: [running, scheduled, passed, failed, blocked, canceled, canceling, skipped, not_run, finished]
  buildkite-agent-connection-state-enum:
    description: Agent connection_state enum MUST cover the documented states.
    given: $.components.schemas.Agent.properties.connection_state.enum
    severity: error
    then:
      function: schema
      functionOptions:
        schema:
          type: array
          contains:
            type: string
            enum: [connected, disconnected, stopped, stopping, lost, never_connected]

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