Jump to content

User:DKinzler (WMF)/API Guidelines

From mediawiki.org
Revision as of 22:40, 18 March 2023 by Duesentrieb (talk | contribs) (google)

For Maintainers

For Clients


Bill's Links

Search / WDQS

Bits & Pieces

Note to self: looked at: Adidas, Maturity, Atlassian, Whitehouse

Typical Structure & Aspects

  • Documentation
    • discoverable specs and schemas
  • HTTP binding
    • use of verbs, HATEOAS, idempotence (put vs post vs patch)
    • use of error codes, body of error responses
    • content types & negotiation
    • caching
    • conditionals
    • redirects (normalization, deprecation, and other)
    • other headers
    • guidance on urls vs header vs query param
    • resources vs entities
  • payload data
    • serialization (JSON)
    • shared data model
    • data types (date format, language codes, etc)
    • field names (rel, ref, etc)
    • schemas
    • pagination
    • standard query params: localization, variants, embedding/expansion
    • batch operations and collections (put vs post)
    • foreign key relation (entitiy URLs)
    • domains and bounded contexts, separation of concerns
    • no data in keys (really? maps are neat...)
  • Evolution
    • Versioning
    • URL vs headers, etc
    • content negotiation
    • deprecation
  • URL structure
    • characters & encoding
    • resources & collections (sub-collections, formats, nested resources, etc)
    • use American English nouns
    • searching vs. listing
    • formats / file extension suffix
  • Compliance
    • testing (pact)
    • SLA, rate limits
  • Security
    • Authentication
    • CORS/CSP
    • CSRF
  • Design process (see also https://cloud.google.com/apis/design/resources?hl=en)
    • Model entities (resources, nouns) and their relationships
    • Design a URL scheme for addressing the resources and collections
    • Define schemas for representing the entities.
    • Determine the behavior of standard verbs for each resource (and collection)