⚡ ~/naveed Interview Prep
⚡ Portfolio Home ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 1,000+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
← Back to All Platform Engineering & IDP Interview Questions Scenario 23 of 50 in Platform Engineering & IDP
Staff Platform Engineer Platform Engineering Developer Portals & Self-Service Unified DevEx
🎯 Target Role / Context: Principal Platform Engineer Interview · Developer Architecture

Q: Senior engineers prefer working in their terminal using a CLI, while product managers and QA engineers prefer web portals like Backstage or Port. How do you design an internal platform API that serves both interfaces without duplicating business logic and governance rules?

Architectural design of a unified, headless platform API powering both terminal CLIs and web developer portals with consistent RBAC and validation.

#Platform Engineering #DevEx #CLI #Backstage #API #Developer Experience
🎙️ Candidate Opening & Architectural Context
"Never build business logic directly inside Backstage frontend plugins or standalone CLI binaries. Architect a headless 'Platform API' (in Go or TypeScript) exposing REST/gRPC endpoints. Both the Backstage plugin and the developer CLI (`acmectl`) consume the exact same authenticated API."
Advertisement
⚡ Recommended Practice Lab

Want to master this scenario in a live sandbox? KodeKloud's CKA & CKAD Hands-On Certification Track covers this exact problem with hands-on terminal drills.

🛠️ Production Runbook & Step-by-Step Resolution

1

Design OpenAPI/gRPC Platform Service Contract

Define declarative API specs for platform capabilities: `POST /v1/environments`, `POST /v1/services`, `GET /v1/templates`. All parameter validations, quota checks, and authorization rules reside on this central service.

# openapi.yaml snippet
paths:
  /v1/environments:
    post:
      summary: Provision ephemeral environment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentRequest'
2

Build Lightweight Developer CLI (`acmectl`) Consuming the Platform API

Write `acmectl` in Go using Cobra. It handles local developer identity via SSO (`acmectl login`) and issues authorized requests to the central Platform API.

# Developer runs in terminal:
acmectl env create --name pr-42 --ttl 4h
acmectl catalog view checkout-api
Advertisement
3

Backstage UI Plugs Into the Same Platform Backend

The Backstage frontend custom plugin acts simply as a web client to the Platform API, ensuring that whether a resource is vended via UI or CLI, the exact same policies and audit logs trigger.

Pro Tip: Design Maxim: Portals and CLIs are view layers. Your platform is the API behind them.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Build a unified developer platform by creating a headless, policy-enforced Platform API that powers both terminal CLIs and web developer portals simultaneously."
⚡ 60-Second Elevator Pitch Talking Points
  • Design platform operations as a centralized REST/gRPC API before building user interfaces.
  • Build a lightweight Go CLI (acmectl) for terminal-centric developers that queries the platform API.
  • Use Backstage as a visual client consuming the exact same backend endpoints and authorization rules.
Advertisement
Want more Platform Engineering & IDP scenarios?
Explore our complete collection of scenario-based Platform Engineering & IDP interview runbooks.
Browse All Platform Engineering & IDP Questions →