University of Edinburgh · API Governance Rules

University of Edinburgh API Rules

Spectral linting rules defining API design standards and conventions for University of Edinburgh.

6 Rules error 2 warn 4
View Rules File View on GitHub

Rule Categories

datashare

Rules

warn
datashare-info-contact
API info should include a contact.
$.info
error
datashare-https-server
Servers must use HTTPS.
$.servers[*].url
warn
datashare-operation-id
Every operation should declare an operationId.
$.paths[*][get]
warn
datashare-object-has-uuid
DSpace object schemas should expose a uuid property.
$.components.schemas[Community,Collection,Item,Bitstream].properties
warn
datashare-uuid-path-params
Resource id path parameters should be typed as uuid strings.
$.components.parameters[communityId,collectionId,itemId,bitstreamId].schema
error
datashare-read-only
Public DataShare REST API is read-only; only GET operations are expected.
$.paths[*]

Spectral Ruleset

Raw ↑
extends: [[spectral:oas, off]]
formats:
  - oas3
documentationUrl: https://datashare.ed.ac.uk/server/api
# x-provenance:
#   method: derived
#   generated: '2026-08-19'
#   source: https://datashare.ed.ac.uk/server/api
#   operator: institution
#   note: >-
#     Retargeted on 2026-08-19. The previous documentationUrl pointed at a 2021
#     University library blog post describing the DSpace 6 legacy /rest API, which is
#     now retired (404). That post is still live and still documents the dead endpoint.
rules:
  datashare-info-contact:
    description: API info should include a contact.
    severity: warn
    given: $.info
    then:
      field: contact
      function: truthy

  datashare-https-server:
    description: Servers must use HTTPS.
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: '^https://'

  datashare-operation-id:
    description: Every operation should declare an operationId.
    severity: warn
    given: $.paths[*][get]
    then:
      field: operationId
      function: truthy

  datashare-object-has-uuid:
    description: DSpace object schemas should expose a uuid property.
    severity: warn
    given: $.components.schemas[Community,Collection,Item,Bitstream].properties
    then:
      field: uuid
      function: defined

  datashare-uuid-path-params:
    description: Resource id path parameters should be typed as uuid strings.
    severity: warn
    given: $.components.parameters[communityId,collectionId,itemId,bitstreamId].schema
    then:
      field: format
      function: pattern
      functionOptions:
        match: '^uuid$'

  datashare-read-only:
    description: Public DataShare REST API is read-only; only GET operations are expected.
    severity: error
    given: $.paths[*]
    then:
      field: post
      function: undefined

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/university-of-edinburgh-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.