<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[API Central - Medium]]></title>
        <description><![CDATA[Topics covering the management of business resource APIs, from strategy through to implementation. - Medium]]></description>
        <link>https://medium.com/api-center?source=rss----fdf1e8e629d7---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>API Central - Medium</title>
            <link>https://medium.com/api-center?source=rss----fdf1e8e629d7---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 10:51:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/api-center" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Data Platforms and APIs]]></title>
            <link>https://medium.com/api-center/data-platforms-and-apis-44a1a5ff5859?source=rss----fdf1e8e629d7---4</link>
            <guid isPermaLink="false">https://medium.com/p/44a1a5ff5859</guid>
            <category><![CDATA[api-strategy]]></category>
            <category><![CDATA[application-integration]]></category>
            <category><![CDATA[data-integration]]></category>
            <category><![CDATA[api-governance]]></category>
            <dc:creator><![CDATA[TRGoodwill]]></dc:creator>
            <pubDate>Wed, 02 Jul 2025 08:51:13 GMT</pubDate>
            <atom:updated>2025-07-04T11:23:48.316Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Integration</h3><p>Data Integration is the process of combining data from different sources into a meaningful, unified form or structure. This may be achieved using a variety mechanisms, with varying degrees of latency, from instantaneous, to near real-time, to batch.</p><p>Governed enterprise data integration capabilities simplify communication between applications — they can:</p><ul><li>Aid understanding of data provenance, ownership and life-cycle</li><li>Support effective security and governance controls</li><li>Provide visibility into data flows and aid impact analysis</li><li>Reduce development and computational effort for client solutions</li><li>Support a wide range of source systems, formats and applications</li></ul><p>An enterprise will typically enable and manage several internal and external integration pattens, and for the above reasons, API management has become a core capability in the data integration space.</p><p>Data Governance/Management/Intelligence Platforms have evolved in recent years to encompass integration capabilities, and are sometimes marketed as data integration platforms — so do they supersede APIs and API Management?</p><h3>API Management and Data Platform Capabilities and Use-Cases</h3><p>Enterprise API Management and Data Governance/Management/Intelligence Platforms will offer mutually supportive capabilities, each addressing a separate, closely related problem domain. Both capabilities secure and audit access to data and business processes and enable self-service.</p><h4>Application vs Data Integration</h4><p>Each capability offers integration services, however while some use-cases will overlap, the context and primary use-cases are different:</p><ul><li>Data platforms primarily manage data sharing &amp; integration for analytical purposes, where the <strong><em>temporal profile of data</em></strong> (“when” something happened) is important and/or where data currency or timeliness is not paramount.</li><li>Enterprise API Management facilitates low-latency real-time application integration primarily concerned with interacting with the <strong><em>current state of a business resource </em></strong>and with lifecycle workflows. API and Event management capabilities underpin secure, decoupled Microservices Architectures.</li></ul><h4>API vs Data Catalog</h4><p>Each maintains a catalog/marketplace, however the target audience is not the same:</p><ul><li>the core clientele of a <strong>data platform catalog / marketplace</strong> are end-users of the data: data scientists or data managers,</li><li>the clientele of an <strong>enterprise API catalog</strong> are application developers building the applications that will enable end-users.</li></ul><h3>Data Platforms, Latency and Currency</h3><p>The data cataloged and exposed by data platforms to business users is typically processed by data pipelines through several stages.</p><ul><li>Data may be pushed to a landing zone periodically in batches, be transferred as files, or be streamed as entire records or granular delta events.</li><li>Raw data will typically be processed to filter, validate, clean and structure the data into a canonical form.</li><li>A further process will then be employed to shape the data into curated, de-normalized and read-optimized models for consumption by analytical business users and applications (typically via APIs).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*OBi1t0KmZ8hVdaoA5d7aSg.png" /></figure><p>This process prioritises data quality, lineage and governance over currency and “freshness”. The many additional layers can add significant latency between a real-world business event and the representation of the data on the consumer side of the platform.</p><h3>API Gateways and Real-Time Business APIs</h3><p>When client applications connect to real-time business APIs, it is usually be because they are working interactively with a business resources, lifecycles and workflows. Not only do they need the most current, up-to-date representation of resource data, but they may also exchange data with the business service, effecting changes to business resources in real-time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*9CtSSeCMl6Tjxo2-IC9v3w.png" /></figure><p>API Gateways are specifically designed to secure and manage API integration between systems with minimal latency.</p><h3>Data Platform APIs Themselves Need to be Managed</h3><p>APIs are a critical component of a data platform. Some APIs will be internal to the platform, other APIs will be directly consumed by data scientists and business users. These user-facing data APIs may evolve significantly and be repackaged in a number of esoteric ways over time. Secure data-sharing protocols may also involve temporary, dynamically generated APIs — these data sharing APIs are typically managed by the data platform without deployment to an enterprise gateway. APIs meant to be consumed by data scientists and business users will appear in a user-facing data catalog / marketplace designed for the use-case.</p><p>However some Data Platform APIs will be stable, reusable by and valuable to existing and future enterprise applications. The data platform should make these APIs available to both internal and external application developers via an Enterprise API Management platform. For these types of API, enterprise API Gateways can take care of cross-cutting concerns such as security, governance and visibility, while the API Developer Portal provides a single catalog of APIs to support self-service API discovery by client application developers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*M-MqUkRwlJZJ9LBpOdos7w.png" /></figure><h3>Summary</h3><p>A number of Data Platforms offer integration services and data catalogs featuring APIs, and this may lead some to the misconception that Data Platforms are a replacement for API Management. However, the core use-cases and primary audience of API and data management platform are not the same.</p><p>Data platforms primarily serve temporal, analytical use-cases and prioritise data quality at some cost to data currency, whereas API management platforms primarily serve real-time business application integration use-cases and prioritise currency and low-latency.<br>The primary audience of a data platform catalog/marketplace is analytical and business users, while the primary audience of an enterprise API catalog are the developers of business applications and services.</p><p>There are overlapping use cases, and data platforms may offer stable, reusable APIs of value to business applications. These APIs should be published to the enterprise API catalog for discovery by application developers, and managed by enterprise API gateways for consistent API policy governance, security and visibility.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44a1a5ff5859" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-center/data-platforms-and-apis-44a1a5ff5859">Data Platforms and APIs</a> was originally published in <a href="https://medium.com/api-center">API Central</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MCP, AI Agents and APIs]]></title>
            <link>https://medium.com/api-center/mcp-ai-agents-and-apis-7d4b3052084a?source=rss----fdf1e8e629d7---4</link>
            <guid isPermaLink="false">https://medium.com/p/7d4b3052084a</guid>
            <category><![CDATA[arazzo]]></category>
            <category><![CDATA[mcp-and-apis]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[api-strategy]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[TRGoodwill]]></dc:creator>
            <pubDate>Thu, 17 Apr 2025 06:45:28 GMT</pubDate>
            <atom:updated>2025-06-02T10:12:28.261Z</atom:updated>
            <content:encoded><![CDATA[<h4>Enterprise APIs are about to get busier — and they need to lift their game.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0qFa7gbuxxOC_M0qltCPg.png" /></figure><p>It has been suggested here and there by those on the periphery of the AI juggernaut that the rise of AI agents, and the Model Context Protocol (MCP) in particular, is the beginning of the end for APIs. In fact nothing could be further from the truth — AI Agents and MCP services will multiply API consumption and drive demand for well-modelled, well governed APIs.</p><p><strong><em>Note:</em></strong><em> This summary of observations is derived largely from material in the “Interesting References” section below.</em></p><h3>AI Agents need Access to Real-Time APIs</h3><p>In order for AI agents to interact with business processes and data in real-time, and to access large volumes of business data fast, they need access to low-latency APIs.</p><p>At this stage, most business systems will expose APIs to applications within their organisation, however these are frequently poorly documented and poorly modelled, leading to APIs that are hard to comprehend, slow to respond, and not very composable. Enterprise APIs must evolve, or they will be bypassed — to the detriment of all stakeholders.</p><p>On the other hand, AI Agents coupled with well modelled, composable APIs can simplify integration, optimise workflows &amp; response times, and provide rapid feedback loops to inform the shape of read models and composite APIs. APIs allow agents to take advantage of the additional layers of security, governance, documentation and observability that API management platforms provide, which will become critical in assessing and controlling the impact and cost of AI-driven systems.</p><h3>Model Context Protocol (MCP)</h3><p>The Model Context Protocol (MCP) is an emerging standard protocol designed connect AI systems with external systems and data sources. The MCP allows AI agents to share common tools and interact with them in a standardised way, irrespective of the underlying framework/interface — for example, a filesystem, database or API(s).</p><p>In order to make APIs intelligible to LLMs or agents, one might write a specific integration for each consuming agent for each required API. That adds considerable complexity and development overhead to each new model or agent. Alternatively we can wrap APIs in a way that makes them interoperable with any LLM/agent. This is the MCP approach.</p><p>When an API is exposed via an MCP server, the consumer (which could be an agent or a human prompt) can just ask questions in natural (human) language. MCP servers are essentially a natural language adapter reducing friction on the consumption side, enabling rapid experimentation, rollout and evolution of AI-infused solutions, which in turn drives API usage on the producer side.</p><h3>Arazzo and MCP / Agentic API Consumption</h3><p>It will become crucially important to create documentation that can be not only easily consumed by developers, but also by Agents and MCP servers. Tools to generate API-facing MCPs or agents from OpenAPI specifications are already available, and Arazzo-based MCP/Agent generators for complex API workflows will soon follow. Some in the industry propose that with improved API documentation enriched with domain and workflow semantics, properly tooled agents and/or MCP servers will automatically discover and connect to APIs they need to fulfil user requests.</p><p><a href="https://confluence.intranet.db.com/display/DBAPIT/OAI+Arazzo+Specification"><strong>The Arazzo Specification</strong></a> is an open specification within the <a href="https://www.openapis.org/">OpenAPI Initiative</a> and works in conjunction with OpenAPI to provide a deterministic API workflow layer, making MCP and Agentic API discovery possible, and consumption more efficient. Arazzo describes how systems, such as MCP servers and agents, should interact with APIs in a structured, machine-readable way — adding an “agent experience” (AX) dimension to the documentation layer. It allows API providers to deliver workflows that are accessible to and interoperable across various agent or MCP technology stacks. Providers can define use-case-oriented consumption semantics across multiple API operations, encompassing either a single OpenAPI document or multiple independent OpenAPI documents.</p><p>Additionally, Arazzo’s extensibility allows for the inclusion of usage-based or SLA-based metadata, which can be enforced by API gateways and governed at the observability layer to ensure predictable scale, cost management, and audit of MCP/AI-agent use of APIs which will become increasingly important as organisations seek to understand the total cost of ownership (TCO) of new AI-infused workflows.</p><h3>Enterprise APIs: Impact and Side Effects</h3><h4>Increase in API calls</h4><p>Usually, a single action by the user corresponds to a single API call. By comparison, AI agents have no limit on the number of calls they can make on the basis of a single user request. Agents will continue to iterate, making any number of calls until it has satisfied the user’s request.</p><h4>Ultra-low latency APIs</h4><p>Time to First Token (TTFT) is a performance metric that measures how quickly an LLM starts producing output after receiving a user query. It includes a number of factors including network and API latency. TTFT can consume a significant portion of the total latency, impacting the responsiveness of applications. Low TTFT is critical for real-time interactions, and low latency, composable APIs will be a crucial factor in bringing down TTFT.</p><h4>Tighter API Data Model Governance</h4><p>Stronger governance will be required over data models exposed to MCP services and agents, including classification of data, semantic context, lineage, limitation and minimisation. Use-case specific read models may be required in some cases. AI friendly model qualities such as composability should be considered at design-time. A governed <a href="https://medium.com/api-center/api-design-practice-7fce69e6336c">API design practice</a> will allow timely engagement with, and oversight by enterprise stakeholders.</p><h4>Granular Access Scopes</h4><p>Authentication patterns will change. Agents and MCPs may work while the user is offline, and the number of agents/MCPs requesting access to APIs on behalf of a user will scale out and up dynamically. Unconstrained impersonation or delegation authorized at an API level creates excessive security exposure — agents/MCPs might instead be granted temporary, finely grained access scoped specifically for each task. Expect IDPs to actively constrain <a href="https://medium.com/api-center/protecting-resource-apis-with-api-scopes-4f0e819763d7">OAuth token audience and scopes</a> based on the authorization context, and audience and scope claims to be rigorously enforced (per OAuth 2.1).</p><h4>High Quality, Highly Deterministic API Documentation</h4><p>Well governed, high quality, RESTful API documentation — potentially “certified” for AI use-cases — will accelerate integration. AI-ready OpenAPI documentation would capture semantic context and data classification with standardised metadata, and define use-case <a href="https://medium.com/api-center/protecting-resource-apis-with-api-scopes-4f0e819763d7">specific API access scopes</a> at an operation level. Arazzo will gain traction as a way to express API workflows and dependencies for discovery and consumption by AI tools.</p><h3>Interesting References</h3><p><a href="https://thenewstack.io/mcp-the-missing-link-between-ai-agents-and-apis/">MCP: The Missing Link Between AI Agents and APIs — The New Stack</a></p><p><a href="https://thenewstack.io/its-time-to-start-preparing-apis-for-the-ai-agent-era/">It’s Time To Start Preparing APIs for the AI Agent Era — The New Stack</a></p><p><a href="https://urldefense.com/v3/__https://www.linkedin.com/pulse/mcp-new-api-how-model-context-protocol-changing-way-apps-devarasetti-vhzmc/?utm_source=newsletter.ikenna.co.uk&amp;utm_medium=referral&amp;utm_campaign=issue-36__;!!KEc8uF_xo8-al5zF!QYqnatl0fLSIqzjGErw-8iftZ2-KcygXHjT9RVTBopQVYGocc5wAQdLdYrwJKLjmaCNL5B_QqkTfowfvxFw89fA$">Is MCP the New API? How Model Context Protocol Is Changing the Way Banking Apps Talk to Data</a></p><p><a href="https://urldefense.com/v3/__https://medium.com/@nimritakoul01/the-model-context-protocol-mcp-a-complete-tutorial-a3abe8a7f4ef?utm_source=newsletter.ikenna.co.uk&amp;utm_medium=referral&amp;utm_campaign=issue-36__;!!KEc8uF_xo8-al5zF!QYqnatl0fLSIqzjGErw-8iftZ2-KcygXHjT9RVTBopQVYGocc5wAQdLdYrwJKLjmaCNL5B_QqkTfowfvloZGsLI$">The Model Context Protocol (MCP) — A Complete Tutorial</a></p><p><a href="https://urldefense.com/v3/__https://curity.io/blog/is-your-api-ready-for-the-ai-agents/?utm_source=newsletter.ikenna.co.uk&amp;utm_medium=referral&amp;utm_campaign=issue-36__;!!KEc8uF_xo8-al5zF!QYqnatl0fLSIqzjGErw-8iftZ2-KcygXHjT9RVTBopQVYGocc5wAQdLdYrwJKLjmaCNL5B_QqkTfowfv3pmLMyI$">Is Your API Ready for the AI Agents?</a></p><p><a href="https://urldefense.com/v3/__https://www.digitalml.com/agentic-ai-and-apis-powering-enterprise-innovation/?utm_source=newsletter.ikenna.co.uk&amp;utm_medium=referral&amp;utm_campaign=issue-36__;!!KEc8uF_xo8-al5zF!QYqnatl0fLSIqzjGErw-8iftZ2-KcygXHjT9RVTBopQVYGocc5wAQdLdYrwJKLjmaCNL5B_QqkTfowfvInTm9_0$">How Agentic AI and APIs Are Powering the Next Wave of Enterprise Innovation</a></p><p><a href="https://www.openapis.org/arazzo">https://www.openapis.org/arazzo</a></p><p><a href="https://thenewstack.io/the-rise-of-ai-agents-how-arazzo-is-defining-the-future-of-api-workflows/">The Rise of AI Agents: How Arazzo Is Defining the Future of API Workflows — The New Stack</a></p><p><a href="https://www.speakeasy.com/docs/speakeasy-reference/cli/lint/arazzo">arazzo (speakeasy.com)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d4b3052084a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-center/mcp-ai-agents-and-apis-7d4b3052084a">MCP, AI Agents and APIs</a> was originally published in <a href="https://medium.com/api-center">API Central</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Governance]]></title>
            <link>https://medium.com/api-center/api-governance-3be87aab17b4?source=rss----fdf1e8e629d7---4</link>
            <guid isPermaLink="false">https://medium.com/p/3be87aab17b4</guid>
            <category><![CDATA[api-strategy]]></category>
            <category><![CDATA[api-governance]]></category>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[api-security]]></category>
            <dc:creator><![CDATA[TRGoodwill]]></dc:creator>
            <pubDate>Sun, 23 Mar 2025 18:40:24 GMT</pubDate>
            <atom:updated>2025-04-08T09:19:49.718Z</atom:updated>
            <content:encoded><![CDATA[<h4>Principles for Effective Enterprise API Governance</h4><p><strong>Robust API governance</strong> is at the heart of any successful API program, however it is a HUGE topic with enormous scope that is typically underestimated and under-resourced in large organisations. Whether you are starting from scratch, or trying to improve the status quo, API governance will be built up iteratively over time — this article briefly discusses some of the many facets of API governance to help you prioritise next steps.</p><p>This discussion will cover the following topics:</p><ul><li><strong>The API Governance Organisation</strong></li><li><strong>API Governance Foundations and Tactics</strong></li><li><strong>Strategic Governance</strong></li><li><strong>API Lifecycle Governance</strong></li><li><strong>Runtime Governance</strong></li></ul><h2>1 . The API Governance Organisation</h2><p>A key feature of a mature API governance framework is autonomous management of the API lifecycle by API product teams, under the guidance of business owners and domain architects.</p><p>Individual teams and business domains, however, operate within a broader organisational context and will be expected to align with broader API program goals and constraints. A federated governance structure is required to enable domain autonomy with ‘just enough’ governance to ensure the ongoing success of the enterprise API platform and program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*k1f5XGXLtZaY5udM6K8dqw.png" /></figure><p>The API governance organisation will be responsible for the operating model: building and incrementally maturing platform operational capabilities, the API program and the developer community.</p><h4>Operational Capabilities</h4><p>Operational capabilities managed by a centralised API competency may cover the following:</p><ul><li><strong>API Strategy and Governance.</strong> Including API strategy, roadmap, interoperability framework, security governance framework, technical-governance strategies. Facilitating business and technology collaboration, prioritising resources &amp; investment. Governing the API Program, API Products, API portal and API platforms.</li><li><strong>API Platform Management.</strong> Responsibility for the API Platform Architecture &amp; Roadmap, platform operating procedures, SLAs, continuous improvement, infrastructure-as-code, security platform integration, policy-as-code controls and self-service policy options in alignment with enterprise patterns.</li><li><strong>API Product Delivery.</strong> Establishing reference architecture, standards, patterns, protocols and exemplars. API consultancy services, governing API design practice, API validation and curation of the API catalog. Facilitating self-service deployment, observability and support of APIs by product teams. Facilitating API Release Governance.</li><li><strong>API Consumer Engagement</strong>. Providing self-service single-pane-of-glass onboarding, discovery and subscription. Facilitating early and continuous client engagement. Promoting API Products to consumer communities via API product announcements, marketing and events. Encouraging and facilitating direct client feedback, engagement and support via self-service channels.</li></ul><h4>Distribution of Responsibilities</h4><p>The distribution of design, development and governance functions will vary depending on program maturity, and the model should be expected to evolve over time toward decentralisation, autonomy and self-service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*p4RYJ_HTCugMPBmVnLoflQ.png" /></figure><h2>2 . Governance Foundations</h2><p>API governance rests on a foundation of policies, processes, patterns and tooling. This is the “what” and “how” of API governance, and a significant amount of focus and engagement will go into establishing these foundations.</p><p>‘Minimum-viable-governance’ is a term sometimes used to describe a governance tactic that seeks to apply just-enough governance at just the right time with as little friction as possible. MVG is typically guided and enforced by collaborative tooling, automation and policy-as-code to ensure minimal blocking touchpoints. In order to achieve this, a governance framework that spans all facets of API design, implementation, security, release, operation and retirement is required.</p><h3>2.1 API Quality Foundations</h3><h4>API Design Standards, Patterns and Blueprints</h4><p><a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7">API Design Standards</a>, Patterns and Blueprints improve the consistency, stability, generality and usability of business resource APIs. Robust quality standards are key to self-service API discovery and re-use.</p><p>Standards should cover (at least):</p><ul><li>API Lifecycle Model</li><li>Version management</li><li>Naming, path and payload conventions</li><li>Error handling &amp; standard response types</li><li>IAM authorization blueprints (OAuth2/OIDC)</li><li>Documentation &amp; validation rules</li><li>Testing practices</li></ul><p>In some organisations enterprise governance is applied to domain data models (and by extension, API schema)—governance &amp; engagement requirements should be clearly reflected in API design &amp; development guidelines and governance processes.</p><p>Give your standards room to evolve along with the API maturity of your organisation — start with focussed and achievable API quality goals. Standards or rules defined as mandatory must imply consequences (such as blocked deployment) for non-compliance, and even failure to meet non-mandatory standards would ideally be followed up by an API quality team. Consider whether your team has the time and tools to follow up with API dev teams when a particular standard or principle is contravened.</p><p>Enterprise API standards (particularly those invoking <a href="https://www.rfc-editor.org/rfc/rfc2119">RFC 2119</a> MUST/SHOULD keywords) should be captured and enforced by an OpenAPI linting (validation) ruleset. The <a href="https://github.com/stoplightio/spectral/blob/develop/docs/reference/openapi-rules.md">Spectral OpenAPI ruleset</a> is supported by the open-source <a href="https://stoplight.io/open-source/spectral">Spectral</a> and <a href="https://github.com/daveshanley/vacuum">Vacuum</a> OpenAPI document linters, and may be easily modified or extended to provide automated API document quality governance in alignment with <a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7"><em>API design guidance</em></a>.</p><p>Engaging widely with developers and enterprise stakeholders when developing standards will ensure buy-in and raise awareness — both are extremely important. In a “federated” environment, such as a partner network, API standards may be collaboratively managed in a public/shared repository such as GitHub (consider Pages and Workflows features).</p><h3>2.2 API Security Foundations</h3><p>There will be a number of stakeholders invested in API security in a large organization.</p><p>Enterprise IAM teams will have published endorsed security patterns covering user and service authentication and authorization, including OAuth2 &amp; OIDC, in different contexts (hybrid cloud, internal\external).</p><p>Policies and controls will be defined by an enterprise Information Rights Management (IRM) governing body to govern data managed by a business service, covering security classification, integrity and confidentiality, storage/persistence, limitation and minimisation, and data sovereignty.</p><p>API security policies may have been already established within your organisation — whether this is the case or not, seek to actively participate in ongoing development and evolution of enterprise API security policies and the mandate behind them. There should be transparent traceability &amp; mapping of API security controls to enterprise security policies. Controls should be codified and applied by policy-as-code where possible, and periodically audited with configuration scanning and penetration testing.</p><h4>Secure By Design</h4><p>Security must be addressed at each and every phase of the API Lifecycle. An API security governance framework must must clearly articulate requirements and responsibilities at each stage of the API Lifecycle, and use a variety of levers to ensure compliance. For example:</p><ul><li>Data is classified and information-rights-management (IRM) / regulatory controls identified during the design and modelling phase</li><li>API development guidelines outline controls, patterns and tactics to be employed by developers to secure APIs</li><li>API specification linting and policy policy-as-code validation is embedded into design tools and applied by CICD pipelines</li><li>Enforced API policy-as-code and runtime gateway controls are directly traceable to enterprise IRM/security/regulatory controls and are actively maintained.</li><li>API testing incorporates OWASP API vulnerability testing as well as targeted testing against applicable enterprise security controls</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*q8X0lrw1UWBiXIc9BcIUrg.png" /></figure><p>Security-focused enterprise controls, a process of security by design, and a commitment to security testing are crucial to underpinning robust API security.</p><h3>2.3 Technology Foundations</h3><p>An API Management Framework covers the collection of components that together enable management of APIs by autonomous teams within well-defined guardrails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T2GIkiLvUeUAti5L0Dk_-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7HN02xlVKJguYpnmfpwNPw.png" /></figure><h4><strong>API Management Platform</strong></h4><ul><li><strong>Developer Portal Service</strong>: provides client developers a single point-of-entry for API discovery, self-registration of the client application, API key and credential management, self-subscription to APIs and client-side analytics. Portal services provide a means for client developers to engage with API product teams and vice-versa.</li><li><strong>API Management Service</strong>: facilitates the publishing of APIs, supports API lifecycle management (including versioning and deprecation) and manages API subscription and approval workflows. The API Management platform will manage APIs deployed to an API Gateway, and expose its own APIs for CICD integration.</li><li><strong>API Gateways</strong>: implement API policy and proxy connections to the business APIs behind the gateway. Provides resilience, security and visibility, including threat protection, authentication &amp; authorization, payload validation, rate-limiting, caching, logging and audit.</li></ul><h4><strong>Devops, Testing and Release Management</strong></h4><ul><li><strong>API DevOps framework</strong>: provides code-first API configuration management, facilitating a domain autonomous approach to DevOps via a team’s own pipelines. Templated API Gateway configuration, such as API security schemes and rate limiting, may be applied. API specifications may be linted to enforce compliance with standards.</li></ul><h4><strong>API Security, IAM, Analytics, Cyber Security</strong></h4><ul><li><strong>Analytics Service</strong>: provides monitoring and operational insights such as usage patterns and trends and performance metrics such as latency and error rates. Dashboards support self-service by client, provider, platform and enterprise users.</li><li><strong>Observability platform</strong> integration with automation tools, intelligent systems and IT Service Management (ITSM) platforms enhance timely identification, resolution and escalation of issues.</li><li><strong>IAM</strong>: Close integration with enterprise Identity and Access Management (IAM) platforms is a key component of API security architecture. Trusted IAM/IDP service (and JWKS caching) configurations are added to API gateways, and a ‘single-pane-of-glass’ client registration process initiated from the API developer portal synchronises client Ids &amp; profiles across IAM and API management platforms (‘DCR’ rfc 7591).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xBJMSF6WOKMPhe3THoxKkQ.png" /></figure><ul><li><strong>Audit &amp; SIEM</strong>: Audit logs and run-time API authorization failures should be logged to a Security Information and Event Management (SIEM) platform where incidents and patterns can be analysed and appropriately actioned.</li></ul><h2>3. Strategic Governance</h2><p>A core responsibility of the API governance program is the realisation of the over-arching API strategy and roadmap.</p><p><strong>Strategic governance</strong> is enterprise-driven — it sets the conditions for API success and lays the foundation for a rich catalog of coherent, composable API products. The business objectives of the API program will be heavily predicated on enabling client business domains to meet theirs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/435/1*t6Mc8GrVggBh4i_D3SkH2Q.png" /></figure><p><strong>Along with building up the API program</strong>, communities and catalogs, strategic governance covers the evolution of the enterprise API framework — including; platforms, automation &amp; integrations; workflows &amp; user-journeys; analytics &amp; reporting; policies, standards &amp; blueprints.</p><h3>3.1 Discovery, Planning and Prioritisation</h3><p>A culture of self-service and re-use can ONLY evolve when developers have unfettered access to an API catalog of reusable, coherent and <a href="https://medium.com/api-center/api-design-pattern-for-business-resource-apis-6f25afd2b2df">composable APIs</a>, covering a critical mass of core business capabilities.</p><p>Particularly in the earlier stages of an API program, strategic governance will guide discovery and prioritisation of enterprise APIs with the aim of building up the catalog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*tHLssWBu_niTwel050yAeA.png" /></figure><p><strong>Discovery and demand generation </strong>is outside of the API lifecycle, however it is the setup and the initial entry point. The API catalog captures the organisational taxonomy and the API program will work closely with allied business leaders to help bring core business capabilities into the ecosystem. Once onboarded and published, business domains take ownership of this topic, with support from the API program as required.</p><p><strong>Planning and Prioritisation</strong> of API management roadmap features (including platforms, workflows, automation, standards &amp; patterns) on the journey toward frictionless self-service are prioritised in accordance with demand, evolving organisational objectives and emerging enterprise, security and regulatory requirements</p><p><strong>Organisational objectives</strong> captured by an enterprise-level process of Management by Objectives, such as OKR (objectives and key results) or a program level Epic Kanban, will ensure commitments are traceable, and priorities are in alignment with strategic goals.</p><p><strong><em>Key stakeholders will include: </em></strong><em>Enterprise Technology Architects, Enterprise Security Architects, Domain Solution Architects, Program Managers, Product Owners</em></p><h3>3.2 API Ecosystems and Community Engagement</h3><p><strong>Community and Catalog management</strong> are at the heart of an API ecosystem and a key determinant of API program success. Communities must be actively engaged (regular announcements, events, training), and a catalog of high quality, composable API products must be iteratively built up.</p><p>An organisation may manage multiple API ecosystems encompassing Internal, partner and public API communities. APIs published for consumption by these communities are discovered via separate catalogs and are typically hosted on separate gateways. Governance policies will need to be tailored to each ecosystem in respect to different levels of risk, data sharing mandates, documentation requirements and client and user identity assurance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*nWQLeZe6OenwZBkpeMPcFg.png" /></figure><h4><strong>Internal API Catalog &amp; Community</strong></h4><p>The Internal API catalog is aimed at developers of internal applications consuming enterprise APIs. Client developer portals and published APIs are available from enterprise-controlled networks, potentially spanning multiple sites, cloud providers and regions.</p><h4><strong>External API Catalog &amp; Community</strong></h4><p>The External API catalog is exposed to public (‘citizen’) and external institutional application developers. APIs modelled for external consumers are purposefully abstracted to prevent over-exposure of data and business models.</p><h4><strong>Partner API Catalog(s) &amp; Community</strong></h4><p>A third ‘trusted partner’ category may encompass more than one catalog — a trusted partner community is typically defined by a community of OIDC/SAML federated trust, or a trusted network.</p><h2>4. API Lifecycle Governance</h2><p><strong>API Lifecycle Governance</strong> covers distinct <strong>Design, Build &amp; Release and Runtime</strong> lifecycle phases, and is focused on facilitating self-service API lifecycle management by decoupled and autonomous business domains.</p><p>Lifecycle governance policies and stage-gates are maintained by enterprise stakeholders, and imposed with a minimum of blocking touch-points with the assistance of collaborative tooling, CI/CD automation, policy-as-code and OpenAPI document linting. API governance policies and enforcement points must be clearly articulated to product teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*MfhbfRnPVat3h4RxUjtQcg.png" /></figure><h3>4.1 Design Governance</h3><p>Enterprise API Design Standards inform the API Design Phase, and ideally API developers will be familiar with design guidelines before an API is designed and developed. However, the maturity and API literacy of development teams will vary and API design, security and quality governance is essential.</p><p>An enterprise-guided, domain-oriented API Design Practice will provide opportunity for meaningful and timely input from business and enterprise stakeholders, and improve the security, quality and value of the APIs in your API catalog.</p><h4>API Design Practice</h4><p>The quality of the data / REST model has significant impact on the usability, evolvabilty and security of an API. An <a href="https://medium.com/api-center/api-design-practice-7fce69e6336c">API Design Practice</a> will cover design strategies, methodologies and tools to maximise stakeholder collaboration and feedback and ensure compliance with organisational standards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*JiPZBs1b7kGEU-xMg7r27g.png" /></figure><p>Aspects of a design practice might, for example, include:</p><ul><li>Identification of enterprise stakeholders and applicable processes</li><li>Guidance and tools for hosting collaborative domain-oriented design workshops such as <a href="https://openpracticelibrary.com/practice/event-storming/">Event Storming</a> as a forum for<strong> </strong>discovery and validation of models</li><li>REST modelling guidance including references to specific enterprise guidance on concerns such as data lineage, classification, purpose limitation and data minimisation</li><li>Collaborative tooling to allow a diverse group of stakeholders to interact with and contribute to the development of the REST model and API specification, and API specification linting tools/plugins to provide early feedback on conformance to enterprise API standards.</li></ul><p><strong><em>Key Stakeholders will include: </em></strong><em>Business owner (domain expert), Domain architect, Security architect, Enterprise Data Architect, REST SME, Tech lead / API Developers.</em></p><h3>4.2 Build &amp; Release Governance</h3><h4>Build &amp; Release Guidance</h4><p><strong>An API Developer Playbook</strong> aligned to the API Lifecycle Management model provides concrete, step-wise guidance to developers on how to build and deliver high quality, secure APIs that will make a valuable contribution to the API catalog and ecosystem. The API Developer Playbook is closely tailored to a specific enterprise environment, referencing approved and supported enterprise processes, tools, policies and standards.</p><p>The playbook should cover the entire API lifecycle — team and API onboarding, API design &amp; development, API testing, publishing &amp; release management, support, evolution and versioning, deprecation and retirement.</p><h4>Deployment Automation</h4><p><strong>Code-first CI/CD automation</strong> can apply Policy-as-Code controls, enforce mandatory standards with specification document linting, and validate security configurations.</p><p>Pipeline deployment and regression testing validates security, function and performance. Testing, client engagement and analytics inform an evaluation of the API resulting in either promotion or rework. The API may loop through several test environments and evaluation checkpoints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yVpgZuiQjR57ZynJOqoMeA.png" /></figure><p><strong><em>Key stakeholders will include:</em></strong><em> Business Owners, Release Management, Configuration Management, DevOps Community, Testing Community.</em></p><h4>Release Governance</h4><p><strong>Access to a sandpit/dev environment</strong> should present a low barrier to both API publishers and API consumers, allowing teams to experiment rapidly.</p><p><strong>Onboarding an autonomous CI-CD pipeline</strong> will require tighter governance and accountability. API delivery pipelines are white-listed for promotion through to production, and in order to be white-listed, pipelines must be onboarded and certified, perhaps by release management and/or CI/CD services. Full test coverage is expected. Support is provided by Testing ands DevOps competencies/communities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/94/1*HPVbKhidZkdJCC6V0tEVZQ.png" /></figure><p>The approval of the product owner and/or Release Management may be required before scheduling a release to production.</p><h4>Managing New API Versions</h4><p><a href="https://semver.org/"><strong>Semantic versioning</strong></a><strong> </strong>should be applied to OpenAPI documents, and captured in the <strong>info.version</strong> field. The following rules apply:</p><p>{MAJOR}.{MINOR}.{PATCH}</p><ul><li><strong>MAJOR</strong> version when <strong><em>incompatible</em></strong><em> </em>or <strong><em>breaking</em></strong><em> </em>API changes are made,</li><li><strong>MINOR</strong> version when functionality is added in a <strong><em>backwards-compatible</em></strong> manner, and</li><li><strong>PATCH</strong> version when backwards-compatible bug fixes are made.</li></ul><p>Patch and minor version updates may be safely republished without adversely affecting existing consumers (although consumers should be notified when functionality is added), while I<strong><em>ntroducing a new major API version will impact all consumers</em></strong>. Before deciding to introduce a new major version, API owners should <strong><em>explore all possible alternatives</em></strong>.</p><p>The following rules apply to the introduction of a new, breaking version of an API:</p><ol><li><strong>Justify, Document and Socialise.</strong></li></ol><p>A decision to introduce a new major version should be documented as an Architecture Decision and teams should ensure that the potential impacts are discussed in agile planning forums, and impacted parties informed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*IsfiV21j5NWiWBym1DH5Mg.png" /></figure><p><strong>2. Decouple Cut-over.</strong></p><p>The newly deployed version is effectively a new API, and consumers must subscribe to the new API version in order to use it. With each new major version of the API, older versions should be deprecated and maintained for a period to allow existing clients adequate time to cut over to the new version. New clients are not able to subscribe to a deprecated API. A retirement schedule should be communicated to currently subscribed clients.</p><p><strong>3. Communicate a Retirement Schedule.</strong></p><p>Once existing clients have cut-over to the new version, and/or the scheduled retirement date arrives, the API is retired, and will no longer be available. Clearly defined, well governed and automated processes should be in place to deprecate and retire APIs. <strong>API deprecation and client notification</strong> is supported by most API Management platforms.</p><h2>5. Runtime Governance</h2><p><strong>Runtime governance</strong> is driven by the foundational policies and controls captured by the governance organisation. It is facilitated by the API Management platform team in close consultation with enterprise stakeholders.</p><h4>Runtime Policies/Controls</h4><p>Some initial disambiguation is necessary here. Architecturally speaking:</p><ul><li><strong><em>Policies</em></strong> are a statement of strategic intent and are defined by an enterprise security, data and/or legal authority.</li><li><strong><em>Controls</em></strong> define the application of a policy or policies, and are typically directly traceable to specific information security &amp; regulatory policies.</li></ul><p><strong>However</strong>… the mechanism with which API Gateways implement controls is commonly called a “gateway <em>policy</em>” or <em>“processing policy”</em>. Let’s keep in mind that in relation to enterprise policies and controls, a gateway policy is in fact a control implementation or enforcement point.</p><p><strong>Runtime controls</strong> are applied by the API Gateway and IAM platforms, and interactions captured by API monitoring, enterprise logging and SIEM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*sNZyEZ8xEbZaeCJdQSQ8tQ.png" /></figure><p><strong><em>Key stakeholders will include:</em></strong><em> Product Owner, API Platform Team, IAM/IT Security, Cyber Security, Enterprise Monitoring Services</em></p><p>A Published API is actively monitored and supported by the API provider. Client engagement is encouraged via the client portal.</p><h4><strong>API Gateway Policies</strong></h4><p>The API Platform team manages run-time gateway policies that implement security controls and monitor enforcement. Mandatory policies might include enforcing HTTPS, JSON or XML threat protection, business schema validation and client application identification. Some policies, such as rate-limits may be optionally configured by API deployment configuration. Decisions will need to be made (and documented) as to which gateway policies will be applied by default (obligatory controls), how to handle exceptional cases, and which optional policies might be configurable by API owners via self-service workflows.</p><p>Standard API Gateway HTTP error responses should be defined for gateway policy error conditions. For example, where a rate limit is applied and exceeded, the API Gateway will return an HTTP status code of “429 Too Many Requests”, and unauthorized API calls are rejected with an HTTP “401 Unauthorized” status code.</p><h4><strong>Runtime API Authorization</strong></h4><p>Enterprise API Gateways must enforce documented OpenAPI security requirements and validate client API subscription. Depending on the gateway technology, additional steps may be required when deploying APIs to explicitly configure gateway policies to align with OpenAPI security schemes.</p><p>APIs may only be called by registered client applications who have subscribed to the API. A client subscription approval workflow should apply by default to APIs classified as sensitive. Clients of secured APIs are identified by an OAuth2 token client_id or OIDC azp claim.</p><p>Where defined, OAuth2/OIDC scopes of access are enforced at an operation (path &amp; method) granularity. OIDC tokens may be propagated to the backend with the request to enable API providers to authorize user-level access to individual records — however the pattern needs to be supported by your <a href="https://medium.com/api-center/securing-apis-with-an-integrated-security-framework-bf70569c8919">enterprise security framework</a>, so analyse carefully.</p><h4>Analytics, Audit and Reporting</h4><p>API management platforms provide centralised but narrow views of API health &amp; usage. Robust end-to-end observability can be achieved with <strong>Distributed tracing</strong>. Distributed trace logging (e.g. via the <a href="https://opentelemetry.io/docs/concepts/signals/traces/">Open Telemetr</a>y protocol) to an observability platform can provide:</p><ul><li>Traceable end-to-end visibility of the service context, data flows and dependencies.</li><li>Self-service to detailed incident data, ensuring decreased mean-time-to-resolution and reduced ticket misdirection.</li><li>The ability for internal API consumers to troubleshoot without requiring verbose and potentially un-secure error response messages, allowing secure error response policies to be enforced by API gateways.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_G6E6Pq51f0gqYFP1P25IQ.png" /></figure><h4>Analytics and Feedback Drive Continuous Improvement</h4><p>API analytics and user feedback may provide insights that shape the evolution of APIs and business processes. In support of this process, user feedback should be facilitated and tracked, API quality reporting captured and shared, and standardised periodic API reporting generated for API business owners and enterprise stakeholders.</p><p>Analytics and reporting provides the program and the enterprise with valuable insight into interconnected systems, platform and API bottlenecks, usage volume &amp; trends, and API uptake and re-use. These insights help the program to tell a story about the business value of the platform, and inform roadmap evolution and feature prioritisation.</p><h3>Wrap-up</h3><p>A robust <strong>API governance</strong> framework is central to the success of an API program, but is challenging to design and implement. API governance is a broad topic covering many facets, including the API governance organisation, API standards, security and automation tactics, strategic governance and API lifecycle governance.</p><p>Don’t try to boil the ocean, an API governance framework can be built up iteratively over time. Target the most pressing pain points in your organisation, stay flexible and be ready to adapt as the program matures, and organisational support evolves.</p><h3>Related Articles on Medium</h3><ul><li><a href="https://medium.com/api-center/api-primer-core-concepts-in-api-strategy-and-architecture-b0378a9b2b79"><strong><em>API Primer</em></strong><em>: Core Concepts in API Strategy and Architecture | API Central</em></a></li><li><a href="https://medium.com/api-center/api-design-practice-7fce69e6336c"><strong><em>API Design Practice</em></strong><em>. A practical guide to API QA…</em></a></li><li><a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7"><strong><em>Writing API Design Standards</em></strong><em>. An 8-step guide to tailoring resource API design standards to your organisational context</em></a></li><li><a href="https://medium.com/api-center/api-documentation-rules-192c127cf401"><strong><em>API Documentation Rules.</em></strong><em> Improving the quality and consistency of APIs with OpenAPI documentation and linting rules</em></a></li><li><a href="https://medium.com/api-center/api-lifecycle-management-9fb0caaa41de"><strong><em>API Lifecycle Management</em></strong><em>. Shaping an API lifecycle model for your organisational context</em></a></li><li><a href="https://medium.com/api-center/api-bites-securing-sensitive-api-s-bac6d51fe233"><strong><em>Tactics to Secure Sensitive APIs</em></strong><em> | by TRGoodwill | API Central | Medium</em></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3be87aab17b4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-center/api-governance-3be87aab17b4">API Governance</a> was originally published in <a href="https://medium.com/api-center">API Central</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Events into your API Management Framework]]></title>
            <link>https://medium.com/api-center/introducing-events-into-your-api-management-framework-958e80121499?source=rss----fdf1e8e629d7---4</link>
            <guid isPermaLink="false">https://medium.com/p/958e80121499</guid>
            <category><![CDATA[event-management]]></category>
            <category><![CDATA[event-enabled-api]]></category>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[api-strategy]]></category>
            <category><![CDATA[api-governance]]></category>
            <dc:creator><![CDATA[TRGoodwill]]></dc:creator>
            <pubDate>Fri, 25 Oct 2024 07:33:12 GMT</pubDate>
            <atom:updated>2025-02-20T08:47:28.036Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Recipe for Harmonizing API and Event Management</h4><p>If you are beginning to hit your stride with API management, you may be ready to explore events, and how you might leverage your existing API management investment to manage them. This discussion will build the case for a harmonized API &amp; Event framework and <strong><em>event-enabled APIs</em></strong> via a brief exploration of the following topics:</p><ol><li><strong><em>What is an Event?</em></strong></li><li><strong><em>Event Driven Architecture</em></strong></li><li><strong><em>Event Types</em></strong></li><li><strong><em>Common Event-Based Integration Patterns</em></strong></li><li><strong><em>Event Messaging Protocols and Schemas</em></strong></li><li><strong><em>Harmonizing API and Event Management</em></strong></li><li><strong><em>Implementing a Self-Service Event-Enabled API Platform</em></strong></li></ol><h3>1. What is an Event?</h3><p><em>“Event mechanisms loosen the coupling between the event publisher and the subscribers … an event also enforces a better division of concerns and responsibility” </em>— <a href="https://pubs.opengroup.org/architecture/o-aa-standard/">The Open Group, Open Agile Architecture</a>.</p><p>Both APIs and events support decoupling and autonomy, however events are the preferred means of communication between services when a synchronous response is not required.</p><p>Features of an event include:</p><ul><li>An event is a temporal record of an occurrence and its context</li><li>Events generated by a producer are distributed to interested consumers</li><li>An event publisher does not need to know which, or how many consumers are subscribing to events</li><li>An event does not specify event consumers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*BgF8iCQ3vFwyrqkHvWgakw.png" /></figure><h3>2. Event Driven Architecture</h3><p>An Event Driven Architecture (EDA) maximizes decoupling and autonomy of product teams, greatly improving the speed of innovation and delivery. EDA enhances the elasticity and scalability of cloud native solutions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*vZ-kyQM2Jyxs05rYTJyF6Q.png" /><figcaption>Events are published and subscribed to as topics on an event hub (pub-sub pattern).</figcaption></figure><p>Event Driven Architectures enable and support:</p><ul><li>Digital decoupling — uplift and migration</li><li>Network resilience, and reduced network and backend server load</li><li>Maximum autonomy and decoupled development</li><li>Improved data currency, lineage and accuracy across the organisation</li><li>Innovative real-time, interactive solutions</li></ul><h3>3. Event Types</h3><h4>Technical events</h4><p>A technical event is a point-in-time service-centric log describing a configuration, status, activity, or processing event. Examples may include a button clicked, an http error, a file upload, a notification sent. Technical events:</p><ul><li>May not have any correlation with a business event. However a business event is likely to correlate with several technical events.</li><li>May be used to communicate between and coordinate systems within a domain</li><li>Will typically require substantial shared knowledge of context and semantics between publisher and consumer</li><li>Are generally less important to retain for long periods of time.</li></ul><h4>Business events</h4><p>“<em>Business facts are best presented as business Domain Events, can be stored and served as distributed logs of time-stamped events for any authorized consumer to access</em>” — <a href="https://martinfowler.com/articles/data-monolith-to-mesh.html">Dehghani, Z 2019, Data Monolith to Mesh (martinFowler.com)</a></p><p>Examples might include a customer registered, an order submitted, an invoice paid, a consignment shipped. Domain business events:</p><ul><li>Are the occurrences in the lifecycle of business entities that the business really cares about.</li><li>Can be derived from a <a href="https://medium.com/api-center/api-design-practice-7fce69e6336c">process of domain-driven design</a> (such as Event Storming workshops)</li><li>May be initiated externally (e.g. creation of a new business resource instance via API), or as a result of a process or workflow internal to the domain.</li><li>Would ideally persist indefinitely, retained either by a persistent event log or a subscribing enterprise analytics platform.</li></ul><p><strong><em>Business events</em></strong> are the only events shared between domains. Business events should be reusable, discoverable and subscribable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*BHL8iNo_8nZPXs2OxPHJMQ.png" /></figure><p>In a decoupled micro-or-modular services architecture, domain business events are a critical compliment to REST interfaces. Each business resource will emit state life-cycle or update events and any authorized system may subscribe to real-time events in a predictable way and on a granular level. Examples of business events might include an order placed, invoice paid or consignment shipped.</p><p><strong><em>Consumers of business events might include:</em></strong></p><ul><li>Business processes triggered by a real-world domain events, for example, a shipment triggered by a payment event.</li><li>Responsive, real-time systems that cache data to control latency. Domain events enable systems to ensure the currency of cached or replicated data that belongs to another system of record.</li><li>Real-time BFF/Web applications.</li><li>Business analytics and intelligence.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*8fzLycw0zVXT34cRF6wnhg.png" /></figure><h3>4. Common Event-Based Integration Patterns</h3><h4>Event Messaging / Notification</h4><p>Event Messages (or “notifications”) represent a state change or other significant occurrence within a domain or business system. Typically used to notify interested parties about a business event. Event messages are often published to a pub/sub broker and distributed to interested subscribers. Can be notification + metadata, or notification + data.</p><p><strong><em>Examples</em></strong><em>: distributed systems, business domain events, data synchronisation</em></p><h4>Streams / Stream Processing</h4><p>Data streamed as events allows for the continuous delivery of data to interested parties, enabling instant insights and actions. In this pattern, data is continuously streamed in real-time by data sources and continuously ingested by decoupled subscribers. Stream processing may be employed by producers and individual consumers of data.</p><p><strong><em>Examples</em></strong><em>: IoT, technical log stream</em></p><h4>Event Sourcing</h4><p>Event sourcing involves capturing changes to the state of business entitles as a sequence of granular events. The log is the source of truth, and the sequence of events is used to build (or rebuild) the current state of the data, making it an ideal pattern for peer systems that require auditability and replayability.</p><p><strong><em>Examples</em></strong><em>: distributed ‘data-on-the-outside’, ephemeral / jit services</em></p><h4>The Right Fit for the Use-Case</h4><p>Each of these patterns have legitimate use-cases, and in a large organisation there may be demand for each of them. These patterns may even be supported by a common technology stack. However, cross-domain business events are the primary concern of this discussion, thus we will focus on the Event Messaging / Notification pattern.</p><h3>5. Event Messaging Protocols and Schemas</h3><p>In a harmonized framework, the business event is closely aligned to the REST model. An event message may be the entirety of, or delta to the current representation of a business resource, or it may simply be a notification that the resource has changed with a link back to the REST API as the source-of-truth of the current state of the resource. The following is a collection of standards and protocols with ramifications for what an event message looks like and how it is managed.</p><h4><a href="https://www.asyncapi.com/en">AsyncAPI (business data)</a></h4><p>The AsyncAPI specification is the asynchronous OpenAPI equivalent specification for asynchronous/pub-sub APIs with support for a number of protocols. OpenAPI and AsyncAPI specifications can express <strong>a common JSON schema and data model</strong>. Both specifications are widely supported by platforms and tooling. A platform schema registry is recommended. Most Flexible, lowest latency, highest dev &amp; support overhead.</p><h4><a href="https://www.w3.org/TR/websub/">WebSub (business data)</a></h4><p>WebSub is a W3C protocol for managing HTTP subscriptions to business events. WebSub is intrinsically tied to a published resource API and <strong>does not require a separate schema</strong>. Standard API headers refer client services to a WebSub Hub and topic when real-time business &amp; information update events (the full representation or a delta) are available. Enveloping or accompanying data with event metadata is not on-spec, but should be considered.</p><h4><a href="https://martinfowler.com/articles/201701-event-driven.html">‘Light-ping’ Event Notification (no business data)</a></h4><p><em>“An event need not carry much data on it, often just some id information and a link back to the sender that can be queried for more information.” </em>— <a href="https://martinfowler.com/articles/201701-event-driven.html">Fowler, M 2017, What you mean by Event-Driven?</a></p><p>A ‘light-ping’ Event Notification Pattern (aka event messaging or ‘claim-check’ pattern) does not log business data. <strong>There is a lean, uniform schema (e.g. utilising CloudEvents) for all enterprise events</strong>, providing subscribers with metadata about a change to a resource of interest, including state transition (the event) and resultant state (e.g. payment:paid). Subscribers can follow the API link to the full representation if required. The pattern inherits the real-time security rigor of managed APIs, mitigates right to be forgotten complexity, imposes predictable capacity demands, and alleviates event topic versioning headaches.</p><h4><a href="https://cloudevents.io/">The CloudEvents Envelope</a></h4><p>CloudEvents is a widely adopted, open standard “envelope” for events. This ensures a consistent approach to temporal and contextual data, traceability, schema versions, origin and more. CloudEvents is designed to be extended to meet the needs of various event patterns and solutions, including those above.</p><pre>{<br>    &quot;specversion&quot;: &quot;1.0&quot;,<br>    &quot;type&quot;: &quot;Myorg.Production.DomainResource.EventNotification&quot;,<br>    &quot;source&quot;: &quot;websubhub/subscriptions/xyz987&quot;,<br>    &quot;subject&quot;: &quot;myorg/corporate-accounts/invoices/abc123&quot;,<br>    &quot;id&quot;: &quot;9aeb0fdf-c01e-0131-0922-9eb54906e209&quot;,<br>    &quot;time&quot;: &quot;2021-08-17T13:11:24.3569284Z&quot;,<br>    &quot;data&quot;: {<br>        &quot;eventName&quot;: &quot;payment&quot;,<br>        &quot;state&quot;: &quot;paid&quot;,<br>        &quot;domain&quot;: &quot;CorporateAccounts&quot;,<br>        &quot;resource&quot;: {<br>          &quot;name&quot;: &quot;invoices&quot;,<br>          &quot;id&quot;: &quot;abc123&quot;,<br>          &quot;urls&quot;: [<br>            &quot;https://myorg.com/corporate-accounts/v1/invoices/abc123&quot;,<br>            &quot;https://myorg.com/corporate-accounts/v2/invoices/abc123&quot;<br>          ]<br>        },<br>        &quot;eTag&quot;: &quot;0x8C76D38A4407345&quot;,<br>        &quot;contentType&quot;: &quot;application/json&quot;,<br>        &quot;contentLength&quot;: 2378<br>    }<br>}</pre><h4>Balancing Ease-of-Use with Security Imperatives</h4><p>It is possible (and in some cases preferable) to combine elements of each of these standards/protocols.</p><p>The WebSub protocol offers a standardised, secure and scalable way to provide self-service onboarding and management of HTTP subscribers, including support for dynamic run-time ‘machine’ subscription, as well as standardised API headers to advertise the availability of events.</p><p>However the protocol assumes that business data will published to the persistent event log, which for data security and regulatory reasons is not always desirable.</p><p>An event framework that leverages the ease-of-use of the WebSub protocol while locking down event payloads to a lean CloudEvent-based event notification schema can improve the overall security posture and operability of the Event Management platform.</p><h3>6. Harmonizing API and Event Management</h3><p>The lack of standard collaboration patterns across domains is a major cause of implementation delays and technical debt. API management frameworks strive to facilitate frictionless collaboration with standardised interfaces and a self-service, single-pane-of-glass onboarding, API discovery and subscription. These same functions and capabilities that enable API collaboration are required for effective event management.</p><p>There is significant overlap between API and event management use-cases, models &amp; schemas, clients, workflows and operating models. A harmonized API &amp; Event Management framework will seize opportunities to align and streamline:</p><ul><li>The governance organisation and operating model,</li><li><a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7">Design standards, patterns</a> and quality governance</li><li><a href="https://medium.com/api-center/api-design-practice-7fce69e6336c">Domain design practice</a> and data governance</li><li>Targeted IRM derived data <a href="https://medium.com/api-center/securing-apis-with-an-integrated-security-framework-bf70569c8919">security, policies and controls</a></li><li>Self-service provider onboarding and <a href="https://medium.com/api-center/api-lifecycle-management-9fb0caaa41de">lifecycle management</a></li><li>Self-service consumer portals, discoverability and subscription management</li><li>Enterprise Services integration, including CICD, IAM and analytics</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*G39cqdf3Uy5yu7HgLbS09w.png" /></figure><h4>A Harmonized Self-Service Integration Framework</h4><p>The goal of a harmonized self-service Integration Framework is to enable robust and frictionless collaboration. The Event Management Framework outlined below is based on a secure ‘light-ping’ <a href="https://martinfowler.com/articles/201701-event-driven.html">Event Notification pattern</a>, utilises a <a href="https://cloudevents.io/">CloudEvents</a> envelope, leverages the <a href="https://www.w3.org/TR/websub/">W3C WebSub protocol</a> for HTTP subscription management, and assumes a 1:1 correspondence between business events and business resource APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*wxkPHxY4vB6dKJDel521cg.png" /></figure><h4>Onboarding Event Publishers</h4><p>System-of-record API providers onboarding onto API platforms may be (optionally) simultaneously configured as an event publisher via an automated onboarding service. A newly <strong><em>event-enabled API product</em></strong> (including topic, schema, publisher authorizations and portal documentation) has no authorized subscribers until the provider has approved individual subscription requests, and the schema-enforced ‘light-ping’ event payload controls the risk of exposure of sensitive data.</p><h4>Discovering and Subscribing to Events</h4><p>In a harmonized framework, client developers may subscribe to an event in the same way, and from the same place as they would subscribe to an API — via your API client/developer portal. If a provider publishes events, this will be visible from the API documentation and subscription page.</p><p>Dynamic run-time ‘machine’ subscription is also possible, allowing applications to subscribe in a more granular way to notifications about records/instances they work with. This is desirable when resource collections are very large. Clients are notified which business resources publish events &amp; the location of the event hub via standard <a href="https://www.w3.org/TR/websub/#x4-discovery">W3C Websub response headers</a>.</p><pre>HTTP/1.1 200 Ok<br>Content-type: text/html<br>Link: &lt;https://hub.example.com/&gt;; rel=&quot;hub&quot;<br>Link: &lt;http://example.com/feed&gt;; rel=&quot;self&quot;</pre><h4>The Interdependence of APIs and Events</h4><p>In a harmonized framework, APIs and business events directly effect each other in the following ways:</p><p><strong>A) A Resource is Updated via an API Call</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*OpXxJjO60ck6Xe487ubg5A.png" /></figure><p>When an API client makes a successful API call <strong>(1)</strong> that results in a change to a business resource (e.g. POST, PUT, PATCH, DELETE) managed by a system of record <strong>(2)</strong> , the system of record will then publish a business event to the event log <strong>(3)</strong> to notify all subscribing applications <strong>(4) </strong>that the resource has been updated.</p><p><strong>B) A Business Event is Published by a System of Record</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*uVX1kX6WUgHAmVrNOhk0iw.png" /></figure><p>Changes to a business resource, whether client-initiated or the result of some internal process or workflow, will result in a business event being published to the event log by the system of record <strong>(1)</strong>. The event notification provides subscribers with metadata about a change, including the resource Id, as well as the state transition (the event) and resulting state (e.g. payment:paid) <strong>(2)</strong>. Subscribers can optionally follow the API link in order to request (GET) the full representation of the resource <strong>(3)</strong>. The current representation is then returned by the system of record (or valid gateway cache) <strong>(4)</strong>.</p><h4>API and Event Trace Correlation</h4><p>Correlated distributed tracing (e.g. <a href="https://www.w3.org/TR/trace-context/">W3C Trace Context</a> / <a href="https://opentelemetry.io/docs/what-is-opentelemetry/">OpenTelemetry</a>) allows client, API and platform teams to track transactions end-to-end enabling quicker resolution of issues and richer ecosystem analytics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*WLC88qXiZI8vTWAeSI3gdw.png" /></figure><h3>7. Implementing a Self-Service Event-Enabled Platform</h3><p>We have described a framework to control ecosystem complexity for devs &amp; business users, however the framework itself has several moving parts. A framework like this is best built in stages together with pilot business users to validate the architecture, technology stack and business value.</p><p>Before you begin you will want to evaluate the various backbone event-stream/pub-sub technology stacks against your requirements (e.g. Apache/Confluent Kafka, Solace, RabbitMQ, NATS, Amazon SNS, Azure Event Grid, Google Pub/Sub etc…) and to verify the customisability of your API developer/client portal to display event related information and invoke subscription APIs on your event hub service.</p><h4>An MVP Architecture to Support Pilot Use-Cases</h4><p>An MVP architecture is likely to look slightly different depending on the technology stack on which you build, the scope of your pilot use-cases and the skillset and capacity of your team.</p><p>The following is an indicative MVP approach designed to validate the run-time architecture, leaving the self-service framework components for following iterations. During this interim phase configuration of publishers and subscribers would require a blocking engagement with the platform support team.</p><p><strong><em>Subscription</em></strong></p><p><strong>(0)</strong> Pre-req: Provider devs have configured a producer and requested configuration of an access controlled topic from the platform team</p><p><strong>(1) </strong>Client developer configures a consumer, and requests access to the topic</p><p><strong>(2)</strong> The client developer subscribes their app to the corresponding API</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*cDRzjkfzdO6HgKjHoybxZw.png" /></figure><p><strong><em>Event Distribution</em></strong></p><p><strong>(A) </strong>System-of-Record provider publishes a business event notification to the event platform via the producer</p><p><strong>(B) </strong>Each subscribed consumer forwards the event notification to a client application. Delivery failures are dealt with by the client application team either manually or with automation</p><p><strong>(C)</strong> Optionally, the client may call the corresponding API for the latest resource representation</p><p><strong>(D)</strong> The API call is forwarded to the provider</p><h4>Iterating Toward the Target State</h4><p>Having validated the architecture, technology stack and business value, the platform team can dig into the fun stuff, including : The single-pane-of-glass self-service portal, WebSub subscription hub, Publisher onboarding automation, HTTP publishing service and Security integration.</p><p>A subscription hub and API portal customisation to enable self-service subscription is a job-lot, but otherwise these components can be build out independently in stages.</p><p><strong><em>Note:</em></strong><em> self-service components such as the subscription hub and HTTP publishing service are designed to kick-start the event ecosystem, however it is not necessary to constrain your more experienced and ambitious teams to the http service layer.</em></p><p><strong><em>Self Service Subscription</em></strong></p><p><strong>(0)</strong> Pre-req: Provider devs have onboarded their team and event-enabled API product via the Portal or other process.</p><p><strong>(1)</strong> Client app developer discovers APIs offering Events via the API Portal and requests access to both API and Event</p><p><strong>(2)</strong> A delegate for the API/data owner approves the request</p><p><strong>(3)</strong> The client is subscribed to the API</p><p><strong>(4)</strong> The client is subscribed to the event via the W3C WebSub subscription protocol. HTTP subscription endpoint is verified</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*rRFZJ0hvlPzBGiaIwzkPnw.png" /></figure><p><strong><em>Event Distribution</em></strong></p><p><strong>(A) </strong>System-of-Record provider publishes a business event to the event platform, optionally via an HTTP publishing endpoint</p><p><strong>(B) </strong>The event is forwarded to the subscription hub</p><p><strong>(C)</strong>The subscription hub forwards the event notification to each subscriber, managing retries where required</p><p><strong>(D) </strong>Optionally, the client may call the corresponding API for the latest resource representation</p><p><strong>(E) </strong>Client subscription is synchronised, and so the API call is forwarded</p><h3>Wrap-up</h3><p>We have seen that business events add an important dimension to the enterprise integration landscape — providing the highest level of service decoupling and responsiveness and enabling innovative real-time business solutions.</p><p>We also know that complex multi-modal integrations can be difficult and expensive to comprehend, change, secure, manage and scale. There is a need to harmonize API and Event Management in order to simplify development, specification, discovery &amp; comprehension, security &amp; management of the platform. <strong>Event-enabled APIs</strong> (aka ‘API-ification’ of events) based on an <a href="https://martinfowler.com/articles/201701-event-driven.html">Event Notification pattern</a>, <a href="https://cloudevents.io/">CloudEvents</a>, the <a href="https://www.w3.org/TR/websub/">W3C WebSub protocol</a> can help tame the complexity.</p><p>Such a framework is best built in an MVP approach in cooperation with pilot business users in order to validate the platform architecture, technology stack and business value.</p><p>Enjoy the journey!</p><h3>Related Articles</h3><p><a href="https://medium.com/api-center/api-primer-core-concepts-in-api-strategy-and-architecture-b0378a9b2b79"><em>API Primer: Core Concepts in API Strategy and Architecture | API Central</em></a></p><p><a href="https://medium.com/api-center/api-design-practice-7fce69e6336c"><em>API Design Practice. A practical guide to API QA and the… | API Central</em></a></p><p><a href="https://medium.com/api-center/api-design-pattern-for-business-resource-apis-6f25afd2b2df"><em>Design Patterns for Business Resource APIs | API Central</em></a></p><p><a href="https://medium.com/api-center/the-fundamentals-of-interoperability-and-adaptable-architecture-1565fece855e"><em>The Fundamentals of Adaptable, Interoperable Architecture | API Central</em></a></p><p><a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7"><em>Writing API Design Standards. An 8-step guide to tailoring API design… | API Central</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=958e80121499" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-center/introducing-events-into-your-api-management-framework-958e80121499">Introducing Events into your API Management Framework</a> was originally published in <a href="https://medium.com/api-center">API Central</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Primer: Core concepts in API Strategy and Architecture]]></title>
            <link>https://medium.com/api-center/api-primer-core-concepts-in-api-strategy-and-architecture-b0378a9b2b79?source=rss----fdf1e8e629d7---4</link>
            <guid isPermaLink="false">https://medium.com/p/b0378a9b2b79</guid>
            <category><![CDATA[api-architecture]]></category>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[api-primer]]></category>
            <category><![CDATA[api-strategy]]></category>
            <category><![CDATA[api-roadmap]]></category>
            <dc:creator><![CDATA[TRGoodwill]]></dc:creator>
            <pubDate>Fri, 27 Oct 2023 06:13:22 GMT</pubDate>
            <atom:updated>2025-04-06T09:11:39.481Z</atom:updated>
            <content:encoded><![CDATA[<h3>API Primer: Core Concepts in API Strategy and Architecture</h3><h3>Aligning on API Concepts</h3><p>When talking API strategy, architecture and management concepts with IT and business leaders, it is good to have have everyone on the same page. The following is a short primer on several important API concepts that are likely to come up when discussing an API strategy and roadmap. This discussion will briefly cover:</p><ul><li><strong><em>API</em></strong></li><li><strong><em>REST</em></strong></li><li><strong><em>API-First, API-as-a-Product</em></strong></li><li><strong><em>Design-First &amp; OpenAPI</em></strong></li><li><strong><em>API Gateway</em></strong></li><li><strong><em>API Management</em></strong></li><li><strong><em>API Management Framework</em></strong></li><li><strong><em>API Portal and API Catalog</em></strong></li><li><strong><em>API Ecosystem</em></strong></li><li><strong><em>API Governance</em></strong></li></ul><h3>First Things First: What is an API?</h3><p><strong>An Application Program Interface</strong> (API) is a set of routines, protocols, and tools allowing software applications to communicate with one another. An application Program Interface (API) allows software to offer services or data for use by another application.</p><p><strong>An API specification</strong> describes an application programming interface, making it easier for client application developers to build an integration with the service offering the API</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*uJoifhV67GXa2OWI3ZaURg.png" /></figure><p><strong>‘API’ </strong>is a broad term covering a number of communication &amp; integration technologies. The <em>baseline</em> concepts usually associated with the term ‘API’ in connection with enterprise API strategies today are:</p><ul><li>Native HTTP methods and protocols</li><li>REST (Representational State Transfer) — an HTTP-based, resource-oriented API paradigm</li><li>JSON (JavaScript Object Notation) — as the preferred (but not exclusive) data interchange format</li></ul><p>However, an API strategy may evolve to embrace complimentary API technologies and architectures.</p><h3>The REST Architectural Style &amp; Microservices</h3><p><strong>REST (</strong>an acronym for “REpresentational State Transfer”) is a resource-oriented architectural style that;</p><blockquote>“<strong>provides a set of architectural constraints that, when applied as a whole, emphasizes scalability of component interactions, generality of interfaces, independent deployment of components</strong>” — <a href="https://ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">Fielding, R.T. 2000, Representational State Transfer (REST)</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*kwxXP-6IOTsvJvneseAd2A.png" /></figure><p>Similarly, <strong>microservices architecture</strong> is an architectural style that emphasizes independently deployable, loosely coupled services organized around business capabilities and resources.</p><blockquote>“<strong>Applications built from microservices aim to be as decoupled and as cohesive as possible — they own their own domain logic … These are choreographed using simple RESTish protocols</strong>” <em>— </em><a href="https://martinfowler.com/articles/microservices.html">Fowler, M and Lewis, J 2014, Microservices</a>.</blockquote><h3>API-First, API-as-a-Product</h3><p><strong>API-first</strong> is a software design approach that centers on the API as the means of interacting with services and data. It treats APIs as first-class citizens, making APIs more reusable and adaptable, and enabling organizations to move faster and innovate more rapidly.</p><p><strong>API-as-a-Product</strong> describes a paradigm in which the API is not only the method of delivery — it is <strong><em>the primary product of value being delivered</em></strong>, based on an open business model mindset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*nR89sU2-47KDES02lC459g.png" /></figure><p>An API product is not an API specification or its implementation, but rather <strong><em>a deployable package </em></strong>including security/regulatory policies, access model, API documentation, SLAs, and a monetization and/or consumer-engagement model.</p><h3>Design-First &amp; OpenAPI</h3><p><strong>Design-first</strong> is an is a development approach that prioritizes the design and specification of API products that meet business requirements prior to implementation. This approach allows product teams to take advantage of code generators to accelerate development. Design-first is often, but not always, a complimentary facet of an API-first strategy.</p><p><strong>Model Driven Development</strong> is a design-first approach involving <a href="https://medium.com/api-center/api-design-practice-7fce69e6336c">collaborative design</a> workshops and modeling tools to allow a diverse group of stakeholders to collaborate on a composable, evolvable and secure domain data and REST model, from which API/Event specifications are generated. The versioned domain model becomes the source of truth for API products as well as the enterprise data model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4rRcHRjilYkxI0BGSdoFPg.png" /></figure><p><strong>The OpenAPI specification</strong> is a broadly supported, de facto standard specification language for HTTP APIs and features a healthy <a href="https://openapi-generator.tech/docs/generators/">ecosystem of design tools</a> and “one-click” generators for server scaffolding, client code/SDKs, mocking services and API test suites.</p><h3>API Gateway</h3><p><strong>An API gateway</strong> is a platform or service that sits in front of an API provider and acts as a single point of entry for client applications. The API Gateway routes API calls, enforces SLAs, provides cache management, and protects API back-ends with payload validation, authorization, rate-limiting and other configurable policies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*cwIENLqY9tjDe5tOGl_-YQ.png" /></figure><p>An API Gateway is often deployed as an access control point and network edge service to control and audit ingress, with close integration with Identity and Access Management and Security Information and Event Management (SIEM) services. API gateways generate telemetry that provides visibility into usage, patterns and trends across the organisation.</p><h3>API Management</h3><p><strong>API Management </strong>is about much more than operating one or more API gateways. API Management is facilitated by a platform or framework of services that provide the means to publish, secure, manage and observe APIs, and to discover and access APIs via a self-service API catalog / portal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*MYKPsgpornisEQIFMfJ49g.png" /></figure><p>An API management platform offers value to API consumers by facilitating self-service discovery and access to APIs — avoiding blocking engagements with platform and provider teams. It provides value to API providers and business stakeholders by facilitating client engagement and SLA management, providing visibility into API usage and trends, and exposing management APIs for <a href="https://medium.com/api-center/managing-api-lifecycles-with-model-driven-integrated-devops-3cfcb9eca32e">decoupled CI/CD deployment automation</a>.</p><h3>API Portal and API Catalog</h3><p><strong>An API Portal</strong> hosts and authorizes access to the API catalog and API documentation. It facilitates client registration, IAM credential and/or certificate management and API access request workflows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*chmGKET4Y9SWsyancKGUJA.png" /></figure><p>An API portal will provide a dashboard for API metrics and a manage communication between consumers and providers. Client code or SDKs can usually be generated on and downloaded from an API Portal.</p><p><strong>An API Catalog</strong> provides the means for application developers to discover, learn about and request access to APIs. An API Catalog is not dissimilar to a catalog for an online grocery retailer, where potential customers can browse for and arrange access to the products they need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*ORUTzVllupvmTnVtQgJvRA.png" /></figure><p>An online grocery retail business cannot hope to be successful until it can offer a catalog that includes a baseline collection of core, broadly relevant products. In the same way, <strong><em>a vibrant API ecosystem requires a rich API catalog </em></strong>of reusable, coherent and <a href="https://medium.com/api-center/api-design-pattern-for-business-resource-apis-6f25afd2b2df">composable APIs</a>, covering a critical mass of core business capabilities. To this end, API quality governance is essential.</p><h3>API Management Framework</h3><p><strong>A COTS API Management platform</strong> alone is not a complete solution.</p><p><strong>Decoupled, well governed self-service integration</strong> is enabled via API management platforms inter-operating with a framework of centrally managed enterprise services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6e77j_VZYV9-MnTf-oh2gg.png" /></figure><p><strong>Full stack API management framework</strong> components encompass all aspects of <a href="https://medium.com/api-center/securing-apis-with-an-integrated-security-framework-bf70569c8919">API security</a>, client and provider onboarding, <a href="https://medium.com/api-center/managing-api-lifecycles-with-model-driven-integrated-devops-3cfcb9eca32e">lifecycle and release management</a>, client engagement, support, <a href="https://medium.com/api-center/api-bites-w3c-trace-context-8a4f4dcb2456">monitoring and observability</a>.</p><h3>API Ecosystem</h3><p><strong>An API Ecosystem</strong> encompasses the network of API consumer and API producer communities, as well as the APIs offered in a community facing API catalog.</p><p>An organisation may manage multiple API ecosystems encompassing Internal, partner and public API communities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*H6NqiFPowqIMmu996Uq6nA.png" /></figure><p><strong>Community and Catalog management</strong> are at the heart of an API ecosystem. Communities must be actively engaged, and a catalog of high quality, composable APIs must be iteratively built up.</p><h3>API Governance</h3><p><a href="https://medium.com/api-center/api-governance-3be87aab17b4"><strong>API Governance</strong> </a>is a topic that spans the governance organisation, API strategy, <a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7">API standards and patterns</a>, <a href="https://medium.com/api-center/api-lifecycle-management-9fb0caaa41de">API lifecycle management</a>, governance tactics and ecosystem management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5JYQX1ml6rAthsxgJL2d4w.png" /></figure><p><a href="https://medium.com/api-center/api-governance-3be87aab17b4"><strong>API Lifecycle Governance</strong></a> will be focused on facilitating secure, standards compliant API lifecycle management by decoupled and autonomous business domains. <a href="https://medium.com/api-center/api-lifecycle-management-9fb0caaa41de"><strong>API Lifecycle management</strong></a> covers Design, Build &amp; Release and Runtime governance phases</p><p><strong>Minimum-viable-governance</strong> is a term sometimes used to describe governance that is guided and enforced by collaborative tooling, automation and policy-as-code to ensure minimal blocking touchpoints.</p><h3>Wrap-up</h3><p>This has been a lightning tour of some key concepts in API strategy, architecture and management. There is a lot more to be said on each of these topics, and some considerable variation in how these terms are defined. If these concepts are important to your API strategy, it is a good idea to settle on and document an agreed definition.</p><p>If you are interested in reading further, here are some additional resources on API strategy, architecture and management:</p><ul><li><a href="https://medium.com/api-center/api-design-pattern-for-business-resource-apis-6f25afd2b2df">Design Patterns for Business Resource APIs | API Central | Medium</a></li><li><a href="https://medium.com/api-center/api-design-practice-7fce69e6336c">API Design Practice. A practical guide to API QA and the design of stable, coherent and composable business resource APIs</a></li><li><a href="https://medium.com/api-center/api-governance-3be87aab17b4">API Governance: Principles for Effective Enterprise API Governance</a></li><li><a href="https://medium.com/api-center/api-bites-1af949efdd1b">An introduction to API Version Management</a></li><li><a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7">Writing API Design Standards. An 8-step guide to tailoring API design standards to your organizational context</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0378a9b2b79" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-center/api-primer-core-concepts-in-api-strategy-and-architecture-b0378a9b2b79">API Primer: Core concepts in API Strategy and Architecture</a> was originally published in <a href="https://medium.com/api-center">API Central</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Bites — API Testing]]></title>
            <link>https://medium.com/api-center/api-bites-api-testing-71366ffbe587?source=rss----fdf1e8e629d7---4</link>
            <guid isPermaLink="false">https://medium.com/p/71366ffbe587</guid>
            <category><![CDATA[api-testing]]></category>
            <category><![CDATA[api-governance]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[api-test-automation]]></category>
            <dc:creator><![CDATA[TRGoodwill]]></dc:creator>
            <pubDate>Tue, 06 Jun 2023 06:21:17 GMT</pubDate>
            <atom:updated>2023-09-04T12:31:35.787Z</atom:updated>
            <content:encoded><![CDATA[<h3>API Bites — API Testing</h3><h4>A High-Level Overview of API Testing Concepts</h4><h3>Intro</h3><p>API Testing is the subset of testing approaches focused on the API contract. In the case of API-first services, functional and regression tests will be conducted primarily via APIs, making robust and well maintained API tests a critical enabler of agile development and continuous delivery.</p><p><strong>API testing is described in various different ways</strong> depending on where you look. This overview is not an attempt to be dogmatic, but to lay out broadly applicable principles. The terms for, and granularity of different testing phases may be described differently across various test tooling, and the mapping to environments will differ from site to site.</p><p>This high-level overview will consider the following topics:</p><ul><li><strong>API Test Evolution</strong></li><li><strong>Phases of API Testing</strong></li><li><strong>Testing Approaches</strong></li><li><strong>Security Testing</strong></li><li><strong>Test Tooling Supporting OpenAPI Test Generation</strong></li></ul><h3>API Test Evolution</h3><p>API testing platforms will typically enable an interface (or contract) test collection to be <strong><em>generated from an OpenAPI document</em></strong>. A test collection will grow and evolve through different phases of development. It is important to refine tests and maintain collections to facilitate this evolution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*hDiVh9bcIZI4Vbzm_aW8dw.png" /></figure><p>A test suite may be grouped into several collections to allow ‘modular’ composition into the required test type/granularity/coverage. Test collections may potentially be run in parallel to reduce test execution time.</p><h3>API Testing Phases</h3><p><em>Note: In order to simplify concepts, testing phases and environments are deliberately conflated here. However, while testing requirements in higher environments may become increasingly stringent, more mature tests such as security and negative tests (when available) may be run through all environments.</em></p><h4>1. API Specification Development &amp; Integration</h4><p><strong>API document linting: </strong>An API definition document rules and standards compliance validation— comparable to code analysis for the API document. Linting against <a href="https://medium.com/api-center/api-documentation-rules-192c127cf401">API Documentation Rules</a> should be incorporated into IDE tools &amp; continuous integration pipelines.</p><h4>2. Sandpit / Early Dev</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*K6KXG-1Jt_rn-If17JfOtA.png" /></figure><p><strong>Interface tests: </strong>Test defined REST operations with basic scenarios. The back-end MAY be mocked to allow early exposure of APIs to client developers in order to surface issues and elicit feedback. Interface tests may be <em>generated from an OpenAPI document.</em></p><p><strong>API Unit tests:</strong> An interface test concerned with exercising the modules and components that implement the API. Requests are validated and correctly handled, responses are schema valid.</p><h4>3. Development</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*iiIVKapiuGL32HUyY4FDfA.png" /></figure><p><strong>Integration tests:</strong> Verify that different modules or services work well together. For example, interactions with databases, IAM/ACLs or microservices. May be rolled into functional testing.</p><p><strong>Functional tests: </strong>Positive/happy-path testing returns valid business responses. Functional tests would expect to GET specific values per POSTed inputs. Collection filters return expected records.</p><p><strong>Resource lifecycle tests: </strong>Replicates user/system interaction with one or more specific business entities through the entire E2E resource state-lifecycle from instantiation to retirement, and verifies that state transitions triggered by API operations work as expected.</p><h4>4. Test</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*v-SQ7yN87d0CH1L-yyfETw.png" /></figure><p><strong>Regression tests: </strong>Tests combinations of API operations to ensure every function behaves as expected after an update. It will accumulate tests for bugs and issues. A <em>consolidation of functional and end-to-end testing</em>, with an additional focus on issues and edge-cases.</p><p><strong>Negative tests: </strong>Negative testing ensures that your application can gracefully handle invalid input or unexpected user behavior. Write tests expecting specific error responses. Explore edge cases and field limits to increase the resilience of your APIs in production.</p><p><strong>Security tests: </strong>Policy-as-Code controls and security scheme validation is applied during deployment. Automated testing of applicable security controls is performed maintained by the product team either adjunct to, or incorporated into regression tests.</p><h4>5. Acceptance / Staging</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*xGY2ZGsPM7M-sUID57wFBA.png" /></figure><p><strong>Performance testing: </strong>Performance tests evaluate how an API performs under high workloads, measuring the reliability, speed, scalability, and responsiveness of an application. It will validate caching, assess performance against SLAs, and help identify bottlenecks and stress points.</p><p><strong>Acceptance testing:</strong> Formal, integrated tests that are sometimes employed as a production release stage-gate. Acceptance tests focus on replicating user behaviors and external processes to verify if a system satisfies business requirements.</p><p><strong>API penetration testing: </strong>API security testing targeting known risks and vulnerabilities (incl. <strong>OWASP top 10</strong>) is undertaken regularly in acceptance and periodically in production, and is regularly reviewed and maintained by the API platform and Cyber Security teams.</p><h3>Testing Approaches</h3><h4>API Validation / Linting</h4><p>APIs will typically be validated for standards, policy and security compliance during deployment by automation. Linting of the OpenAPI document during Continuous Integration is recommended to ensure timely feedback on format and configuration issues.</p><p><a href="https://medium.com/api-center/api-documentation-rules-192c127cf401">Spectral OpenAPI rules</a> are widely adopted as a base ruleset, and may be extended to enforce enterprise patterns and conventions. OpenAPI validation tools should be made available to product teams for incorporation into IDE tools &amp; continuous integration pipelines.</p><h4>Test Code Coverage Analysis</h4><p>As the service comes together, and if coverage instrumentation is supported, test/code coverage analysis may be applied and reported by continuous integration pipelines. Coverage analysis will help ensure untested functions are not released to production.</p><h4>Ad-hoc API Testing</h4><p>Test collections generated from your OpenAPI spec may be used to quickly and easily interact with APIs under development. Individual API requests or entire collections of requests can be run against the API. Scripts may be employed to insert response data into subsequent requests.</p><h4>Testing Against Mock APIs</h4><p>Mock APIs are used to simulate a working API — generating schema conformant API responses. This tactic may be used to unblock client developers, and/or to expose the REST model/APIs to client developers early to surface issues and elicit feedback.</p><p>A mock API service may various levels of sophistication depending on the purpose:</p><ul><li><strong>Stub</strong>: A placeholder to backend interface testing usually returning static or randomly generated data.</li><li><strong>Mock</strong>: basic functionality required for a specific testing or development purpose — should create and return instance data.</li><li><strong>Virtual Service</strong>: complete and persistent state-lifecycle emulation deployed into system integration environments.</li></ul><p>An API Gateway may offer out-of-the-box service mocking. Mock servers may also be generated from an OpenAPI specification.</p><h4>Automated Testing</h4><p>Once an API delivery pipeline has been configured, promotion through test environments to the Stage/User-Acceptance environment may be automated on the basis of full-coverage, automated functional (dev), regression (test) and security testing. Coverage and maintenance of functional, regression and security tests is a product team responsibility.</p><h3>Security Testing</h3><p>Verifying the application of security controls applicable to your business API is a product team responsibility, and will include both code analysis and automated testing.</p><p>As well as automated Sonarqube analysis of your software source code, continuous integration and delivery pipelines can <a href="https://medium.com/api-center/api-documentation-rules-192c127cf401">validate API security</a> and API policy configuration.</p><p>Automated security testing should be built into delivery pipelines and may be a separate suite of tests or consolidated into regression tests. Security tests should target security controls directly applicable to your API, as well as <a href="https://owasp.org/www-project-api-security/">general and high-risk API vulnerabilities</a>.</p><h4><strong>Test coverage might include (among other things):</strong></h4><ul><li>HTTPS scheme only, no redirect from HTTP to HTTPS.</li><li>API gateway returns a HTTP status code of “400 — Bad Request “ for schema invalid JSON content</li><li>Operation-level client authorization is applied. The API gateway returns a HTTP status code of “401 — Unauthorized” to client applications that are not subscribed/authorized</li><li>Granular user/role level authorization is applied to individual records (where applicable), and “401 — Unauthorized” is returned to an unauthorized user.</li><li>A ‘read’ authorization does not provide access to ‘Unsafe’ (e.g. ‘write’ protected) HTTP methods</li><li>Vectors for command Injection are neutralized</li><li>Rate limit is applied and API gateway returns a HTTP status code of “429 — Too Many Requests” (may be covered by performance testing)</li><li>Pagination is applied, and payload sizes are within predetermined size limits.</li><li>Field size validation is applied. The API gateway returns an HTTP status code of “400 — Bad Request” when size limits are exceeded.</li><li>API authorization event logs for all touchpoints are captured by SIEM.</li></ul><p>Consider vulnerabilities articulated in the <a href="https://owasp.org/www-project-api-security/"><strong><em>OWASP API Security Top 10</em></strong></a></p><p>Look for security testing guidance specific to the testing platform used by your team/org, such as the following Postman/Newman security testing guidance:</p><ul><li><a href="https://www.postman.com/postman-galaxy/leveraging-postman-for-security-testing/">Leveraging postman for security testing</a></li><li><a href="https://www.postman.com/postman-galaxy/integrating-api-security-testing-into-postman-lifecycle/">Integrating API security testing into postman lifecycle</a></li></ul><h4>API Penetration Testing</h4><p>API security testing targeting known risks and vulnerabilities (incl. <a href="https://owasp.org/www-project-api-security/"><strong>OWASP API Security Top 10</strong></a>) is undertaken regularly in stage/acceptance and periodically in production. It is usually overseen by Cyber Security in consultation with the API platform team, and routinely reviewed and maintained.</p><h3>Test Tooling Supporting OpenAPI Test Generation</h3><p>The following is a (non-exhaustive) list of testing platforms that support test generation from an OpenAPI and/or AsyncAPI specification document:</p><h4>Open-Source</h4><ul><li><a href="https://github.com/karatelabs/karate">karatelabs/karate</a>,</li><li><a href="https://docs.pact.io/">Pact (pact.io)</a>,</li><li><a href="https://github.com/rest-assured/rest-assured">REST-Assured</a> + <a href="https://github.com/Cornutum/tcases/blob/master/tcases-openapi/README.md#tcases-for-openapi-from-rest-ful-to-test-ful">Tcases</a></li></ul><h4>Free (Currently)</h4><ul><li><a href="https://www.thunderclient.com/">Thunder Client — Extension for VS Code</a></li></ul><h4>Freemium</h4><ul><li><a href="https://www.postman.com/">Postman API Platform</a>,</li><li><a href="https://katalon.com/">Katalon Quality Management</a>,</li><li><a href="https://insomnia.rest/">Insomnia API Dev Platform</a>,</li><li><a href="https://www.soapui.org/docs/rest-testing/">SOAPUI</a> / <a href="https://swagger.io/solutions/api-testing/">ReadyAPI</a></li></ul><h3>Wrap-up</h3><p>API testing should be an integral part of API and service development, and will evolve and grow through the development process. Robust and well maintained API tests are critical enablers of agile development and continuous delivery, and essential to securing business resource APIs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71366ffbe587" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-center/api-bites-api-testing-71366ffbe587">API Bites — API Testing</a> was originally published in <a href="https://medium.com/api-center">API Central</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design Patterns for Business Resource APIs]]></title>
            <link>https://medium.com/api-center/api-design-pattern-for-business-resource-apis-6f25afd2b2df?source=rss----fdf1e8e629d7---4</link>
            <guid isPermaLink="false">https://medium.com/p/6f25afd2b2df</guid>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[api-models]]></category>
            <category><![CDATA[api-resources]]></category>
            <category><![CDATA[api-design]]></category>
            <dc:creator><![CDATA[TRGoodwill]]></dc:creator>
            <pubDate>Fri, 19 May 2023 08:07:26 GMT</pubDate>
            <atom:updated>2025-03-18T08:11:05.733Z</atom:updated>
            <content:encoded><![CDATA[<h4>Enhance API composability and control over-fetching with sub-resources, filtering and field selection</h4><p><em>The setup and context of the following design patterns are described in </em><a href="https://medium.com/api-center/api-design-practice-7fce69e6336c"><em>this article</em></a><em>:</em></p><p><a href="https://medium.com/api-center/api-design-practice-7fce69e6336c">API Design Practice</a></p><h3>The Business Resource</h3><p>Business value, re-use and genuinely autonomous self-service are only realised when key business resources of adjacent business domains are coherently modelled, consistently described and easily discoverable.</p><p>Business resources represent the nouns of a system, such as ‘<em>applications</em>’ and ‘<em>applicants</em>’, and provide a context for interaction with a business capability and the business facts about a business domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*XUOY2cvRqMmeNmcL7-0utw.png" /></figure><p>A REST model will describe a business resource, and how client systems interact with it. It will detail <a href="https://medium.com/@trgoodwill/api-bites-7373b2127ed1">paths</a>, <a href="https://medium.com/api-center/api-bites-request-and-response-protocols-1f3a4f34cecf">methods and response types</a>. It is a refinement and/or abstraction of the domain data model with a focus on interoperability.</p><blockquote>“REST provides a set of architectural constraints that, when applied as a whole, emphasizes scalability of component interactions, generality of interfaces, independent deployment of components” — <a href="https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">Fielding, R.T. 2000, Representational State Transfer (REST)</a></blockquote><p>Business resource APIs should strive to be ‘developer-empathetic’ (focused on usability and painless integration), however a System-of-Record business service owns the model and the vocabulary, and is always ‘upstream’.</p><h3>Balancing Composability with Cohesion</h3><p>Microservices architectures and the REST architectural style enable decoupling, self-service and re-use by moving the responsibility for choreography from the resource server to the client. This shift in responsibility allows business systems to build stable, genericised interfaces to their business resources and capabilities, without tight coupling to client systems, which in turn allows client systems to compose data via self-service integration without a blocking dependency on external teams.</p><p>The key aims of REST model abstraction — composability, cohesion and stability — are concepts that align closely with the Domain Driven Design process of distillation of the core domain and conceptual contours. If modelled entities are overloaded or overly-complex, or if the core focus of the business is not evident in the model (anemic), it is likely that the domain model requires further refinement.</p><blockquote>“A supple design based on a deep model yields a simple set of interfaces that combine logically to make sensible statements in the ubiquitous language, and without the distraction and maintenance burden of irrelevant options.” <a href="https://www.oreilly.com/library/view/domain-driven-design-tackling/0321125215/">Evans, E 2003, Domain Driven Design</a>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*iHwFvx2xoS4hQgqRXDYmSA.png" /></figure><p>The REST model should be concerned with finding a balance between granularity and cohesive units of business data likely to be of interest to client systems (though not superfluous to their needs). In short, <em>balancing </em><strong><em>composability</em></strong><em> with </em><strong><em>cohesion</em></strong>. The REST modelling process will typically result in a core, canonical resource with supporting elements modelled as sub-resources on their own path.</p><h3><strong>The Canonical business resource</strong></h3><p>The root resource is the ‘headline’ business entity — the canonical business resource to which sub-resources relate. An OpenAPI document will ideally model (and be named for) a single canonical resource and its dependant sub-resources, in order to aid comprehension and discoverability and to control the impact of changes.</p><p>The canonical resource (identified by a plural noun e.g. ‘<strong>applications</strong>’) is specifically addressed by the API invocation path. To ensure unique addressability, the resource path (as defined within the OpenAPI document) follows a base path consisting of a context path (preferably a business domain namespace) and the API major version number. E.g.</p><pre>https://api.myorg.com/membership/v1/applications</pre><p>Every business domain entity exposed as a RESTful resource (e.g. every applicant and every application) must be identifiable uniquely within the domain. This is a key element of the RESTful style; the ability to individually address any resource within your domain and store these identifiers for later use.</p><pre>https://api.myorg.com/membership/v1/applications/12345</pre><p>Resource instance payloads are derived from the REST model, and will be aligned across POST (request), PUT (request), PATCH (request) and GET (response) methods. <a href="https://learn.openapis.org/specification/components.html">Common schemas should be re-used</a>.</p><p><strong><em>Note</em></strong><em>: Resource Id fields must be immutable and will not apply to a POST/PUT/PATCH payload: the id field should flagged ‘readOnly’ (readOnly: true), meaning that it is not included in POST/PUT/PATCH payload descriptions.</em></p><h3>Sub-Resources</h3><p>Sub-resources are resources that are existentially dependent (should not exist without the parent, e.g. ‘specification’ does not exist without a ‘product’), are subordinate to the parent (owned by the parent, e.g. ‘address’ belongs to ‘person’), or contain key information about an existentially linked peer resource.</p><p>Keeping in mind the “conceptual contours” principle (cohesive divisions), dependent and subordinate objects modeled as sub-resources within the same API specification as the parent provides a number of advantages, including;</p><ul><li>Readability, clarity</li><li>Transparent relationship and context, conveyed by the API path, e.g. ‘v1/products/12B34C/specification’</li><li>Composability (discrete retrieval of sub-resource data, controlling over-fetching)</li><li>Controlling the impact of changes</li></ul><p>Some sub-resources may be independently addressable, and will have their own state-lifecycle and a unique identity (and resource Id) e.g.</p><pre>/v1/members/12B34C/dependents/98Y76X <br><br>  and in some cases...<br><br>/v1/members/dependents/98Y76X</pre><p>In other cases, the sub-resource will represent a value object, and will be addressed as an object, collection or singleton belonging to a resource instance, e.g.</p><pre>/v1/products/12B34C/specification</pre><p>The following factors strongly <strong><em>suggest a sub-resource model</em></strong>:</p><ul><li>Entity data may be managed (POST/GET/PATCH) separately from the parent entity, and subsequent to instantiation of the parent</li><li>The data (or any more than a summary) is not always of interest to consumers of the parent resource</li><li>The data is a distinct entity with a 1:n relationship to the parent, i.e. would result in an array of indeterminate size.</li><li>The data is binary (file, image)</li></ul><p>The general consensus is that more than 2 levels of resource identifier in a URL can make APIs difficult to understand and use. If the model calls for something more than /resource/{resourceId}/resource/{resourceId} then reconsider the composition and/or granularity of the model.</p><p><em>Path and naming conventions and patterns are covered in </em><a href="https://medium.com/@trgoodwill/api-bites-7373b2127ed1"><strong><em>more detail here</em></strong></a><em>.</em></p><p><em>Binary and multi-part content is covered in </em><a href="https://medium.com/api-center/api-bites-binary-and-multi-part-content-283ef69fc5e9"><strong><em>more detail here</em></strong></a></p><h3>Affordances</h3><blockquote>“when a significant process or transformation in the domain is not a natural responsibility of an entity or value object”, it makes sense to… “add an operation to the model as a standalone interface declared as a service” — <a href="https://www.oreilly.com/library/view/domain-driven-design-tackling/0321125215/">Evans, E 2003, Domain Driven Design</a>.</blockquote><p>Significant, synchronously-driven state-lifecycle transitions (as captured in the domain model — e.g. ‘<em>submit</em>’ or ‘<em>cancel</em>’) may warrant a dedicated affordance operation.</p><p>The first consideration around ‘command’ affordances is the question of whether the action should rather be driven by an asynchronous business event. For example, a shipment triggered by a payment event. This approach offers the highest degree of decoupling. Event-based triggers are not always applicable however, for instance in a real-time synchronous user-based interaction, when a client system requires a receipt or Id from the action, or when dealing with legacy or proprietary systems.</p><p>Synchronous affordance operations are always verbs that describe the action in the context of a resource (or resource collection). The intent of the affordance and its context are then clear. E.g.</p><pre>/v1/users/98D76C/cart/checkout<br><br>/v1/subscriptions/12B34C/cancel</pre><p><em>This topic is covered in a little more depth here: </em><a href="https://medium.com/@trgoodwill/the-engine-of-application-state-92bfdce0d41c"><em>The Engine of Application State: Aligning HATEOAS, Affordances and Business Events| Medium</em></a></p><h3>Filtering and Field Selection</h3><p>Not every client system will be interested in all of the information provided by a business resource API — even if it is modelled around core business data and streamlined for composability. A predictably implemented parameter driven ‘read’ filtering model that includes field and collection filters can reduce over-fetching and enhance composability. E.g.</p><pre>GET /v1/subscriptions?subscriberId=12B34C&amp;fields=subscriptionId,name</pre><h4>Query Parameters</h4><p>The use of query parameters to filter a collection of resources based on field values should be broadly supported.</p><p>For example, the query parameter “?color=red” will filter the collection of resources for instances with the field “color” that matches the value “red”. Multiple query parameters return the intersection of results.</p><p>Multi-value parameters (an array of values), supporting a query such as “?color=red,green” may also be supported. In OpenAPI 3, a query param array may be defined by the “schema” keyword.</p><pre>parameters:<br>   - in: query<br>     name: color<br>     schema:<br>        type: array<br>        items:<br>           type: string</pre><h4>Fields Parameter</h4><p>Consider enabling API consumers to control over-fetching by specifying a subset of fields that they would like returned in the response payload in a ‘fields’ query parameter.</p><p>Example GET requesting only the applicationId and applicationDate fields in the response:</p><pre>GET api.myorg.com/v1/applications?status=pending&amp;fields=applicationId,applicationDate</pre><pre>{<br>    &quot;data&quot;: [<br>       {<br>          &quot;applicationId&quot;: &quot;808877765733&quot;,<br>          &quot;applicationDate&quot;: &quot;2022-01-01&quot;<br>       },<br>       {<br>          &quot;applicationId&quot;: &quot;80851456484&quot;,<br>          &quot;applicationDate&quot;: &quot;2022-06-01&quot;<br>       }<br>    ]    <br>}</pre><p>A combination of query, sorting and field parameter support provides client applications with a degree of control over the size and content of the response payload, substantially increasing the usability of the API.</p><p><em>Filtering conventions are discussed in </em><a href="https://medium.com/@trgoodwill/api-bites-filtering-conventions-8a1a19c03975"><strong><em>more detail here</em></strong></a><em>.</em></p><h3>Additional Functional Use-Case Design Patterns</h3><p>A versions pattern may be used where versioned resource instances are maintained, such as document versions.</p><p>Typically the version-id is an incrementing integer. GET request on the base resource always returns the latest version.</p><pre><strong>Format:</strong><br>/{api-version}/{resource}/{Id}/versions/{versionId}</pre><pre><strong>Examples:</strong><br>GET /v1/activity-reports/12345/versions/3<br>GET /v1/activity-reports/12345           --&gt; Latest</pre><h4>Job to be done (JTBD) pattern</h4><p>This pattern facilitates a specific process or regulatory obligation related to a business resource. It is mapped to the parent resource in much the same way as a sub-resource.</p><pre><strong>Format:</strong><br>/{version}/{resource}/{job name}/{jobId}</pre><pre><strong>Example:</strong><br>POST /v1/consignments/receivals/987654</pre><h3>Wrap-up</h3><p>Business resources provide a context for interaction with a business capability and business data. A key aim of a REST model is composability, cohesion and stability, allowing client systems to compose data via self-service integration without a blocking dependency on external teams.</p><p>A good REST model will strike a balance between <strong><em>composability</em></strong><em> </em>and<em> </em><strong><em>cohesion, </em></strong>providing cohesive units of business data of interest to client systems, though not superfluous to their needs. This may be achieved by modelling supporting elements as sub-resources on their own path, and facilitating parameter-driven queries and field selection.</p><h3>Related Articles on Medium</h3><ul><li><a href="https://medium.com/api-center/api-design-practice-7fce69e6336c">API Design Practice. A practical guide to API QA…</a></li><li><a href="https://medium.com/api-center/api-bites-7373b2127ed1">API Bites — API Path Conventions</a></li><li><a href="https://medium.com/api-center/api-bites-payload-conventions-76ffde7f5eb2">API Bites — Payload Conventions</a></li><li><a href="https://medium.com/api-center/api-bites-binary-and-multi-part-content-283ef69fc5e9">API Bites — Binary and Multi-Part Content</a></li><li><a href="https://medium.com/api-center/api-bites-filtering-conventions-8a1a19c03975">API Bites — Filtering Conventions</a></li><li><a href="https://medium.com/api-center/the-engine-of-application-state-92bfdce0d41c">The Engine of Application State. Aligning HATEOAS, Affordances and Business Events…</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f25afd2b2df" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-center/api-design-pattern-for-business-resource-apis-6f25afd2b2df">Design Patterns for Business Resource APIs</a> was originally published in <a href="https://medium.com/api-center">API Central</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Design Practice]]></title>
            <link>https://medium.com/api-center/api-design-practice-7fce69e6336c?source=rss----fdf1e8e629d7---4</link>
            <guid isPermaLink="false">https://medium.com/p/7fce69e6336c</guid>
            <category><![CDATA[api-first]]></category>
            <category><![CDATA[api-design]]></category>
            <category><![CDATA[data-modeling]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[api-governance]]></category>
            <dc:creator><![CDATA[TRGoodwill]]></dc:creator>
            <pubDate>Tue, 09 May 2023 08:27:53 GMT</pubDate>
            <atom:updated>2025-04-06T09:13:55.447Z</atom:updated>
            <content:encoded><![CDATA[<h4>A practical guide to API QA and the design of stable, coherent and composable business resource APIs</h4><h3>Introduction</h3><p>An API specification document is a technical artifact, offering little opportunity for meaningful and timely input from business and enterprise stakeholders. It is absolutely the wrong place to begin designing an API. When building an enterprise API catalog of reusable, stable, coherent and composable APIs, <strong><em>an enterprise-guided, domain-oriented API Design Practice is essential</em></strong>.</p><p><strong>This guide will cover:</strong></p><ul><li>API Design Goals</li><li>Early and Continuous Stakeholder Engagement</li><li>Iterative, Collaborative Design</li><li>Model Driven, API-First Development</li><li>API Design Tooling</li></ul><h3>API Design Goals</h3><p>The API Design Phase is centered around the capture and validation of the domain data model and the state-lifecycle of business resources. The quality of the data / REST model has significant impact on the usability, evolvabilty and security of an API.</p><p>Collaborative design workshops and modeling tools will allow a diverse group of stakeholders, from business owners, enterprise and domain architects, data modelers, security architects, REST and EDA SMEs, tech leads and developers, to interact with (and contribute to) the same domain data model, and be notified of changes that interest them.</p><p>In this way, the domain model “<em>acts as a </em><a href="https://martinfowler.com/bliki/UbiquitousLanguage.html"><em>Ubiquitous Language</em></a><em> to help communication between software developers and domain experts</em>” (<a href="https://martinfowler.com/bliki/BoundedContext.html">Fowler, M 2014, BoundedContext</a>), maximizing collaboration, providing the tightest possible feedback loop, and ensuring that the domain model remains the definitive source-of-truth.</p><h4>Align Resource APIs with your Business Domain</h4><p>From the business information, events and processes managed by a System-of-Record business service, are abstracted one or more canonical business resource APIs. Business resources represent the nouns of a system, such as ‘<em>applications</em>’ and ‘<em>applicants</em>’. They provide a context for interaction with a business capability, represent the business facts about a business domain, and when consistently modeled and cataloged, they become the backbone of a federated, self-service data &amp; services platform.</p><h4>Design for Composability</h4><p>Microservices architectures and the REST architectural style enable decoupling, self-service and re-use by moving the responsibility for choreography from the resource server to the client. This shift in responsibility allows business systems to build stable, genericised interfaces to their business resources and capabilities, without tight coupling to client systems, which in turn allows client systems to compose data via self-service integration without a blocking dependency on external teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*kwxXP-6IOTsvJvneseAd2A.png" /></figure><p>API clients will typically want access to core information about a specific business object, not complex data structures, and they want it FAST.<em> </em>A good REST model is concerned with finding a balance between granularity and cohesive units of business data likely to be of interest to client systems (though not superfluous to their needs). In short, <em>balancing </em><strong><em>composability</em></strong><em> with </em><strong><em>cohesion</em></strong>.</p><h3>Early and Continuous Stakeholder Engagement</h3><p>Business domain expertise and enterprise API Design Standards inform The API Design Phase. A REST model provides the means for external systems to securely interact with business objects, data and processes via standard, generic RESTful operations. The quality of the model has significant impact on the usability, evolvabilty and security of an API.</p><p>There are many stakeholders invested in shaping and validating the model, stakeholders may include:</p><ul><li>Business owner (domain expert),</li><li>Domain architect,</li><li>Enterprise architects (Security, Data)</li><li>API Platform REST SME,</li><li>Tech lead / API Developers</li><li>Closely aligned client application teams.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*fNMDbxCq5HXw6tPcTmBZgw.png" /></figure><h3>Iterative, Collaborative Design</h3><h4>Preparation and Planning</h4><p>During the <strong><em>planning phase</em></strong> of the project, identify and engage a representative from each of the above-mentioned stakeholder groups. Consider whether there may be closely aligned client application teams or other invested parties that can contribute valuable feedback, and identify a representative from each of these teams.</p><p>Identify the tools that you will use for the process and ensure that stakeholders are provided access. Developers/modellers should familiarize themselves with tools, processes and enterprise <a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7">API design standards</a> prior to commencing the process.</p><p>“Bottom up” analysis of legacy systems can be helpful — but ONLY as a means for engineers to bring knowledge of as-is implementation into the room as a contribution to the larger discussion.</p><h4>Remember that the process is iterative</h4><p>Capture your understanding of the domain as early as possible — and use collaborative tools and a shareable model to elicit corrections and input from stakeholders.</p><p><em>More on API Standards:</em></p><p><a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7">Writing API Design Standards</a></p><h3>1. Conduct Design Workshops</h3><p>Set up an initial workshop with domain SMEs — those with a deep understanding of the business processes, regulatory obligations etc. Collaborative domain-oriented design workshops such as <a href="https://openpracticelibrary.com/practice/event-storming/">Event Storming</a> are a forum for <strong><em>mutual discovery, validation and agreement</em> on models</strong>, boundaries and business events.</p><p>When running <strong>design workshops </strong>(onsite or online) with a number of stakeholders, a collaborative white-boarding tool will allow you to capture, share and validate perspectives on business events, processes, actors and entities. The Event Storming technique can provide some structure to design workshops, and a means to capture collective knowledge about the domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*QNBl76BW7WaPvwXzuF_N7w.png" /></figure><p>A brief overview of the Event Storming process is as follows:</p><ol><li><strong>Identify a scenario:</strong> A short and focused bullet-point description of the process to be captured.</li><li><strong>Identify events:</strong> the things that are happening in your domain (such as “courses selected” or “payment details provided”) — written in past tense and expressed as a flow or sequence.</li><li><strong>Capture commands and aggregates/entities: </strong>as well as actors, external systems, processes/policies and problems/hot-spots as appropriate.</li><li><strong>Identify bounded contexts:</strong> independent clusters of common language and functionality — each bounded context should be ‘decoupled’, expressing its own model, and its own API/s.</li></ol><p>The Event Storming process employs coloured ‘sticky notes’ (either physical or digital) to explore, organise and iterate on emerging elements of the scenario. Time-boxing phases of the workshop is an important element of the process. A <a href="https://miro.com/miroverse/event-storming/">Miro Event Storming Template</a><strong> </strong>will help you get started.</p><p>A validated high-level view of business events, commands, aggregates &amp; entities is a key input into the domain data model.</p><h3>2. Model the Data &amp; Continuously Validate</h3><p>Capture the aggregates/entities that emerge from design workshops in collaborative data modelling tooling and engage key stakeholders to validate and enrich the model. Consider <a href="https://medium.com/api-center/api-bites-payload-conventions-76ffde7f5eb2">Enterprise Naming Conventions</a>.</p><p>Explore with <strong><em>enterprise data architects and domain architects</em></strong> the applicability of industry models and formalisms, and re-use of ‘enterprise’ entity arch-types such as address data structures etc. A searchable model repository will streamline this activity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*OPAdf5zNIZMCcMCI.png" /></figure><p>As soon as baseline agreement on the data managed by a system-of-record emerges, seek the advice of <strong><em>security architecture</em></strong> on the classification, caveats and controls applicable to the data. Make annotations in the model against each entity.</p><p>Consider <a href="https://medium.com/@trgoodwill/api-design-pattern-for-business-resource-apis-6f25afd2b2df">REST Modelling Guidance</a>, and validate composability and cohesion with <strong><em>API competency REST SMEs</em></strong> as the model develops. When developing the REST layer, consider <a href="https://medium.com/api-center/api-bites-7373b2127ed1">Enterprise API Path Conventions</a> and <a href="https://medium.com/api-center/api-bites-request-and-response-protocols-1f3a4f34cecf">HTTP Request and Response Protocols</a>.</p><p>Iterate and circulate significant model changes to the wider group of stakeholders as often as possible — design tooling should assist with stakeholder notification.</p><p><em>More on Modelling Resource APIs:</em></p><p><a href="https://medium.com/api-center/api-design-pattern-for-business-resource-apis-6f25afd2b2df">Design Patterns for Business Resource APIs</a></p><h3>3. Generate and Refine your API Specification</h3><p>When the model is <em>relatively</em> stable, create a versioned snapshot of the model and generate a prototype API specification for technical review and validation. Version aligned API specifications are generated from the REST model, based on standards and policy-conformant rules or templates.</p><p>You may choose to work with an initial version “0.x.x” prototype API spec until you are ready to publish. Remember that b<em>eyond an initial V1, </em><a href="https://medium.com/api-center/api-bites-1af949efdd1b"><strong><em>major version increments</em></strong></a><strong><em> must only apply to breaking changes to production (‘live’) APIs</em></strong><em>.</em></p><h4>Validation and Refinement of your API Specification</h4><p>API definition documents, whether hand-crafted, generated or pre-existing, will need to be reviewed and <strong><em>technically</em> <em>validated</em></strong>, and in many cases further refined.</p><p>Use an IDE with OpenAPI/AsyncAPI document linting support — it will provide immediate feedback on API quality and mandatory API document rules.</p><p>API document linting rules should be clearly defined. <a href="https://github.com/stoplightio/spectral/blob/develop/docs/reference/openapi-rules.md">Spectral OpenAPI rules</a> are widely referenced as a base OpenAPI document ruleset.</p><p><em>More on API document linting:</em></p><p><a href="https://medium.com/api-center/api-documentation-rules-192c127cf401">API Documentation Rules</a></p><h3>Model Driven, API-First Development</h3><p>API-first is a micro-or-modular service development model that treats APIs as the primary means of interacting with a business capability and the business facts about a domain.</p><p>As a primary product of a service, the API is designed first, and used as a template for the service implementation. When building from a validated domain model and API definition document, product teams can take advantage of code generators to accelerate development.</p><p>From the API definition document, OpenAPI &amp; AsyncAPI Generators can automatically create a consistent scaffold/skeleton implementation for supported languages (e.g. Java/Spring, Node.js). Mock servers and API Tests can also be generated from the API specification document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B7WdbVuY-Ha9uaahD784MQ.png" /></figure><p>For development to be both API-First and Model Driven, the API specification origin and source-of-truth must be the validated domain model.</p><h4>Legacy and Proprietary COTS/SaaS APIs</h4><p>Legacy or COTS/SaaS API definition documents without a sharable data model are more difficult to validate, evolve and map to the enterprise context. However this situation arises when an organization is in transition to new platforms and architectures. Consider:</p><ul><li>Retrospectively capturing the API data model with Model-Driven-Design tooling.</li><li>Which elements of the API and/or OpenAPI document may be iteratively refined/refactored to align with API &amp; document rules.</li><li>Whether a tactical “anti-corruption-layer” integration solution can provide a clean and conformant API</li></ul><h3>API Design Tooling</h3><h4>Design Workshop Tools</h4><p>The ‘<a href="https://openpracticelibrary.com/practice/event-storming/">Event Storming</a>’ technique is white-board centered design workshop amenable to live online collaboration. <a href="https://miro.com/miroverse/event-storming/">Judith Birmoser’s Event Storming template</a><strong> </strong>for the the Miro digital white-board platform, or an <a href="https://app.mural.co/template/15ae8c65-6f71-44bf-bb6f-7db5d166de29/2e2cb128-5afb-450c-9a32-05db14b57f60">Event Storming template for Mural</a> is an easy way to get started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*R1_LdH8deEntNpmaJmdrhw.png" /></figure><p>Some additional Event Storming resources:</p><ul><li><a href="https://openpracticelibrary.com/practice/event-storming/">Event Storming (openpracticelibrary.com)</a></li><li><a href="https://virtualddd.com/learning-ddd/ddd-crew-eventstorming-glossary-cheat-sheet">Virtual Domain-Driven Design — A community of practise</a></li><li><a href="https://www.eventstorming.com/">EventStorming (eventstorming.com)</a></li></ul><h4>Domain Data Modelling &amp; Model Driven Design tooling</h4><p>Domain modelling tooling should support OpenAPI/AsyncAPI document generation, source control, and management of semantic versioning across the model and its derivative artifacts<em> </em>— features that are helpful in maintaining the currency and traceability of published APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oc4yI2H2_bhC6nFFAxtH6w.png" /><figcaption>The <a href="https://jargon.sh/">Jargon </a>Domain Data Modelling Platform</figcaption></figure><p>Other platform features strongly supportive of model driven development include design-time model validation, documentation of state-lifecycles, (e.g. state-lifecycle diagrams), mapping and management of dependencies, notification management, and model discoverability, sharing and re-use.</p><p>Domain Data Modelling tooling (<em>with widely varying feature-sets</em>) includes:</p><ul><li><a href="https://jargon.sh/">Jargon Domain Data Modelling Platform</a></li><li><a href="https://stoplight.io/enterprise">Stoplight Studio Enterprise</a></li><li><a href="https://www.visual-paradigm.com/solution/rest-api-design-tool/">Visual Paradigm</a></li><li><a href="https://docs.mendix.com/refguide/domain-model/">Mendix Low-Code Platform</a></li><li><a href="https://hackolade.com/help/OpenAPI.html">Hackolade Studio</a></li><li><a href="https://www.sparxsystems.de/">Sparx EA</a> + <a href="https://inteca.com/enterprise-architect-plugins/">OpenAPI plugin</a></li></ul><h4>API Specification Technical Validation Tooling</h4><p>OpenAPI document linting against customisable <a href="https://github.com/stoplightio/spectral/blob/develop/docs/reference/openapi-rules.md">Spectral OpenAPI rules</a> is widely supported across a number toolsets, including the following:</p><ul><li><strong>The </strong><a href="https://jargon.sh/"><strong>Jargon platform</strong></a> supports Spectral linting at the domain data and REST model layers.</li><li><a href="https://code.visualstudio.com/"><strong>Visual Studio Code</strong></a> : Install the <a href="https://marketplace.visualstudio.com/items?itemName=stoplight.spectral">‘Spectral’ extension by Stoplight</a>. Rule errors and warnings are listed in the Problem console, and is updated dynamically as changes are made.</li><li><a href="https://stoplight.io/studio"><strong>Stoplight Studio</strong></a> : Upload an OpenAPI or AsyncAPI specification and spectral will provide immediate dynamic feedback. The warning icon will toggle a side-by-side view.</li><li><strong>CI/CD pipeline </strong>: Build pipelines can support linting of your OpenAPI definition with tools such as <a href="https://stoplight.io/open-source/spectral">Spectral</a> or <a href="https://github.com/daveshanley/vacuum">Vacuum</a> to ensure timely feedback on document quality issues.</li></ul><h4>Code Generation Tools</h4><p>There are various locally configurable generators available for different programming languages. Here are some resources:</p><ul><li><a href="https://swagger.io/tools/">OpenAPI Design &amp; Documentation Tools | Swagger</a></li><li>OAS OpenAPI generators: <a href="https://openapi-generator.tech/docs/generators/">https://openapi-generator.tech/docs/generators/</a> and <a href="https://github.com/OpenAPITools/openapi-generator">https://github.com/OpenAPITools/openapi-generator</a></li><li>Various OpenAPI Tools: <a href="https://openapi.tools/">https://openapi.tools/</a></li></ul><h4>Test Generation</h4><p>The following is a (non-exhaustive) list of testing platforms that support test generation from an OpenAPI and/or AsyncAPI specification document:</p><p><a href="https://www.postman.com/">Postman API Platform</a>, <a href="https://www.thunderclient.com/">Thunder Client — Extension for VS Code</a>, <a href="https://github.com/karatelabs/karate">karatelabs/karate</a>, <a href="https://docs.pact.io/">Pact (pact.io)</a>, <a href="https://katalon.com/">Katalon Quality Management</a>, <a href="https://insomnia.rest/">Insomnia API Dev Platform</a>, <a href="https://www.soapui.org/docs/rest-testing/">SOAPUI</a>, <a href="https://github.com/rest-assured/rest-assured">REST-Assured</a> + <a href="https://github.com/Cornutum/tcases/blob/master/tcases-openapi/README.md#tcases-for-openapi-from-rest-ful-to-test-ful">Tcases</a></p><h3>Wrap-up</h3><p>An API specification document is a technical document. It is often generated well into the development effort, and is difficult for less technical stakeholders to parse. Without a guided API design practice, a large enterprise will struggle to govern the quality of business APIs.</p><p>In order to maximize opportunities for stakeholder collaboration and provide the tightest possible feedback loop, it important to capture, share and validate REST models well before anything is committed to code. A clearly defined and supported API design practice can ensure that both APIs and their underlying data models are visible, re-usable and governable.</p><h3>Related Articles on Medium</h3><ul><li><a href="https://medium.com/@trgoodwill/api-design-pattern-for-business-resource-apis-6f25afd2b2df"><strong>Design Patterns for Business Resource APIs</strong></a></li><li><a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7"><strong>Writing API Design Standards</strong>. An 8-step guide to tailoring resource API design standards to your organisational context</a></li><li><a href="https://medium.com/api-center/api-documentation-rules-192c127cf401"><strong>API Documentation Rules.</strong> Improving the quality and consistency of APIs with OpenAPI documentation and linting rules</a></li><li><a href="https://medium.com/api-center/api-lifecycle-management-9fb0caaa41de"><strong>API Lifecycle Management</strong>. Shaping an API lifecycle model for your organisational context</a></li><li><a href="https://medium.com/api-center/introducing-events-into-your-api-management-framework-958e80121499"><strong>Introducing Events </strong>into your API Management Framework | API Central</a></li><li><a href="https://medium.com/api-center/api-governance-3be87aab17b4"><strong>API Governance.</strong> Principles for Effective Enterprise API Governance</a></li><li><a href="https://medium.com/@jargon-sh/an-iterative-approach-to-data-and-api-management-24a9a000ef07"><strong>An iterative approach to Data and API management</strong> | by Alastair Parker | Sep, 2022 | Medium</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fce69e6336c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-center/api-design-practice-7fce69e6336c">API Design Practice</a> was originally published in <a href="https://medium.com/api-center">API Central</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Documentation and Validation Rules]]></title>
            <link>https://medium.com/api-center/api-documentation-rules-192c127cf401?source=rss----fdf1e8e629d7---4</link>
            <guid isPermaLink="false">https://medium.com/p/192c127cf401</guid>
            <category><![CDATA[api-documentation]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[open-api]]></category>
            <category><![CDATA[api-validations]]></category>
            <category><![CDATA[api-linting]]></category>
            <dc:creator><![CDATA[TRGoodwill]]></dc:creator>
            <pubDate>Fri, 05 May 2023 10:42:39 GMT</pubDate>
            <atom:updated>2025-03-13T10:49:39.794Z</atom:updated>
            <content:encoded><![CDATA[<h4>Improving the Quality and Consistency of APIs with OpenAPI Documentation Rules and API Validation / API Linting Rules</h4><h3>The OpenAPI Specification (OAS)</h3><p>The OpenAPI Specification (OAS) defines a standard, programming language agnostic interface description for REST APIs. Importantly, the specification is widely supported by API Management platforms, development frameworks, testing platforms, code generation tools, and by a number of modelling platforms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*UBdxyCcf99nsBjmkHRoy-A.png" /><figcaption>The OAS <a href="https://swagger.io/blog/api-design/openapi-driven-api-design/">specifies the rules and syntax</a> required to describe the API’s interface.</figcaption></figure><p>Adoption of the most current, generally supported specification version is recommended. Take the time to research the level of support offered by commercial API management platforms — including both gateway and developer portal support for key features.</p><h3>High Level Documentation Rules</h3><p>API developers should familiarise themselves with <a href="https://swagger.io/specification/"><em>OAS specification guidance</em></a><em> </em>and align with enterprise <a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7"><em>API design guidance</em></a><em>.</em> When defining <strong><em>RESTful </em></strong>resource APIs, developers (and OpenAPI templates) should adhere to the following high level documentation rules:</p><ul><li><strong>An OpenAPI v3.x document</strong> will ideally <em>model a single resource</em> to aid comprehension and discoverability and to control the impact of changes. The OpenAPI document must fully document the API, including <a href="https://swagger.io/docs/specification/v3_0/authentication/"><em>security schemes</em></a>, and must be <a href="https://medium.com/api-center/api-bites-1af949efdd1b"><em>versioned</em> with semantic versioning</a>. Breaking changes to production APIs must be republished as a new major version on a new versioned endpoint.</li><li><strong>The name of the API </strong>should be meaningful and should reflect the name of the business resource — e.g. <em>‘applications’.</em> In the case of complex or legacy APIs, the name of the API should clearly identify the business service or process. The API name should align across the OpenAPI document name, the documented API ‘title’ and the catalog display name.</li><li><strong>Resource names </strong>must follow <a href="https://medium.com/api-center/api-bites-payload-conventions-76ffde7f5eb2">API Naming Conventions</a> and will be a plural noun such as ‘<em>applications</em>’ or ‘<em>applicants</em>’. The name of the API resource &amp; document should NOT be name-spaced with leading name-parts; the path and API grouping should provide the domain namespace and if necessary, a sub-domain (product or operational group). e.g. /membership/v1/applications <strong>NOT </strong>membership-applications</li><li><strong>The API path </strong>must clearly identify addressed resources. Ensure that hierarchical, namespaced <a href="https://medium.com/api-center/api-bites-7373b2127ed1">API Path Conventions</a> are followed.</li><li><strong>OpenAPI document case conventions</strong> must align with API naming conventions — i.e. lowerCamelCase</li><li><strong>An OpenAPI </strong><a href="https://swagger.io/docs/specification/v3_0/api-general-info/"><strong>“info” object</strong></a><strong> </strong>must be provided and contain an API “description”, the API “version” and “contact” information;</li></ul><pre>A **&#39;title&#39;** field is required containing a user-friendly display name of your API.<br>The **&#39;version&#39;** field MUST contain the full semantic version number of the API - {MAJOR}.{MINOR}.{PATCH} - e.g. &quot;version: 2.3.1&quot;<br>The **&#39;description&#39;** field MUST contain a clear business description of the API.<br>The **&#39;contact&#39;** object MUST contain a monitored contact email address and/or URL that the client can use to contact the team with issues and comments.</pre><pre>&quot;info&quot;: {<br>     &quot;title&quot;: &quot;MyAPI&quot;,<br>     &quot;version&quot;: &quot;1.1.3&quot;,<br>     &quot;description&quot;: &quot;This API provides abc services for use in the xyz context&quot;,<br>     &quot;contact&quot;: {<br>         &quot;email&quot;: &quot;myapi.support@db.com&quot;<br>     } <br> }</pre><ul><li><strong>API request and response </strong><a href="https://swagger.io/docs/specification/v3_0/adding-examples/"><strong>examples</strong></a><strong> </strong>must be provided wherever possible in the specification document to assist client developers.</li><li><strong>Mandatory fields </strong>must be marked as “required”<strong> </strong>in the API specification. The API specification is a contract — where a field is required for successful processing, it <strong>MUST </strong>be included in the “required” array.</li><li><strong>Resource Id fields </strong>must be immutable, and flagged ‘readOnly’. The readOnly schema property (<em>readOnly: true</em>) means that it is not included in POST/PUT/PATCH payload descriptions.</li></ul><pre>&quot;orderId&quot;: {<br>    &quot;type&quot;: &quot;integer&quot;,<br>    &quot;readOnly&quot;: true,<br>    &quot;format&quot;: &quot;int64&quot;<br>}</pre><ul><li><strong>A </strong><a href="https://swagger.io/docs/specification/v3_0/components/"><strong><em>components.schemas</em></strong></a><strong> definition </strong>must be created and <a href="https://swagger.io/docs/specification/v3_0/using-ref/">referenced</a> for anything other than a trivial payload body. Resource instance payloads will be aligned across POST (request), PUT (request), GET (response) and PATCH (update), and <a href="https://learn.openapis.org/specification/components.html">common schemas should be re-used</a> where possible. To minimize duplication and redundancy in cases of unavoidable variance, consider <a href="https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism/"><em>Inheritance and Polymorphism</em></a>.</li></ul><h3>API Validation</h3><p>Governance of API design standards and security policy compliance must be automated wherever possible. OpenAPI document linting is supported by some IDEs, and CI/CD pipelines incorporating OpenAPI document linting can provide feedback on API quality and enforce mandatory API standards and patterns.</p><h4>Open Source OpenAPI/AsyncAPI Linters</h4><p><a href="https://stoplight.io/open-source/spectral">Spectral</a> and <a href="https://github.com/daveshanley/vacuum">Vacuum</a> are widely used open-source OpenAPI/AsyncAPI document linters, and <a href="https://github.com/stoplightio/spectral/blob/develop/docs/reference/openapi-rules.md">Spectral OpenAPI rules</a> (supported by both of these tools) are widely referenced as a base OpenAPI document ruleset. These rules may be easily modified or extended to provide automated API document quality governance in alignment with <a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7"><em>API design guidance</em></a>. The ruleset includes both stylistic warnings and mandatory rules, including:</p><ul><li><strong>info-description:</strong> OpenAPI object info description must be present and non-empty string.</li><li><strong>operation-description:</strong> Under each operation a description must be present and non-empty string.</li><li><strong>operation-operationId: </strong>The operation ID is a reference for the operation, used to suggest a connection to other operations. This parallels HATEOAS referencing. Every operation must have a unique operationId</li><li><strong>operation-success-response:</strong> Operation must have at least one 2xx or 3xx response. If you forget to write out a success case for this API, then this rule will let you know.</li><li><strong>path-declarations-must-exist:</strong> Path parameter declarations cannot be empty, ex./given/{} is invalid.</li><li><strong>path-not-include-query:</strong> Don’t put query string items in the path, they belong in parameters with in: query.</li><li><strong>path-params:</strong> Path parameters are correct and valid. For every parameter referenced in the path string (i.e: /users/{userId}), the parameter must be defined in either path.parameters, or operation.parameters objects. Every path.parameters and operation.parameters parameter must be used in the path string.</li><li><strong>typed-enum:</strong> Enum values should respect the type specifier.</li><li><strong>oas3-operation-security-defined:</strong> Operation security values must match a scheme defined in the components.securitySchemes object.</li><li><strong>oas3-schema:</strong> Validate structure of OpenAPI v3 specification.</li><li><strong>oas3-server-trailing-slash:</strong> Server URL should not have a trailing slash.</li><li><strong>oas3-valid-schema-example:</strong> Examples must be valid against their defined schema. This rule is applied to Schema objects.</li></ul><h4>Rule Severity</h4><p>During deployment to sandbox environments, deployment linting should return only warnings. During deployment to connected dev, integrated testing, acceptance and production environments, linting should return an error severity and fail deployment for infringement of mandatory rules. Product team continuous integration linting should align during these delivery phases.</p><p><strong>Example mandatory rule (validation error):</strong> An “info” object “version” field MUST be present, and MUST contain the full semantic version number of the API , e.g. “version: 2.3.1”. Linting should ensure that the major version number aligns with versioned URLs.</p><p><strong>Example recommendation (validation warning):</strong> API request and response examples SHOULD be included in the specification document to assist client developers.</p><h4>Documentation and Maintenance of Validation Rulesets</h4><p>OpenAPI document linting rules should be clearly defined and documented so that developers understand their responsibilities.</p><p>Extension rulesets can be easily configured via the <a href="https://stoplight.io/welcome">Stoplight</a> free tier (web or locally installed) and must be maintained and made available for integration into IDE tools and CI/CD pipelines by the API platform or competency team.</p><h3>API Validation Tools and Methods</h3><p>There are several methods available to lint your API with spectral, including:</p><ul><li><strong>Visual Studio Code</strong> : Install the <a href="https://marketplace.visualstudio.com/items?itemName=stoplight.spectral">‘Spectral’ extension by Stoplight</a>. Rule errors and warnings are listed in the Problem console, and is updated dynamically as changes are made.</li><li><a href="https://stoplight.io/studio"><strong>Stoplight Studio</strong></a> : Upload an OpenAPI spec, or paste into the code editor, and the spectral base-ruleset will automatically provide feedback. The warning icon will toggle a side-by-side view.</li><li><strong>CI/CD pipeline </strong>: Integration &amp; build pipelines can support linting of your OpenAPI definition with tools such as Spectral or Vacuum to ensure the earliest possible feedback on document quality issues.</li></ul><p>Validation will return non-blocking <strong><em>warnings</em></strong> that align with best practice (‘should’) API design guidance, as well as <strong><em>errors</em></strong> corresponding to mandatory (‘must’) design guidance that should fail code integration and build or deployment of an OpenAPI specification.</p><p><em>More here on </em><a href="https://medium.com/api-center/managing-api-lifecycles-with-model-driven-integrated-devops-3cfcb9eca32e"><em>Model Driven, Integrated DevOps</em></a><em>.</em></p><h3>Wrap-up</h3><p>OpenAPI 3.x is the leading specification for the documentation of synchronous HTTP APIs, and it enjoys widespread platform support. API developers will need to be familiar with both <a href="https://swagger.io/specification/"><em>OAS specification guidance</em></a><em> </em>and enterprise <a href="https://medium.com/api-center/writing-api-design-standards-84cb7cbb3fd7"><em>API design guidance</em></a> in order to produce consistent, quality API documentation. API validation (e.g. <a href="https://stoplight.io/open-source/spectral">Spectral</a>) should be employed to improve the quality and consistency of API documentation and enforce mandatory rules.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=192c127cf401" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-center/api-documentation-rules-192c127cf401">API Documentation and Validation Rules</a> was originally published in <a href="https://medium.com/api-center">API Central</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Lifecycle Management]]></title>
            <link>https://medium.com/api-center/api-lifecycle-management-9fb0caaa41de?source=rss----fdf1e8e629d7---4</link>
            <guid isPermaLink="false">https://medium.com/p/9fb0caaa41de</guid>
            <category><![CDATA[api-strategy]]></category>
            <category><![CDATA[api-design]]></category>
            <category><![CDATA[api-lifecycle]]></category>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[api-development]]></category>
            <dc:creator><![CDATA[TRGoodwill]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 16:48:24 GMT</pubDate>
            <atom:updated>2023-10-23T11:33:55.406Z</atom:updated>
            <content:encoded><![CDATA[<h4>Shaping an API Lifecycle Model for Your Organizational Context</h4><p>A shared API lifecycle model and vocabulary will simplify governance, enhance productivity and underpin practical guidance for developers from design through to release.</p><p>The API Lifecycle model presented in this article is not intended to be prescriptive, rather it is meant to spark consideration, discussion and agreement on a <em>tailored and fit-for-purpose </em>API Lifecycle model.</p><p>This API lifecycle management model will discuss the following facets:</p><ul><li><strong>API lifecycle phases</strong></li><li><strong>API lifecycle states</strong></li><li><strong>API version management</strong></li><li><strong>Design tooling and documentation conventions</strong></li><li><strong>Automation and CI-CD</strong></li></ul><h3>API Lifecycle Phases</h3><p>The API lifecycle is sometimes characterized in terms of production readiness, sometimes in terms of development stages. In an enterprise managed API context, an API lifecycle must encompass both of these perspectives, as well as the reality of multiple environments and pre-production consumer feedback and iteration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7fHSo12Bdv0CNI5PFDML7w.png" /><figcaption>A diagrammatic description of the phases of an API lifecycle</figcaption></figure><h4>Starting point</h4><ul><li><strong>Discovery: </strong>Discovery is outside of the API lifecycle, however it is the setup and the initial entrypoint. It is the process of demand generation, prioritization and planning that results in a prioritized backlog and kickoff of the design phase.</li><li><strong>Evolution: </strong>Observation, evaluation and client feedback on APIs deployed to either test or production environments may trigger design changes. Changes may be breaking or non-breaking.</li></ul><h4>Design</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*ulJIsbCB3W6fFbY3yUWndQ.png" /></figure><ol><li><strong>Model:</strong> Through a process of broad stakeholder consultation, distillation and frequent iteration, a <a href="https://medium.com/@trgoodwill/where-do-business-resource-apis-come-from-472cc8422dec">model of the domain is built</a>. A collaborative, version controlled and readily accessible domain data modelling tool is recommended.</li><li><strong>Validate: </strong>The domain model “<em>acts as a </em><a href="https://martinfowler.com/bliki/UbiquitousLanguage.html"><em>Ubiquitous Language</em></a><em> to help communication between software developers and domain experts</em>”, maximizing collaboration, tightening the feedback loop, and ensuring that the domain model remains the definitive source-of-truth.</li><li><strong>Document:</strong> JSON schema and prototype API specification(s) are generated from the model in conformance with API standards and security policies.</li></ol><p><em>More: </em><a href="https://medium.com/@trgoodwill/where-do-business-resource-apis-come-from-472cc8422dec"><strong><em>Modeling Coherent and Composable Business Resource APIs</em></strong></a></p><h4>Build &amp; Test</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*IeCDxWwIUyp7_hoZumay3w.png" /></figure><ol><li><strong>Build: </strong>The prototype OpenAPI document &amp; JSON schema are inputs into the build phase. The API implementation is built to API design and security standards. The API is deployed to sandpit &amp; Dev environments for iteration &amp; testing, and may be initially back-ended by a mock service.</li><li><strong>Test</strong>: ‘Code-first’ API continuous integration and publishing automation can apply Policy-as-Code controls, enforce mandatory standards with specification linting, and validate security schemes. Deployment and regression testing validates security, function and performance.</li><li><strong>Evaluate:</strong> Testing, client engagement and analytics may inform an evaluation of the API resulting in either <strong>promotion </strong>or <strong>rework</strong>. In a certified CI/CD pipeline, this step may be entirely automated. The API may loop through several test environments and evaluation checkpoints before it is <strong>published </strong>to production.</li></ol><p><em>More: </em><a href="https://medium.com/@trgoodwill/managing-api-lifecycles-with-model-driven-integrated-devops-3cfcb9eca32e"><strong><em>Managing API Lifecycles with Model Driven, Integrated DevOps</em></strong></a></p><h4>Release</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*XBHUG8qpKWA_nlrDKjPoXg.png" /></figure><ol><li><strong>Publish: </strong>APIs that survive the final test and acceptance stage-gate are published to production. APIs might be published to an internal, partner or public facing catalog as appropriate. If a previous version of the API exists, it is deprecated at this point.</li><li><strong>Support &amp; Observe:</strong> The API is actively supported, tested and monitored. Client engagement (comments, issues and notifications) is encouraged via the client portal. Feedback and analysis may provide <strong>insights </strong>that shape the <strong>evolution </strong>of APIs and business processes.</li><li><strong>Deprecate:</strong> As APIs evolve and are republished as a new major version, the previous version must be deprecated — which means maintaining support for a period in order to allow existing clients adequate time to cut-over to the new version. No new clients are able to subscribe to a deprecated API. A retirement schedule should be communicated to subscribed clients.</li><li><strong>Retire:</strong> Once existing clients have cut-over to the new version, and/or the scheduled retirement date arrives, the API is retired, and will no longer be available. Calls to this API will result in a gateway error.</li></ol><h4>Security</h4><p>It is important to note that <strong>securing APIs is not a step</strong> — but rather is embedded into each phase.</p><ul><li>Data is classified and regulatory controls identified during the <a href="https://medium.com/@trgoodwill/where-do-business-resource-apis-come-from-472cc8422dec"><strong>modelling phase</strong></a></li><li><a href="https://medium.com/@trgoodwill/writing-api-design-standards-84cb7cbb3fd7"><strong>API development</strong></a> guidelines outline patterns and tactics to be employed by developers to secure APIs</li><li>API specification linting is applied during <a href="https://medium.com/@trgoodwill/managing-api-lifecycles-with-model-driven-integrated-devops-3cfcb9eca32e"><strong>integration into source control</strong></a></li><li>API management and API gateway security policies are <a href="https://medium.com/@trgoodwill/securing-apis-with-an-integrated-security-framework-bf70569c8919"><strong>enforced on test and production gateways</strong></a></li><li><strong>API testing </strong>incorporates OWASP testing as well as targeted testing against applicable <a href="https://medium.com/@trgoodwill/api-bites-securing-sensitive-api-s-bac6d51fe233">security controls</a></li></ul><p><em>More: </em><a href="https://medium.com/@trgoodwill/api-bites-securing-sensitive-api-s-bac6d51fe233"><strong><em>API Bites — Tactics to Secure Sensitive APIs</em></strong></a></p><h4>API Lifecycle States</h4><p>API Lifecycle states are of particular interest to consumers, as they will have ramifications in terms of stability and support. The lifecycle states of an API are as follows:</p><ul><li><strong>In Design </strong>— feedback encouraged, subject to change at any time.</li><li><strong>In Test </strong>— feedback<strong> </strong>encouraged;<strong> </strong>breaking changes may be made.</li><li><strong>Published</strong> — released to production, stable and actively supported.</li><li><strong>Deprecated</strong> —soon to be retired. New clients are unable to subscribe.</li><li><strong>Retired</strong> — the API has been shut down. The gateway will return errors.</li></ul><h3>Managing API Versions</h3><p>A key aim of business resource APIs is stability. However, in the pursuit of continuous improvement, breaking changes are almost inevitable, and in order to avoid a ‘big-bang’ coordinated cut-over there will occasionally be a need to support more than one version of an API.</p><h4>Versioning APIs</h4><p>Versioned URLs are widely employed for the management of API versions. The scheme is somewhat limiting but uncomplicated, making it easy for clients to comprehend and control which API versions they interact with. This is the default API versioning mechanism in a specification-first managed API environment, and this bite-sized discussion makes the (low-risk) assumption that this scheme will be employed.</p><p>Versioned URLs must <em>only</em> include the MAJOR version as part of the URI, in the format ‘v{MAJOR}’, e.g.</p><pre>/membership/<strong>v1</strong>/applicants</pre><p>The version number typically precedes the resource (and API specification) name in the path — it should never appear between the resource name and the resource ID.</p><p>Minor and patch versions (assuming SemVer versioning) must NOT be included in the URI as such changes are by definition backwards-compatible.</p><p><em>Versioning options and considerations are covered in the article </em><a href="https://medium.com/@trgoodwill/api-bites-1af949efdd1b"><strong><em>Versioning Managed APIs</em></strong></a><strong><em>.</em></strong></p><h4>Semantic Versioning</h4><p>API Models and specifications should be managed with <a href="https://semver.org/">semantic versioning</a>.</p><p>{MAJOR}.{MINOR}.{PATCH}</p><p>Ideally, <a href="https://medium.com/@trgoodwill/api-interoperability-maturity-bb1e5a25dea1">domain modelling tooling would manage semantic versioning</a> across all derivative artifacts.</p><p>As a guide the following rules should apply when incrementing the API version number:</p><ul><li><strong>MAJOR</strong> version when <strong>incompatible</strong> or <strong>breaking</strong> API changes are made,</li><li><strong>MINOR</strong> version when functionality is added in a backwards-compatible manner, and</li><li><strong>PATCH</strong> version when backwards-compatible bug fixes are made.</li></ul><h4>Backwards Compatibility</h4><p>Backwards compatible (minor version) changes include:</p><ul><li>Addition of a <strong><em>new field</em></strong> (non-mandatory) to a representation</li><li>Addition of a <strong><em>new operation</em></strong></li><li>Addition or removal of <strong><em>HATEOAS links</em></strong></li><li>Additional support of a <strong><em>new media type</em></strong> (e.g. Accept: application/pdf)</li></ul><p>The following changes are NOT considered backwards compatible:</p><ul><li><strong><em>Removal of fields</em></strong> from representations</li><li>Changes of <strong><em>field data types</em></strong> (e.g. string to boolean)</li><li><strong><em>Removal of an operation</em></strong></li><li><strong><em>Removal of media type</em></strong> support</li><li>New or <strong><em>tightened API security definitions</em></strong></li></ul><h4>Test Environment Break-Fixes</h4><p>Major version increments should apply only to breaking changes to APIs deployed to production, and this can create difficulties when deploying break-fixes to yet-unpromoted APIs in integrated test environments. In this case increment the minor version number and use API analytics to identify and notify active API consumers that are likely to be impacted.</p><h4>Replacing a Major API Version</h4><p><strong>Justify, Document and Socialize</strong>. Introducing a new major API version will impact all consumers. Before deciding to introduce a new major version, API owners should explore all possible alternatives. A decision to introduce a new major version should be documented as an Architecture Decision and API owners should ensure that the potential impacts are discussed in agile planning forums.</p><p><strong>Decouple Cut-over</strong>. The newly deployed version is effectively a new API, and consumers must subscribe to the new API version in order to use it. With each new major version of the API the older versions should be deprecated (no new subscribers) and maintained until all consumers have cut over to the new version. This can add introduce significant complexity on the development and support side.</p><p><strong>Communicate a Retirement Schedule</strong>. Identify consumers and communicate an API deprecation and retirement schedule with sufficient notification. API deprecation and client notification are supported by most API management platforms.</p><p><strong>Retire and Remove the API</strong>. Once there are no remaining subscribers OR when the scheduled retirement date arrives, raise a change to retire the API. Retiring an API is not the same as removing an API — retirement is easily reversible. A change to remove an API should follow service changes that remove support for the old API altogether.</p><h3>Design Tooling and Documentation</h3><h4>API Documentation</h4><p>The OpenAPI Specification (OAS) defines a standard, programming language agnostic interface description for REST APIs. Importantly, the specification is widely supported by API Management platforms, and by a number or domain modelling platforms.</p><p>Adoption of the most current, generally supported specification version is recommended. Take the time to research the level of support offered by commercial API management platforms — including both gateway and developer portal support for key features.</p><p>The “info” object “version” field <strong>MUST</strong> be contain the full semantic version number of the API— {MAJOR}.{MINOR}.{PATCH}</p><pre>info:<br>  version: 1.1.2</pre><p>API request and response examples SHOULD be included in the specification document to assist client developers.</p><p>OpenAPI document linting rules should be clearly defined. <a href="https://github.com/stoplightio/spectral/blob/develop/docs/reference/openapi-rules.md">Spectral OpenAPI rules</a> are widely referenced as a base OpenAPI document ruleset.</p><p><em>More on OpenAPI document and linting rules here:</em></p><p><a href="https://medium.com/api-center/api-documentation-rules-192c127cf401">API Documentation Rules</a></p><h4>Domain-Driven API Design Practice</h4><p>An enterprise domain-driven <a href="https://medium.com/api-center/api-design-practice-7fce69e6336c">API design practice</a> is recommended.</p><p>The domain model “<em>acts as a </em><a href="https://martinfowler.com/bliki/UbiquitousLanguage.html"><em>Ubiquitous Language</em></a><em> to help communication between software developers and domain experts</em>” (<a href="https://martinfowler.com/bliki/BoundedContext.html">Fowler, M 2014, BoundedContext</a>), maximising collaboration, providing the tightest possible feedback loop, and ensuring that the domain model remains the definitive source-of-truth.</p><p>API specifications are generated from the model, in conformance with API standards and security policies. These may be tool generated based on standards and policy-conformant rules or templates, or they may be ‘hand-crafted’ from templates. In either case, peer review is essential.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/0*ThMCkW-5PSTGBsyS.png" /><figcaption>API specifications are generated from the model, in conformance with API standards and security policies.</figcaption></figure><p>Ideally, domain/REST modelling tools will support source control, and manage semantic versioning across the model and its derivative artefacts — features that are helpful in maintaining the currency and traceability of published APIs.</p><p><em>Managing API lifecycles with model driven development, API generation and automation is discussed in </em><a href="https://medium.com/@trgoodwill/managing-api-lifecycles-with-model-driven-integrated-devops-3cfcb9eca32e"><strong><em>Managing API Lifecycles with Model Driven, Integrated DevOps</em></strong></a></p><p><em>More on API Design practice and tooling here:</em></p><p><a href="https://medium.com/api-center/api-design-practice-7fce69e6336c">API Design Practice</a></p><h3>Vertically Integrated DevOps</h3><p>API enabled, interoperable business services often endure considerable friction and blocking engagements coordinating the delivery of new and updated interfaces. A well-defined process of model driven development, complimentary tooling and vertically integrated DevOps can <strong><em>substantially reduce friction between domain model development and delivery</em></strong>.</p><h4>A Single Repository</h4><p>API specification documents and config files should be co-located in a common repository with the service implementation. API Gateway CI-CD pipelines are triggered from the product pipeline.</p><h4>CI-CD Pipeline Enrollment</h4><p>Enterprise endorsed DevOps tools and platforms should be identified in API Lifecycle Management guidance, with <em>links out</em> to more detailed tool and platform-specific documentation and ‘getting started’ resources. Typically, onboarding into lower (dev) environments will present a low barrier, however onboarding an autonomous CI-CD pipeline will require tighter governance and accountability.</p><h4>Compliance with Security Controls and API Design Standards</h4><p>API design standards and security policy compliance is automated wherever possible. Continuous integration and delivery pipelines will apply Policy-as-Code controls, enforce mandatory standards with specification document linting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*OEFQbVvdFXUhA-A4GzqoCA.png" /></figure><h4>Coordinated, Automated Deployment</h4><p>As managed APIs are the interface to deployed microservices, DevOps tooling must ensure that new and updated interfaces and schemas generated by domain modeling tooling and implemented by a business service are published to relevant API management (and potentially event, security and distributed graph) platforms simultaneously with the deployment of the business service. Deployment and testing of APIs must be automated, domain-autonomous and as frictionless as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*FnS0fuAWgVnjSICcnx3riQ.png" /></figure><p>When new versions of an API are deployed, automation must be able to detect and deprecate previous versions (no new subscribers allowed).</p><p><em>Vertically Integrated DevOps is discussed further in </em><a href="https://medium.com/@trgoodwill/managing-api-lifecycles-with-model-driven-integrated-devops-3cfcb9eca32e"><strong><em>Managing API Lifecycles with Model Driven, Integrated DevOps</em></strong></a></p><h3>Registering API Resources with IAM</h3><p>An API lifecycle model should introduce resource registration concepts and refer developer to guidance for the registration of new business resources, data profiles and resource access policies to API Management, Security Token Service (STS) and Identity Access Management (IAM) platforms.</p><p><em>Registration of API resources is further discussed in </em><a href="https://medium.com/api-center/securing-apis-with-an-integrated-security-framework-bf70569c8919">Securing APIs with an Integrated Security Framework</a></p><h3>Wrap-Up</h3><p>A shared organizational understanding of API lifecycles and its corresponding vocabulary will simplify governance and aid communication and productivity. An API Lifecycle model should be tailored to a particular organization context and widely socialized.</p><p>It is important to cover development lifecycle phases, lifecycle states and ramifications for consumers, guidance around API version management, design tooling, documentation conventions and automation/CI-CD. The model must encompass both the overhead and opportunities presented by multiple environments, and pre-production feedback and iteration.</p><h3>Related Discussions</h3><p><a href="https://medium.com/@trgoodwill/writing-api-design-standards-84cb7cbb3fd7">Writing API Design Standards. An 8-step guide</a></p><p><a href="https://medium.com/@trgoodwill/where-do-business-resource-apis-come-from-472cc8422dec">Modeling Coherent and Composable Business Resource APIs</a></p><p><a href="https://medium.com/@trgoodwill/securing-apis-with-an-integrated-security-framework-bf70569c8919">Securing APIs with an Integrated Security Framework</a></p><p><a href="https://medium.com/@trgoodwill/managing-api-lifecycles-with-model-driven-integrated-devops-3cfcb9eca32e">Managing API Lifecycles with Model Driven, Integrated DevOps</a></p><p><a href="https://medium.com/@trgoodwill/api-interoperability-maturity-model-85d0e74c066b">API Interoperability Maturity Model</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fb0caaa41de" width="1" height="1" alt=""><hr><p><a href="https://medium.com/api-center/api-lifecycle-management-9fb0caaa41de">API Lifecycle Management</a> was originally published in <a href="https://medium.com/api-center">API Central</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>