InterviewStack.io LogoInterviewStack.io

Api Design and Versioning Questions

Design and evolve application programming interfaces so they meet functional requirements while minimizing disruption to clients and services. Core skills include designing resource oriented endpoints, choosing and implementing versioning strategies, and preserving backward compatibility. Candidates should understand versioning approaches such as embedding a version in the endpoint path, using request headers to select versions, and designing non breaking changes so explicit version bumps are avoided. Important topics include idempotency, pagination, filtering, sorting, error response design, status semantics, rate limiting, authentication and authorization, and considerations for low bandwidth or mobile clients. At senior levels discuss operational and lifecycle concerns: deprecation policies and timelines, migration plans, compatibility testing, handling multiple client versions simultaneously in production, rolling deployments and coexistence strategies, contract testing, and alternatives such as remote procedure call frameworks. Expect trade off discussions around developer experience, client upgrade friction, monitoring and instrumentation for versioned traffic, and communication strategies with downstream consumers.

MediumTechnical
67 practiced
Describe how you would run a customer migration program to move clients from API v1 to v2 with minimal friction. Include stakeholder communication (timelines, deprecation notices), migration tooling (compatibility adapters, SDKs), testing and validation (contract tests), support resources, and metrics to track adoption and success.
MediumTechnical
57 practiced
As a Solutions Architect, explain when you would choose gRPC over REST/JSON for internal microservice communication. Consider latency, payload size, streaming support, cross-language clients, browser compatibility, tooling (proto vs OpenAPI), and versioning implications. Provide concrete examples where gRPC is a strong fit and cases where REST is preferable.
MediumTechnical
63 practiced
Write a Node.js/JavaScript pseudocode function `mapErrorToResponse(err, requestId)` that maps internal exceptions into standard API error responses. The function should return an object with `httpStatus` and a response `body` containing {code, message, details, requestId}. Map ValidationError, AuthError, RateLimitError, NotFoundError, and unexpected server errors while avoiding leaking stack traces.
EasyTechnical
70 practiced
Design two pagination strategies for a 'List transactions' endpoint: offset-based and cursor-based. For each strategy provide: query parameters, sample request and JSON response (include 'items' and next page indicators), and discuss trade-offs regarding consistency, performance, and developer ergonomics. Provide a concise OpenAPI-style snippet for the cursor-based response including a 'nextCursor'.
HardTechnical
66 practiced
Explain how to implement conditional GET semantics using ETag in Node.js/Express. Provide pseudocode for computing and caching ETags for JSON responses, handling `If-None-Match`, and avoiding expensive recomputation for large payloads. Discuss weak vs strong ETags and how they interact with compression and versioned endpoints.

Unlock Full Question Bank

Get access to hundreds of Api Design and Versioning interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.