InterviewStack.io LogoInterviewStack.io

API Contracts and Schema Design Questions

Defining the interface contract between producers and consumers: request/response payload shapes, data models, field-level validation, nullability, and enum/typing decisions (including safely evolving an enum's allowed values without breaking clients). Covers contract-first design with OpenAPI and JSON Schema (authoring specs, generating SDKs and mock servers, catching breaking changes in CI), mapping internal domain models to external DTOs as both evolve independently, and designing a stable error-response contract (structured error codes, correlation IDs, retryable classification). Also covers the leadership and behavioral practice of establishing and governing contract standards across teams. The contract is the durable artifact clients depend on.

MediumTechnical
54 practiced

Draft a concise API contract (endpoints, request/response examples, and audit behavior) for an internal feature-flagging service used by multiple teams. Include endpoints for creating a flag, evaluating a flag on a low-latency path, toggling a flag, and retrieving audit logs. Note the performance and safety considerations your schema choices need to account for.

EasyTechnical
79 practiced

What is OpenAPI (Swagger), and how does an OpenAPI specification improve API design, documentation, and developer experience? Explain how you would use the spec in continuous integration to detect breaking changes before deployment and to generate SDKs and mock servers.

EasyTechnical
56 practiced

Compare JSON and Protocol Buffers (protobuf) as serialization formats for APIs. Discuss trade-offs across latency, payload size, schema evolution, developer ergonomics, client diversity, human-readability, and tooling. Provide scenarios where you would choose JSON for a public REST API and where you would choose protobuf for internal, high-throughput communication, and why.

HardSystem Design
41 practiced

What schema and data-contract decisions matter most for a multi-tenant API platform where each tenant can have its own response-shaping rules and audit requirements? Consider shared-versus-per-tenant fields, versioning implications, and audit metadata in the payload, and explain how these choices keep the platform maintainable as the tenant count grows.

EasyTechnical
39 practiced

Explain contract-first (OpenAPI-first) versus code-first API development. Discuss how each approach impacts documentation quality, SDK generation, design reviews, iteration speed, and coordination with product and client teams in a cross-functional environment.

That is every published API Contracts and Schema Design question for Cloud Architect so far. Browse the other topics in this category, or practice this one interactively.