MusicBrainz · API Governance Rules
MusicBrainz API Rules
Spectral linting rules defining API design standards and conventions for MusicBrainz.
22 Rules
error 10
warn 9
info 3
Rule Categories
musicbrainz
Rules
error
musicbrainz-operation-ids-required
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
error
musicbrainz-operation-summary-required
All operations must have a Title Case summary
$.paths[*][get,post,put,patch,delete]
error
musicbrainz-tags-required
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
musicbrainz-description-required
Operations should have descriptions
$.paths[*][get,post,put,patch,delete]
error
musicbrainz-response-200-get
GET operations must document a 200 response
$.paths[*].get
error
musicbrainz-response-429-required
All operations must document 429 Too Many Requests (MusicBrainz enforces 1 req/sec/IP)
$.paths[*][get,post,put,patch,delete]
warn
musicbrainz-response-404-required-lookup
Lookup operations (entity by MBID) must document 404 Not Found
$.paths[?(@property.match(/\{mbid\}|\{isrc\}|\{iswc\}|\{discid\}/))][get]
error
musicbrainz-mbid-uuid-format
MBID path parameters must use UUID format
$.paths[*][get,post,put,patch,delete].parameters[?(@.name == 'mbid')]
warn
musicbrainz-isrc-pattern
ISRC path parameters should validate the 12-character ISRC pattern
$.paths[*][get].parameters[?(@.name == 'isrc')]
info
musicbrainz-fmt-query-parameter
Read endpoints should expose a `fmt` query parameter for XML/JSON content negotiation
$.paths[*].get
info
musicbrainz-inc-query-parameter
Lookup and browse endpoints should expose an `inc` query parameter for sub-resource includes
$.paths[?(@property.match(/^\/(artist|release|release-group|recording|work|label|place|area|event|instrument|series|url|isrc|iswc|discid)/))][get]
warn
musicbrainz-pagination-limit-param
Browse and search endpoints should support `limit` (1-100, default 25)
$.paths[/artist|/release|/release-group|/recording|/work|/label|/place|/event|/instrument|/series|/genre/all]..parameters[?(@.name == 'limit')]
warn
musicbrainz-pagination-offset-param
Browse and search endpoints should support `offset` for pagination
$.paths[/artist|/release|/release-group|/recording|/work|/label|/place|/event|/instrument|/series|/genre/all]..parameters[?(@.name == 'offset')]
error
musicbrainz-submission-requires-client
All POST/PUT/DELETE submission endpoints must require a `client` query parameter
$.paths[*][post,put,delete].parameters[?(@.name == 'client')]
error
musicbrainz-submission-requires-auth
All submission endpoints must require authentication (HTTPBasic or OAuth2)
$.paths[*][post,put,delete]
error
musicbrainz-auth-schemes-defined
API must declare HTTPBasic and OAuth2 security schemes
$.components.securitySchemes
error
musicbrainz-server-https
All server URLs must use HTTPS
$.servers[*].url
warn
musicbrainz-ws2-base-path
Production server URL should be rooted at /ws/2
$.servers[?(@.url.match(/musicbrainz\.org/))].url
warn
musicbrainz-user-agent-documented
API description must mention the mandatory User-Agent requirement
$.info.description
warn
musicbrainz-rate-limit-documented
API description must mention the 1 request per second per IP rate limit
$.info.description
info
musicbrainz-response-schema-required
Success responses on lookup endpoints should reference a defined schema
$.paths[?(@property.match(/\{mbid\}/))][get].responses.200.content.application/json
warn
musicbrainz-path-kebab-case
Paths should use lowercase with kebab-case (hyphens) for multi-word segments
$.paths[*]~