Quick revision
The short answer
Every public API style is a long-term promise of support, documentation, SDKs, security reviews and compatibility, so I add one only for a need the current REST API cannot meet well, decided with data on demand and revenue, with criteria for retiring it if adoption stays low. All styles come from one resource model (resources, fields, errors, pagination, auth scopes) as the source of truth, so names and semantics cannot drift. Real-time needs can often be met first with webhooks or server-sent events on the REST platform, and if GraphQL is offered it runs as a platform layer over the same domain services with query cost limits, persisted queries and the same rate limits and audit as REST.
What to remember
In this answer, we saw that each public API style is a long-term promise, so a new one is added only for a need the REST API cannot meet, decided with data on demand and revenue. One resource model generates or maps every style so names, errors, pagination and scopes stay consistent; webhooks or server-sent events can meet real-time needs first; GraphQL, if offered, runs as a platform layer with cost limits, persisted queries and the same rate limits and audit; and criteria for retiring a style are set before launch.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Every public API style is a long-term promise of support, documentation, SDKs, security reviews and compatibility, so I add one only for a need the current REST API cannot meet well, decided with data on demand and revenue, with criteria for retiring it if adoption stays low. All styles come from one resource model (resources, fields, errors, pagination, auth scopes) as the source of truth, so names and semantics cannot drift. Real-time needs can often be met first with webhooks or server-sent events on the REST platform, and if GraphQL is offered it runs as a platform layer over the same domain services with query cost limits, persisted queries and the same rate limits and audit as REST.
Why this question is asked
Two teams building a GraphQL API and a gRPC streaming API separately, for a platform with 3,000 integrations, is how a company ends up with three public APIs that disagree about names, errors and permissions, each supported forever. The senior technical leader's job is to decide deliberately which styles the platform offers and to build the structure that keeps them consistent for years. Interviewers ask this to see strategic judgement as well as technical depth. In this answer, we will treat each style as a promise, understand the demand, establish one resource model, meet real-time needs pragmatically, define how GraphQL would be run, and set criteria for adding and retiring styles.
1Every Public Style Is a Long-Term Promise
Inside a company, an API can be changed when all its callers agree. A public API cannot: 3,000 integrations are code we do not own, written by teams who will not change it unless forced. So each public style commits us, for years, to documentation, SDKs in several languages, security reviews and penetration tests, support staff who understand it, compatibility rules, and an on-call rotation.
That is why the first question is not which style is better, but which customer need the current REST API cannot meet well. If the answer is none, adding a style only adds cost. If the answer is clear and valuable, we add it once, properly, as part of the platform.
2Understanding the Demand With Data
Large customers asking loudly is a signal, not a measurement. We find out how many customers want each capability, how much revenue they represent, and what they are actually trying to do. 'We want GraphQL' often means 'your REST API makes us do 30 calls to render one screen', which might be solved with expanded fields or a bulk endpoint. 'We want gRPC streaming' often means 'we poll every 5 seconds to see changes', which webhooks may solve.
Each request becomes a problem statement with numbers: for example, 40 enterprise customers, 35 percent of API revenue, need change notifications within seconds. That gives us something to decide on, and something to measure success against later.
3One Resource Model as the Source of Truth
Whatever styles we offer, they must describe the same things in the same way. So we define one resource model: the resources, their fields and types, error codes, pagination rules and authorisation scopes. It lives in a machine-readable form, for example an OpenAPI description extended with our conventions or a schema in a neutral format, owned by a small API platform group and reviewed like code.
- Public stylesREST (default), webhooks and SSE, GraphQL if justified
- Generated or mapped adaptersfrom the resource model, never designed by hand
- Resource modelresources, fields, errors, pagination, auth scopes
- Shared platformauth, rate limits, audit, quotas, observability
- Domain servicesone implementation of the business logic
5 layers, from the top down. Step through them one at a time.
Styles are thin adapters over one model and one platform; that is what keeps them consistent for years.
Each style is then generated or mapped from that model, instead of designed by hand. A field called shippedAt in REST is shippedAt in GraphQL and shipped_at in Protobuf by a fixed rule, an error called ORDER_NOT_FOUND has the same meaning everywhere, and a scope that grants orders:read grants the same data in every style. Linting in CI rejects changes that break the model's conventions or its compatibility rules.
4Meeting Real-Time Needs Before Adding gRPC Streaming
Customers asking for real-time updates usually need to know when something changes. Webhooks, where we call the customer's URL when an event happens, and server-sent events, a long-lived HTTP response streaming events to the client, both run on the existing REST platform, use the same auth and resource representations, and work through every firewall and proxy. Most integration platforms already support webhooks.
gRPC streaming for external clients brings HTTP/2 requirements through customer networks, new SDKs and a new security surface. It makes sense if a few large customers need very high event volumes that webhooks cannot carry, and then it can be offered narrowly, for that use, generated from the same model.
5Running GraphQL as a Platform Layer
If the data shows that flexible reads are worth a GraphQL API, it is built once, by or with the platform group, as a layer over the same domain services that serve REST, never as a separate implementation of the business logic. It needs controls that REST gets almost for free: query depth and cost limits, so one query cannot fetch a million objects; persisted queries for heavy users, which also make their traffic predictable; and the same rate limits, quotas and audit logging as REST, accounted in a common unit so a customer cannot bypass REST limits by switching style.
6Criteria for Adding, Keeping and Retiring a Style
Before launch, we write down what success looks like and what would make us retire the style: for example, at least 100 active integrations or 20 percent of API revenue within 18 months. We review it on that date. If adoption stays low, we announce deprecation with a long notice period, help customers move, and switch it off, using a Sunset header to tell clients the end date. Retiring is hard, so the criteria are agreed up front, when nobody's project is at stake.
| Question | Example threshold |
|---|---|
| Need the current API cannot meet? | Written problem statement, not a style request |
| Demand | At least 30 customers or 20 percent of API revenue |
| Cheaper alternative tried? | Webhooks, bulk endpoints, expanded fields |
| Platform readiness | Same auth, limits, audit, generated from the model |
| Retirement criteria | Adoption target and review date set before launch |
7Follow-up questions
How do you stop the two teams' prototypes from becoming accidental products?
I would bring both teams into one decision process right away, with respect for the work they have done, since their prototypes are useful evidence. Nothing gets external access without the platform review: no public DNS, no keys for customers, no promises in sales calls. Prototypes can be shown to selected customers only as labelled previews with an explicit end date and no support commitment. Then, if the decision is to build, the useful parts are rebuilt on the shared model and platform; if not, the prototypes are switched off on the stated date, and customers were never told otherwise.
Why not let customers choose whatever style they like?
Because every style multiplies support, security and compatibility work for the whole life of the platform, and inconsistent styles confuse customers who use more than one. A few well-supported styles serve customers better than many half-supported ones.
How do you keep SDKs consistent across styles?
Generate them from the same resource model, with shared naming rules and error types, and test them against the same contract tests, so an order looks and behaves the same in every SDK.
8Conclusion
In this answer, we saw that each public API style is a long-term promise, so a new one is added only for a need the REST API cannot meet, decided with data on demand and revenue. One resource model generates or maps every style so names, errors, pagination and scopes stay consistent; webhooks or server-sent events can meet real-time needs first; GraphQL, if offered, runs as a platform layer with cost limits, persisted queries and the same rate limits and audit; and criteria for retiring a style are set before launch.
Open with
I would start from the fact that every public API style is a promise for years: documentation, SDKs, security reviews, support and compatibility for 3,000 integrations we do not control.
Then, if they want more
So I add a style only for a need our REST API cannot meet well, and I decide with data: how many customers, how much revenue, and what problem they are really trying to solve. Often a GraphQL request is really about too many round trips, and a streaming request is really about polling for changes.
For real-time needs, I would first offer webhooks or server-sent events on the existing REST platform before considering gRPC streaming for external clients.
Whatever we offer, all styles come from one resource model, resources, fields, errors, pagination and auth scopes, as the source of truth, and each style is generated or mapped from it, so names and semantics do not drift.
If we offer GraphQL, it runs as a platform layer over the same domain services, with query cost limits, persisted queries for heavy users, and the same rate limits and audit as REST. Before launching any style, I set adoption criteria and a review date, so if adoption stays low we have an agreed basis to retire it.
And I bring the two teams into this process now, so their prototypes inform the decision instead of becoming accidental products.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "As the senior technical leader, how do you decide which API styles the public platform...": https://scrivio-interview-library.netlify.app/architecture/api-design-at-scale/4a227a9b76/