Skip to content
Tech Interview Prep
Technical interview guide

Platform APIs & Abstraction Layers

Designing the interface between a platform and the teams using it: what to expose, and what to hide.

Minutes to read
4
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed
Relevant for
Platform Engineer

Scope: AWS and Microsoft platform engineering guidance, Google Cloud API Design Guide/AIPs, and Kubernetes API documentation current 2026-08-31.

Overview

Curated: · Written: · Reviewed:

Platform APIs & Abstraction Layers

In one line

A platform API is the stable contract between a platform team and the teams that consume it. It exposes the decisions a consumer must own (cost, durability, security, locality, workload responsibility) and hides the provider wiring and sequencing the platform owns. Reach for it when you ship a capability to dozens of consuming teams you cannot see, and when you need one contract that survives a provider change.

Key definitions

  • Domain intent: a resource described by what the user needs, such as a production database with an owner, data class and availability target, not by provider calls.
  • Capability discovery: the API reports what a backend supports (PITR, read replicas) instead of a shared field whose meaning differs per provider.
  • Adapter boundary: the layer that maps domain resources to a provider and owns error mapping, idempotency and conformance tests.
  • Idempotency key: a client-supplied identity that deduplicates an operation for a documented retention window. It gives deduplicated effects, not exactly-once execution.
  • Escape hatch: a bounded, validated, visible extension point with stated support limits. It is never raw credentials.
  • Field ownership: each field is written by the platform, the user or the controller, and by no one else.

How it works

  1. Portal, CLI, Terraform and GitOps clients send intent to one server-side API.
  2. The server validates, authorizes and stores desired state before any provider call.
  3. The adapter maps the resource to a provider. Long-running work returns a durable operation ID at once.
  4. Observed status is reported separately from desired state. Drift is reconciled, and undocumented inconsistency counts as a defect.
Portal / CLI / Terraform / GitOps Platform API: validate, authorize, store desired state Operation resource with ID Provider adapter Provider A Provider B Observed status

When to use and when not to

DecisionExpose to the callerHide behind the platform
Durability or availabilityYes, as a named class with stated guaranteesReplication factor, failover mechanics
Backup and deletionYes, the platform states who owns themBackup scheduling, deletion order
Provider storage classNo, map it to a domain tierProvider class names and tables
Provisioning stepsNoSequencing and rollback
Provider metadata such as ETagsOnly as a documented opaque tokenProvider semantics
Provider-only featureCapability flag or distinct resource classShared field with per-provider meaning

Do not build the abstraction when there is one provider, no second consumer, and no realistic migration. Build it when consumers would otherwise branch on provider fields.

Traps interviewers probe

  1. Lowest common denominator. A field such as highAvailability: true means synchronous replication on one cloud and best-effort failover on another. Fix: capability discovery or a distinct resource class.
  2. Consumers reading provider fields. Teams branch on providerStorageClass and break when a second provider returns unmapped values. Fix: publish one domain field as the supported contract, document its enum, and make consumers tolerate values they do not yet know.
  3. Holding a POST open. The handler waits 6 to 9 minutes for a provider, the gateway and SDK time out, and the retry creates a second resource. Fix: validate first, return an operation ID immediately, and bind a create to a request identity so a retry returns the prior outcome.
  4. Rules in the UI. The portal blocks a delete that the CLI allows. Fix: run validation and authorization server-side, shared by every client.
  5. Compatibility by field name alone. Adding an enum value or changing a default breaks callers that keep every field name and type intact. Fix: test old clients against new servers, and deprecate with dates and owner outreach.

Interview tips

Open with the criterion: "I expose what the user owns and hide what the platform owns," then give one example of each. Name the trade-off that decides it: durability, locality or cost stays visible; sequencing and provider wiring stay hidden.

Follow-ups to expect:

  • How you test the contract: retry with the same key, timeout after a side effect, stale resourceVersion, pagination with a tenant filter, deletion and name reuse.
  • How you migrate a portal-only platform to an API-first one, and which clients you move first.
  • Where you would deliberately not abstract.

30-second answer outline:

  1. The criterion: user-owned tradeoffs stay visible, platform-owned sequencing stays hidden.
  2. One exposed decision and why it must stay visible.
  3. One hidden detail and why the platform owns it.
  4. How the contract stays safe: server-side checks, idempotent creates, an operation resource, versioned deprecation.
  5. What you would measure: operation age, stale status, error reason by category.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.