The API Advocacy Pattern #2

The API User Advocate: A Role That Doesn't Exist Yet

Between the vendor SDK and your production app, there should be a hardened client layer. We call this the API User Advocate.

#api #developer-experience #advocacy #architecture #aec
Dmytro Yemelianov - Author
Dmytro Yemelianov
Autodesk Expert Elite • APS Developer

Every team that integrates with a vendor API builds the same thing: retry logic, rate limit handling, auth token management, error translation, bulk orchestration. They build it from scratch, every time, because the vendor won’t.

There is a name for the missing role that should build this once: the API User Advocate.


The Same Problem, Everywhere

You are a developer. You need to integrate with a vendor API. The vendor gives you:

  • An SDK that wraps HTTP calls
  • Documentation that describes the happy path
  • A support forum where your questions go unanswered

What the vendor does not give you:

  • Retry logic for transient failures
  • Graceful handling of rate limits
  • Token refresh that does not race-condition under concurrency
  • Error messages that tell you what to actually fix
  • Bulk operations that do not require N sequential API calls
  • Upload strategies that survive network interruptions

So you build all of it yourself. And so does the next team. And the next.


What the API User Advocate Is Not

Developer Relations
Explains the API. Writes blog posts. Runs workshops. Does not fix the API’s operational gaps.
Solutions Architect
Designs around the API. Builds integrations. Does not harden the client layer for production use.
Support Engineer
Answers tickets. Triages bugs. Does not build reusable tooling that eliminates the tickets.

These roles matter. But none of them close the gap between what the vendor ships and what production requires.


What the API User Advocate IS

The API User Advocate is someone who:

  • Builds a hardened client layer between the vendor API and the developer
  • Holds dual expertise: deep knowledge of the vendor’s platform AND production software engineering
  • Translates vendor-centric APIs into developer-friendly interfaces

The output is not documentation. It is not a demo app. It is infrastructure: a layer that absorbs the API’s operational complexity so that every downstream developer does not have to.


The Advocacy Layer

Your ApplicationBusiness logic, UI, workflowsAdvocacy LayerRetry LogicExponential backoffRate Limit HandlingQuota tracking, queuingAuth ManagementToken refresh, race preventionFailure ClassificationActionable error codesBulk OrchestrationConcurrency, progressError TranslationVendor codes to human messagesVendor’s Raw APIHTTP endpoints, SDK, documentation

Without the advocacy layer, every developer team builds ad-hoc solutions for the same problems. With it, the hard problems are solved once.


What the Advocacy Layer Handles

Problem
Vendor’s API
Advocacy Layer
Auth token expires mid-operation
401 error, operation fails
Auto-refresh, race condition prevention
Rate limit hit
429 with unclear retry-after
Intelligent backoff, request queuing
Bulk operation needed
N individual API calls
Concurrent workers with progress tracking
Cryptic error response
Internal error code, no context
Failure classification, actionable message
Large file upload
Single POST, fails over 100 MB
Chunked upload, resumable, retry per chunk
API version changes
Breaking change, no migration path
Abstraction layer absorbs changes

Every row in that table represents weeks of engineering time. Multiply by the number of teams integrating with the same vendor. That is the cost of the missing advocate.


Why This Role Barely Exists

The API User Advocate requires a rare combination of skills:

1. Dual expertise is uncommon. You need someone who understands the vendor’s platform deeply — its quirks, its undocumented behaviors, its operational limits — AND who can write production-grade infrastructure code. Domain experts rarely write systems code. Systems engineers rarely have domain depth.

2. Vendors do not fund it. Vendor engineering teams optimize for their own operations: uptime, throughput, feature launches. The developer’s experience of consuming the API is a secondary concern, addressed by documentation and DevRel, not by code.

3. Consultancies do not build it. System integrators bill for custom work. Building a reusable client layer that eliminates future billable hours is not in their interest.

4. Open source does not sustain it. API-specific tooling has a narrow audience. A Rust library for retrying Autodesk API calls will never achieve the star count needed to attract sustained open source contribution. The economics do not work.

5. The gap persists. And so every team, in every company, in every industry, builds the same retry logic, the same token refresh, the same error handling — from scratch.

“The best code is the code you do not have to write. The second best is code someone wrote once, correctly, so you never have to think about it again.”

That is what the advocacy layer provides.

RAPS as Proof of Concept

We built this. Not as a thought experiment — as a shipping product.

1
Advocacy Core (raps-kernel)
11
Consuming Components
230+
CLI Commands
114
MCP Tools

The architecture maps directly to the advocacy pattern:

  • raps-kernel is the advocacy core. It handles auth (2-legged, 3-legged, token caching, automatic refresh), HTTP (retry with exponential backoff, rate limit tracking, circuit breaker), and error classification (structured exit codes that distinguish auth failures from permission errors from network problems).

  • 11 components consume it — the CLI, cloud functions, Python bindings, 7 API-specific crates, and the admin module. None of them implement retry logic. None of them manage tokens. None of them handle rate limits. The kernel does.

  • 230+ CLI commands and 114 MCP tools are built on top of this layer. Every one of them inherits the same production-grade HTTP behavior without a single line of retry code.

The pattern works. And it is repeatable.


Beyond AEC: The Pattern Repeats

This is not an AEC problem. It is a vendor API problem. Everywhere you look, the same gap exists:

Shopify API
Rate limit hell across REST and GraphQL. Webhook delivery that silently fails. Bulk operations that require polling and lack progress feedback.
Amazon SP-API
Auth that requires rotating refresh tokens across multiple marketplaces. Report generation that needs polling loops with unpredictable wait times. Throttling that varies by endpoint with no unified strategy.
Shopee Open Platform
Opaque error codes with no documentation. Undocumented rate limits that change without notice. Token management across shops that requires careful state coordination.
Stripe
Even the “good” APIs benefit from an advocacy layer: idempotency key management, webhook signature verification, automatic retry with backoff, and event deduplication.

Every vendor API with enough complexity eventually needs an advocate. The question is whether each consuming team builds that advocacy layer independently — or whether someone builds it once.


What Comes Next

This post names the pattern. The next post in this series shows how we built it: “How We Built a 230-Command Advocacy Layer in Rust” — covering the architecture of raps-kernel, the design decisions behind structured exit codes, and why Rust’s type system makes the advocacy pattern both safer and faster than the alternatives.

The API Advocacy Pattern — Series
Part 1: The evidence (forum data, pain points, real-world failures)
Part 2: The API User Advocate — naming the pattern (you are here)
Part 3: How we built a 230-command advocacy layer in Rust
Part 4: Measuring the impact — before and after metrics