API Abstraction is key to an API first strategy
January 7, 2021|
API abstraction provides a unique solution for large enterprises looking to scale their API efforts as part of an API first digital strategy. In this post we look at what abstraction is, why it’s needed, and the 6 key benefits of using abstracted APIs as your system of record and main API objects, rather than code.
Large enterprises have a gap in their API efforts: holding APIs as code is the causeAs a large enterprise trying to scale your API efforts as part of an API first digital strategy, you’re likely now at a stage where you need to:
- Open up your APIs to a wider audience – to be discovered and consumed by internal (e.g LoBs, product owners) and external (e.g. partners in your API ecosystem) stakeholders
- Manage, organize and group together thousands of APIs which encapsulate your business capabilities and IT functions, not just 10-100 open APIs
- Manage different types of APIs and versions for different technologies/runtime environments (e.g. business capability, internal IT, public/partner/3rd party APIs, but also REST, SOAP, events, emerging technologies)
- Store artifacts which are related to those APIs; such as lineage, mappings, conformance to data models, and security policies (and other common shared services)
Abstracting your APIs provides an unique solution and can be used to deliver all of the needs above, in supporting API first at scale.
Simply put, abstraction can take your APIs away from their complex code and implementation specifics, into a common metadata framework, to make them understandable by everyone in the enterprise in a standardized format.
What is API abstraction?
When working with abstraction, two objects are involved to ensure your APIs are usable by both business and technical users:
- A pure abstracted view of the API: This is what we call a Design. A code- and implementation-agnostic view which contains abstracted capabilities of what the API does/will do once realized. Designs are a representation of your business capabilities and technical functions.
- A semi-abstracted service representation of the Design: This is what we call a Specification. A technical view of your API which contains implementation-specific technical details e.g. methods with a de-coded payload structure and non-functional requirements. These are versioned, and importantly contain enough detail to be used to generate runtime artifacts off-of (API code, contract, configuration, and documentation), enabling you to get back to the code to actually run the APIs.
Benefits of using API abstraction for a successful API strategy
1. An extended audience for your APIsYour catalog of APIs and Services becomes understandable by an extended audience as the detail and business logic is not locked away in the code. Many more roles internally in your enterprise, as well as approved external users can discover, understand, and use your APIs and Services – all with a reliable consumer experience:
- Business users such as product owners
- Other technical users
- What APIs your organization already has
- How the APIs work
- Who owns the APIs
- What the upcoming API versions are
2. APIs can be reused to support new digital productsAs APIs are abstracted into a common framework and therefore standardized format, they can be easily combined together, and repurposed into what we call Product Bundles (which includes API products, composite APIs etc.). These bundles can be used to quickly build, test, and launch innovative new digital products using your existing capabilities.
The metadata in the abstracted APIs can be used directly to generate normalized and consistent code, contracts, configuration, and documentation; in formats that can be used and digested by different runtime systems e.g. API gateways or code repositories like an SCM configuration.
3. Normalized, consistent and well-governed API code and documentation
Alternatively, if only API documentation is needed, this can be generated in easy-to-read formats like word or excel.
Abstraction also allows your APIs to easily be aligned to an API governance model upstream in the API lifecycle.
With abstraction, the system of record for your APIs is the Design (pure abstraction) and Specification (service representation), rather than the runtime code. This means that the abstracted API can easily be redeployed, and pointed to a different downstream target, increasing responsiveness for your enterprise to the ever changing digital landscape, and preventing vendor lock-in.
4. Flexibility on alternative/future coding standards and formats
This flexibility also makes IT modernization efforts easier like legacy SOAP to REST or wrapping REST in GraphQL, and futureproofs your APIs for whatever technology or coding standard comes next.