Web APIs

Hand-drawn two tall hatched terracotta posts joined by a straight cord, a doubled cord with a return bend, a row of small tiles and a waving band, over patches of diagonal cream, sand, umber and moss hatching.

A web API (application programming interface) lets one program use another over a network. Designers choose among a few styles: remote procedure calls, resource-oriented HTTP usually called REST, GraphQL, streaming channels, and callbacks such as webhooks. Most APIs described as REST do not follow the definition of the term: in a review of 500 such APIs, 4.2% showed the hypermedia controls the definition requires (Neumann et al., 2021; Fielding, 2000). The main disputes concern whether a remote call can safely look like a local one, whether hypermedia is worth its cost, and which style performs best. Benchmarks of that last question rank the styles differently from one workload to the next (Waldo et al., 1994; Liskin et al., 2011; Zalando, n.d.; Niswar et al., 2024; Śliwa & Pańczyk, 2021).

Remote procedure calls

A remote procedure call (RPC) makes an operation on another machine look like an ordinary function call, and the idea has been rebuilt several times since the 1980s. Birrell and Nelson presented RPC in 1984 as a way for programs in high-level languages to communicate across a network (Birrell & Nelson, 1984). CORBA, from the Object Management Group, aimed to support applications built from interoperating distributed objects (Object Management Group, n.d.).

The web services of the 2000s carried the same idea in XML. SOAP 1.1, published in 2000, defined a lightweight XML mechanism for exchanging structured, typed information (World Wide Web Consortium, 2000). SOAP 1.2 describes it as an extensible messaging framework that can run over a variety of underlying protocols (World Wide Web Consortium, 2007). Later specifications added features on top; WS-ReliableMessaging, for example, defines acknowledgements and duplicate filtering for retransmitted messages (OASIS, 2008).

gRPC is Google’s public redesign of its internal RPC system, Stubby, built on newer standards and extended to mobile, Internet of Things and cloud systems (Ryan, 2015). A gRPC service is described by the methods that can be called remotely, with their parameters and return types (gRPC, n.d.).

The critique of transparent remote calls

Critics argue that a remote call cannot be made to behave like a local one. Waldo and colleagues argued in 1994 that distributed object systems require awareness of latency, separate memory, concurrency and partial failure, where one machine fails while others keep running (Waldo et al., 1994).

Java’s remote method invocation (RMI) keeps familiar call syntax but exposes a RemoteException so that callers handle communication failures (Wollrath et al., 1996). Fine-grained remote calls also cost time. In one field-access benchmark, RMI calls for each field were slower than two alternatives that transfer the fields in bulk (Ibrahim et al., 2009).

REST and resource-oriented HTTP

REST is the name Roy Fielding gave in his 2000 dissertation to a set of constraints for the Web’s architecture, not to an API format (Fielding, 2000). Most APIs that use the name follow only part of it (Neumann et al., 2021).

Fielding’s definition

Fielding identifies a uniform interface between components as the feature that distinguishes REST from other architectural styles (Fielding, 2000). That interface has four parts: resources are identified, they are manipulated through representations, messages describe themselves, and hypermedia drives the state of the application (Fielding, 2000).

Hypermedia controls are the links and forms inside a response that tell the client what it can do next. In Fielding’s design, responses carry the application’s control state in this way (Fielding, 2000).

How public APIs conform Strong evidence: many studies agree on this

Studies with different samples and methods agree that public APIs called REST use HTTP methods as intended but rarely include hypermedia. The Richardson maturity model labels the use of HTTP methods “level 2” and the addition of hypermedia “level 3”.

One review started from the 4,000 most popular websites on the Alexa ranking and found 500 that claimed to offer a REST API (Neumann et al., 2021). Reading the documentation without making live calls, the authors found that 88% used HTTP methods as expected. Only 4.2% showed hypermedia controls, and four APIs (0.8%) met every principle they could assess (Neumann et al., 2021). That last figure leaves out statelessness, layering and the optional code-on-demand constraint, which the documentation could not settle (Neumann et al., 2021).

Other sampling frames give the same picture:

StudySampleMethodResult
Renzel et al. 2012Top 20 REST services on the ProgrammableWeb directory17 design criteriaFew met the criteria (Renzel et al., 2012)
Bülthoff and Maleshkova 201445 popular web APIsDocumentation and test callsLinks to related resources in 8 of 45 (18%) (Bülthoff & Maleshkova, 2014)
Rodríguez et al. 2016Mobile network traffic, grouped by hostLinks inside 1,048 response payloadsMost of the traffic at level 2, few hosts at level 3 (Rodríguez et al., 2016)
Neumann et al. 2021500 self-described REST APIs among the top 4,000 sitesDocumentation onlyHypermedia in 4.2% (Neumann et al., 2021)

These studies count different things (documentation, test calls, hosts in traffic), so their rates do not share a denominator (Neumann et al., 2021; Bülthoff & Maleshkova, 2014; Rodríguez et al., 2016). Documentation can also understate what an API does: test calls in the 2014 survey found six APIs whose documentation omitted their caching support (Bülthoff & Maleshkova, 2014).

Whether hypermedia pays off Weak evidence: few or small studies support this

Whether hypermedia makes clients easier to maintain rests on one small prototype and one provider’s judgment. In a 2011 prototype comparison, most of the errors the authors made in their client without hypermedia were in hard-coded business logic (Liskin et al., 2011). Zalando takes the opposite view for its service-oriented e-commerce platform: it does not generally recommend level 3, since hypermedia adds complexity “without real value” there (Zalando, n.d.).

Design rules for HTTP APIs Weak evidence: few or small studies support this

Most style-guide rules for naming paths and choosing methods have little empirical support. Where experiments tested them, breaking a rule usually lowered how well people understood API snippets, though path length made no significant difference (Bogner et al., 2023). The experiments, their limits and the expert ratings of 82 rules are in API design.

GraphQL

GraphQL lets a client describe, in one request, exactly the data it needs. It was created in 2012, and work on it as an open standard began in 2015 (GraphQL Specification Project, 2025). A request is structured as a hierarchy shaped like the response it asks for (GraphQL Specification Project, 2025). A schema on the server lists the types and directives the service supports and the entry point for each kind of operation (GraphQL Specification Project, 2025).

Studies of real schemas show that what is typical depends on where one looks. A comparison of 16 commercial schemas with 8,399 schemas mined from GitHub found that reliance on GraphQL features differed between the two groups (Wittern et al., 2019). Another study found more than 20,000 GraphQL-related projects on GitHub and more than 37,000 packages and repositories depending on GraphQL through package registries (Kim et al., 2019a).

The cost of a query to the server is a research topic of its own. One research group proposed a defensive analysis of query cost and evaluated it on queries and responses from two commercial GraphQL APIs (Cha et al., 2020).

Streaming and real-time channels

Real-time mechanisms differ in which side may send and when. They let a server push updates instead of waiting to be asked:

MechanismWhat it provides
WebSocketAfter an opening handshake, either side may send messages independently (Fette & Melnikov, 2011)
Server-sent eventsThe server sends a stream of updates as text/event-stream; the client can reconnect, and an HTTP 204 response tells it to stop (WHATWG, n.d.d)
Long pollingThe server holds a request open until it has an update, or a status or timeout occurs (Loreto et al., 2011)
gRPC bidirectional streamingBoth peers send independent sequences of messages (gRPC, n.d.)
WebTransportSeveral streams, including one-way streams, with both reliable and unreliable delivery (World Wide Web Consortium, 2026i)

In one benchmark, plain polling kept up with push once clients could accept some delay. On that live open-data interface, polling served the same number of clients as server-sent events, 25,000, once the acceptable latency was set to 10 seconds (Van de Vyvere et al., 2020).

Webhooks and WebSub

A webhook reverses the usual direction: the provider calls a URL the receiver registered whenever an event happens. The receiver must then cope with failed, repeated, out-of-order and forged deliveries (GitHub, n.d.c; Stripe, n.d.b; GitHub, n.d.f). Notifications between the parts of a larger system are covered in event-driven architecture.

The W3C standard WebSub routes updates through hubs, which distribute new or updated content to subscribers (Genestoux, 2026). It asks hubs to retry failed deliveries, within limits each hub sets (Genestoux, 2026).

Large providers handle failure differently. Stripe retries live events for up to three days with exponential backoff, waiting longer after each failure (Stripe, n.d.b). GitHub does not retry failed deliveries automatically (GitHub, n.d.c). Stripe also does not guarantee that events arrive in the order they were generated, and suggests receivers use the IDs of processed events to detect duplicates (Stripe, n.d.b).

Signatures protect a receiver against calls that only pretend to come from the provider. GitHub documents a shared webhook secret that lets a receiver verify that a delivery came from GitHub (GitHub, n.d.f). Other attacks on web applications are covered in web security.

Retry policies Weak evidence: few or small studies support this

The evidence on how best to retry rests on one preprint from one fintech platform. It compared fixed intervals, exponential backoff and a hybrid with fast first retries, simulating each on historical telemetry (Shrikant, 2025). Most server-side failures on that platform recovered within three attempts, and the simulations favoured the hybrid policy (Shrikant, 2025).

Contracts and interface descriptions

Each style has its own machine-readable contract, a description of the interface that tools and people can read:

  • OpenAPI describes HTTP APIs independently of programming language (OpenAPI Initiative, 2025).
  • AsyncAPI describes message-driven APIs (AsyncAPI Initiative, n.d.b).
  • Protocol Buffers .proto files define message types and RPC service interfaces (Google, n.d.e).
  • A GraphQL schema, described above, plays the same role for GraphQL.
  • JSON Schema expresses constraints on the structure of JSON data (Wright et al., 2022).

Public OpenAPI contracts often lack examples and descriptions. In 2,529 public OpenAPI files from the APIs.guru directory, an automated analysis found parameter examples missing in 86.95% and route-level descriptions missing in 63.90%, by its authors’ criteria (Decrop et al., 2026).

The origin of AsyncAPI

Sources disagree on when AsyncAPI began. It started at the company Hitch as a description format for message-driven microservices (AsyncAPI Initiative, n.d.a). The Linux Foundation dates its creation to 2016, and a project post says its first release was in 2016 (Linux Foundation, 2021; Writes, 2022). Another project post dates its creation to 18 November 2017 (Gornicki, 2020).

Comparing the styles

Benchmarks disagree on which of REST, GraphQL and gRPC is fastest; each measured one implementation under one workload. One compared communication between microservices, small services deployed independently (Niswar et al., 2024).

StudyWorkloadResult
Niswar et al. 2024Containerized services reading flat and nested datagRPC fastest, then REST, then GraphQL; GraphQL used the most CPU (Niswar et al., 2024)
Śliwa and Pańczyk 2021Load test of display and add operationsREST had the highest throughput and fastest server response; gRPC exchanged the least data (Śliwa & Pańczyk, 2021)
Zieliński 2026All three in one Go process, sharing an in-memory store and TLS settings, over HTTP/2 and REST also over HTTP/1.1On a simulated 50 ms link, throughput converged when HTTP/1.1 had enough connections (Zieliński, 2026)

The matched benchmark shows how much the network can outweigh the style. On the slow link, each style carried one call per caller per round trip, so throughput depended on the number of concurrent callers (Zieliński, 2026). Fetching a nested page took 17,241 bytes of request and response with REST and 9,230 with one GraphQL call (Zieliński, 2026).

In a controlled experiment on developer effort, participants took a median of six minutes to implement queries with GraphQL and nine with REST (Brito & Valente, 2020). One task type, about repositories, took longer with GraphQL (Brito & Valente, 2020).

Adoption Strong evidence: many studies agree on this

Industry surveys put REST first, but their figures for the other styles depend on who was asked and how. In DZone’s 2023 survey, respondents estimated on average that 67% of their organization’s APIs were REST (DZone, 2023). Its estimate for GraphQL was lower in 2023 than in 2022 (DZone, 2023).

Other surveys report the share of respondents or organizations using each style:

SurveyRESTGraphQLOther styles
DZone 2022Present in over a third of organizations (DZone, 2022)
DZone 2023Any use in 45% (DZone, 2023)
Gartner 202485%19%AsyncAPI 20%, gRPC 11% (O'Neill & Santoro, 2024)
Postman 202593%33%Webhooks 50%, WebSockets 35% (Postman, 2025)

Further reading

Known gaps

What this article cannot tell you yet.

  1. JSON-RPC was not researched.
  2. Message brokers and event protocols such as Kafka, AMQP, MQTT, NATS and CloudEvents were not researched.
  3. Whether the REST design rules tested on documentation snippets affect developers working against a live API was not researched.
  4. Longer-term maintenance or reliability outcomes of hypermedia clients, beyond one 2011 prototype, were not researched.
  5. Independent comparisons that confirm or limit the published REST, GraphQL and gRPC benchmarks were not researched.
  6. Independent evaluations of webhook retry policies on platforms other than the one fintech preprint were not researched.
  7. Later work on the WebSocket protocol, WebSub, Cedar RPC, SOAP 1.1 and the critique of transparent remote calls was not researched.
  8. The milestone behind AsyncAPI’s 2017 anniversary date could not be established.
  9. The two REST, GraphQL and gRPC benchmarks by Niswar et al. and Śliwa and Pańczyk, and the Gartner adoption figures, are known only from abstracts or summaries.

References

Solid source
Rated highly trustworthy by the research, and every passage taken from it was found in it.
Weak source
Rated low, or a passage taken from it was not found in it.
Medium trust
Rated medium by the research.
Not checked
Rated high, but its passages could not all be checked against it.
Show all 49 references