EVD-ARCH-008Evidence definitionArchitecture and GovernanceInterface / service contractReusableGuided journey available

API / Service Contract

Demonstrate that producers and consumers have an explicit shared interface definition that supports independent change without relying on undocumented implementation assumptions or accidental compatibility.

Evidence definition: what you need to demonstrate, why it matters and how to assess it. This is not a completed document.

Why it matters

The risk this evidence addresses

Read this first: this record exists to demonstrate that the relevant control is defined and operating — not to complete a document.

RiskWAG interpretation

APIs and independently changing services evolve without an explicit, current contract for behaviour, schemas, errors, compatibility and lifecycle expectations, causing breaking changes, integration failures and ambiguous producer-consumer responsibilities.

Synthesised from the Provide service contracts per API practice, which links explicit contracts and versioning/backward compatibility to reliable independent development and deployment.

Control objectiveWAG guidance

Maintain explicit, versioned and verifiable contracts for APIs and independently evolving service interfaces, covering inputs, outputs, behaviour, errors, compatibility, lifecycle and ownership, and validate implementations against those contracts.

A controlled, versioned contract defining the externally observable behaviour of an API or independently evolving service interface, including operations, inputs, outputs, errors, compatibility expectations, lifecycle and ownership.

Ownership

Ownership and review

No accountable role is recorded for this record yet. These are the roles involved in producing and using it.

Produces and contributes

Gathers the evidence and completes the record.

Consumes and reviews

Relies on this record to judge whether the relevant control is operating.

API Product Owner is normalised to Product / Service Owner and API Developer to Software Engineer using the migration taxonomy. QA and DevOps consumer roles are source-supported. Technical Writer is an explicit source role but remains unmapped in the canonical taxonomy and is therefore preserved only in source provenance rather than forced into another role family. No accountable role is inferred.

The product/service owner for the interface should ensure the contract represents intended consumer and business behaviour. API/software engineers maintain the technical definition. QA and delivery/platform roles should contribute verification and deployment/change considerations. Material compatibility or lifecycle changes should be agreed with affected consumers; WAG does not infer one universal risk-acceptance role.

Challenge

What to ask your team

Use these when the artefact is presented to you. Each one is designed to expose evidence that exists but does not hold.

  1. Q01

    What behaviour do consumers rely on that is not explicitly represented in the contract?

  2. Q02

    Which changes are considered breaking, and how would a producer know before release?

  3. Q03

    How do we prove that the deployed implementation still conforms to the published contract?

  4. Q04

    Are errors, retries, timeouts and other failure behaviours clear enough for consumers to build resilient integrations?

  5. Q05

    How are consumers identified and notified when a version is deprecated or compatibility changes?

  6. Q06

    Which parts of the contract are truly consumer-visible obligations and which are unnecessary implementation detail?

Specification

What it must contain, and what makes it credible

Minimum expected content

  • Contract identity, service/API name, owner and current version/status
  • Intended consumers, scope and interface purpose
  • Operations, endpoints, events or callable behaviours in scope
  • Request/input schemas, constraints and required/optional fields
  • Response/output schemas and semantic meaning
  • Expected behaviour, state changes and material side effects
  • Error model, error codes/conditions and retry expectations where relevant
  • Authentication/authorisation and trust expectations where they form part of the interface
  • Compatibility and versioning policy
  • Deprecation, migration and support-window expectations
  • Material reliability, timeout, idempotency or rate/usage expectations where consumers depend on them
  • Machine-readable contract/specification where appropriate
  • Verification or contract-test approach
  • Change history and communication expectations for consumers

What good looks like

  • The contract describes observable behaviour rather than internal implementation details
  • Schemas and semantics are precise enough for consumers to integrate without undocumented assumptions
  • Errors and exceptional behaviour are documented rather than only the happy path
  • Compatibility/versioning rules make clear which changes are breaking and how they are introduced
  • The contract is version controlled and can be traced to the currently supported interface
  • Machine-readable specifications are used where they improve verification or client/tool interoperability
  • Automated contract or compatibility checks verify that implementations match the declared interface where practical
  • Consumer-impacting changes have a defined communication, migration and deprecation path
  • Ownership is clear for resolving ambiguity and coordinating changes

Warning signs

  • Documentation generated from implementation but never reviewed as a producer-consumer contract
  • Only endpoint names are documented while schemas, semantics and errors remain implicit
  • Breaking changes are released under the same contract/version with no migration path
  • The contract embeds unnecessary implementation internals that prevent independent evolution
  • Versioning exists in the URL or metadata but no compatibility policy defines what versions mean
  • Consumers rely on behaviours not represented in the contract
  • Contract tests validate examples only and miss meaningful compatibility or schema changes
  • The published contract is stale compared with the deployed interface
  • No named owner or change path exists when producers and consumers disagree about expected behaviour

Checklist

Checklist and template structure

Use this contract for interfaces that can evolve independently and where consumers need a stable, testable definition of observable behaviour. Prefer a machine-readable specification where useful, but treat the specification as evidence only when it is current, governed and verified against the implementation.

  1. 01

    Contract identity and ownership

    Record service/API, owner, version, status and the scope of the contract.

  2. 02

    Purpose and consumers

    Describe intended consumers, integration purpose and any material usage assumptions.

  3. 03

    Operations and behaviour

    Define endpoints, operations, events or behaviours and their observable semantics.

  4. 04

    Inputs and outputs

    Define request/input and response/output schemas, constraints and semantic meaning.

  5. 05

    Errors and exceptional behaviour

    Define error conditions, responses and relevant retry/failure expectations.

  6. 06

    Interface quality expectations

    optional

    Record material timeout, idempotency, rate, reliability or other consumer-visible expectations where applicable.

  7. 07

    Versioning and compatibility

    Define compatibility rules, breaking-change policy and how versions are introduced.

  8. 08

    Deprecation and migration

    Define support windows, deprecation communication and consumer migration expectations.

  9. 09

    Contract verification

    Describe machine-readable specifications, contract tests or other checks that demonstrate implementation conformity.

  10. 10

    Change history and communication

    Record material changes and how affected consumers are notified or consulted.

Adopt this artefact

Markdown

The blank file contains one section per heading shown above, with the guidance kept as a quote you can delete.

Review cadenceReview whenever the interface, schemas, behaviour, compatibility policy or lifecycle materially changes, and keep the current contract version aligned with the deployed/supported interface.