<?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[Stories by Daniel Kocot on Medium]]></title>
        <description><![CDATA[Stories by Daniel Kocot on Medium]]></description>
        <link>https://medium.com/@daniel-kocot?source=rss-c0ccbaf1e0d3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*poglXii3Su0L_qUfzri6bQ.jpeg</url>
            <title>Stories by Daniel Kocot on Medium</title>
            <link>https://medium.com/@daniel-kocot?source=rss-c0ccbaf1e0d3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 02:18:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@daniel-kocot/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Bridging the Gap: API Contracts, Data Contracts, and the Power of API Classification]]></title>
            <link>https://daniel-kocot.medium.com/bridging-the-gap-api-contracts-data-contracts-and-the-power-of-api-classification-14a50955e67e?source=rss-c0ccbaf1e0d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/14a50955e67e</guid>
            <dc:creator><![CDATA[Daniel Kocot]]></dc:creator>
            <pubDate>Fri, 07 Jul 2023 10:30:16 GMT</pubDate>
            <atom:updated>2023-07-07T10:30:16.146Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s2rmHs6l9-sz1T25" /><figcaption>Photo by <a href="https://unsplash.com/@homajob?utm_source=medium&amp;utm_medium=referral">Scott Graham</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>In today’s interconnected digital landscape, seamless integration and efficient data exchange between systems have become paramount for organisations. API contracts and data contracts play vital roles in achieving these objectives. However, by exploring the concept of API classification, we can challenge traditional notions and discover innovative approaches to address integration challenges. This Medium story delves into the world of API contracts, data contracts, and the potential of API classification to revolutionize how we represent and utilize data.</em></p><h3>API Contracts and Data Contracts - The Foundation of Integration</h3><p>API contracts define the rules, specifications, and expectations for communication between software components or services. They lay the groundwork for seamless integration by outlining endpoints, data formats, parameters, and response structures. On the other hand, data contracts focus on the structure, format, and constraints of the data exchanged between systems. They ensure data integrity, accuracy, and interoperability by defining semantics, data types, validation rules, and relationships.</p><h3>The Challenge: Bridging the Gap</h3><p>While API contracts and data contracts are essential, a gap often exists between the representation of data and the services provided by APIs. This is where the concept of API classification comes into play. By classifying APIs based on their purpose and function, we can explore new ways to bridge this gap and enhance integration capabilities.</p><h3><strong>Platform APIs: The First Representation of Data</strong></h3><p>Platform APIs serve as a crucial foundation for data representation. They enable organizations to expose data and provide foundational services for developers and systems to build upon. These APIs focus on data access, retrieval, and basic manipulation. By utilising Platform APIs, we can establish a standardised representation of data and facilitate seamless integration across systems.</p><h3><strong>Service APIs as APIs as a Product</strong></h3><p>The concept of “API as a Product” emphasises treating APIs as standalone products with well-defined functionalities, user experience, and developer support. Service APIs, built following the principles of API as a Product, focus on providing specific business capabilities and value-added services. These APIs encapsulate complex business logic, domain expertise, and data transformation capabilities.</p><h3><strong>The Synergy: API Contracts and API Classification</strong></h3><p>API contracts and data contracts are no longer siloed entities in the realm of integration. By embracing API classification, organizations can leverage the power of Platform APIs to establish a standardized representation of data while utilizing Service APIs to provide valuable business functionalities. This synergistic approach ensures that the data representation aligns with the services exposed by APIs, enabling seamless integration, enhanced scalability, and improved developer experience.</p><h3>Conclusion</h3><p>API contracts and data contracts are essential components in achieving seamless integration and efficient data exchange. However, by challenging traditional notions and embracing the concept of API classification, we can bridge the gap between data representation and service provision. Platform APIs provide the foundational representation of data, while Service APIs, following the principles of API as a Product, offer valuable business functionalities. This holistic approach empowers organizations to build scalable systems, streamline integration processes, and unlock the true potential of data-driven innovation.</p><p>In the dynamic digital landscape, where data is the lifeblood of organizations, the convergence of API contracts, data contracts, and API classification is a powerful force that propels us towards a future of seamless integration and optimized data utilization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14a50955e67e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrations Platforms]]></title>
            <link>https://daniel-kocot.medium.com/integrations-platforms-641ae1dfd04b?source=rss-c0ccbaf1e0d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/641ae1dfd04b</guid>
            <dc:creator><![CDATA[Daniel Kocot]]></dc:creator>
            <pubDate>Sat, 24 Jun 2023 22:57:09 GMT</pubDate>
            <atom:updated>2023-06-24T23:20:44.476Z</atom:updated>
            <content:encoded><![CDATA[<h3>Integration Platforms</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rB0d5Iix84_XKhR1" /><figcaption>Photo by <a href="https://unsplash.com/it/@tirconnaill?utm_source=medium&amp;utm_medium=referral">Jude Mack</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Integration platforms play a crucial role in connecting different systems and are often discussed in API-related contexts. Before delving into integration platforms, it’s essential to address the classification of APIs, which helps determine their value within an API platform. There are two primary levels of API classification:</p><ol><li>Platform APIs: These APIs are located close to the data layer and can be part of the platform itself. They primarily handle reading and writing data streams but don’t involve business logic for data processing.</li><li>Service APIs: These APIs are specifically designed to handle business logic and cater to specialised use cases. They interact with the platform APIs and provide additional functionality or data processing capabilities.</li></ol><p>Platform APIs are consumed by service APIs, creating a specific relationship between the two. To determine the type of API being considered, a decision tree can be utilised.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*lZl7TmkM8lG5qegN05pQug.png" /><figcaption>Decision Tree to determine which type of API to use</figcaption></figure><p>Now, let’s explore the concept of integration platforms. Integration platforms aim to connect disparate systems and consist of middleware that addresses two key scenarios: application integration and data integration.</p><p>Application integration involves the distribution of data and information between applications. This area is often described using “Enterprise Integration Patterns” found in literature. On the other hand, data integration focuses on distributing data across various data stores, typically databases.</p><p>It’s important to understand the term “platform” within this context. An integration platform combines both application integration and data integration scenarios to make them accessible and usable for developers, who are the customers in this context.</p><p>Up to this point, no specific technologies or products have been mentioned intentionally. In a previous story titled “<a href="https://medium.com/@daniel-kocot/all-apis-do-not-have-to-be-rest-ful-72f80dc1a475">Not all APIs have to be Rest(ful)</a>” I introduced the API Interaction Patterns to guide technology selection without delving into implementation details. In line with the classified APIs, an architecture can be designed that resembles traditional application integration from the consumer side. However, it initiates at a deeper level with data integration by providing specific database views. These views can then be elevated to the application integration level using a message/event broker.</p><p>In terms of platform APIs, they can be viewed as events offered through the integration platform in the form of APIs. Service APIs can access these platform APIs to provide relevant information or data to consumers. It’s worth noting that service APIs are not necessarily part of the integration platform itself. This theoretical example demonstrates that an integration platform is a vital component of a comprehensive API platform, enabling the creation of value for an organisation.</p><p>To conclude, integration is not an isolated process but a part of a broader framework that encompasses platforms. It involves both application-level communication and data-level integration. Recognising the significance of the data perspective in integration projects is crucial. Just like APIs, integration projects require substantial effort and consideration to build a successful API platform.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=641ae1dfd04b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[APIcurio: An Integral Part of Your API Program on Kubernetes]]></title>
            <link>https://daniel-kocot.medium.com/apicurio-an-integral-part-of-your-api-program-on-kubernetes-ce9b8c59f709?source=rss-c0ccbaf1e0d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce9b8c59f709</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[discovery]]></category>
            <category><![CDATA[governance]]></category>
            <dc:creator><![CDATA[Daniel Kocot]]></dc:creator>
            <pubDate>Sat, 17 Jun 2023 21:44:22 GMT</pubDate>
            <atom:updated>2023-06-17T21:49:10.498Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OKe5tK_TQH7D-u6g" /><figcaption>Photo by <a href="https://unsplash.com/de/@louishansel?utm_source=medium&amp;utm_medium=referral">Louis Hansel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In the interconnected world of software applications, APIs reign supreme as the linchpin that brings everything together. In such a realm, the efficient management of APIs plays a significant role. To streamline API management, API registries have emerged as indispensable tools, and among them, APIcurio stands out. This open-source API design platform has demonstrated remarkable capabilities for enhancing API programs. This blog post aims to guide you on installing APIcurio on a Kubernetes cluster, adding an API definition to the registry, and how it can generate value for your API program.</p><h4>What is APIcurio?</h4><p>APIcurio is a robust API design platform that provides services like an API Registry, API Designer, and an API Mocking system. It supports OpenAPI 2.0 (Swagger) and OpenAPI 3.0 specifications, enabling the creation, management, and sharing of APIs in a streamlined manner.</p><h4>Installing APIcurio on a Kubernetes Cluster</h4><p>For the purpose of this blog post, we assume that you already have a running Kubernetes cluster. If not, various services like Google Kubernetes Engine (GKE), Amazon Elastic Kubernetes Service (EKS), or Azure Kubernetes Service (AKS) can help you set one up.</p><h4>Step 1: Deploying APIcurio</h4><p>The most convenient way to deploy APIcurio onto a Kubernetes cluster is to use Helm, the package manager for Kubernetes. Helm uses a packaging format called charts, which are a collection of files that describe a related set of Kubernetes resources.</p><p>Use the following commands to add the APIcurio chart repo and install it:</p><pre>helm repo add apicurio https://apicurio.github.io/apicurio-registry-helm-chart<br>helm install my-apicurio apicurio/apicurio-registry</pre><h4>Step 2: Accessing the Deployment</h4><p>Once deployed, you can access APIcurio by using the Kubernetes service that Helm creates. This service exposes the deployment to the rest of your cluster.</p><pre>kubectl get svc my-apicurio-apicurio-registry</pre><p>This command will return the cluster IP and the port on which APIcurio is running. Use these details to access the APIcurio interface.</p><h4>Adding API Definition to the APIcurio Registry</h4><p>To add an API definition, follow these steps:</p><h4>Step 1: Access the APIcurio User Interface</h4><p>Access the APIcurio UI using the cluster IP and port from the earlier step.</p><h4>Step 2: Import the API Definition</h4><p>In the APIcurio UI, click on “APIs” and then click on “Import API.” Select the source of your API definition, which can be a URL or a local file in JSON or YAML format. APIcurio will validate the API definition and add it to the registry.</p><h4>Adding an API Definition to the Registry via APIcurio API</h4><p>Once APIcurio is installed, you can add an API definition to the registry. APIcurio provides a REST API that you can use for this purpose. Here’s a simple example of how to add an OpenAPI definition:</p><ol><li><strong>Create the API Definition:</strong> First, create an OpenAPI definition for your API. You can do this manually or use APIcurio’s visual editor.</li><li><strong>Submit the Definition:</strong> Use the POST /groups/{groupId}/artifacts endpoint to add the API definition to the registry. Before doing so we have to create a group to get the groupId which is needed for the request using the POST /groups endpoint. The payload for the request should like this,</li></ol><pre>{<br>  &quot;id&quot;: &quot;customer care&quot;,<br>  &quot;description&quot;: &quot;In this group can find alle APIs owned by customer care&quot;,<br>  &quot;properties&quot;: {<br>    &quot;custom-1&quot;: &quot;foo&quot;,<br>    &quot;custom-2&quot;: &quot;bar&quot;<br>  }<br>}</pre><p>Include the API definition in the body of the request. Here’s an example using curl:</p><pre>curl -X POST &quot;http://&lt;apicurio-url&gt;/groups/{groupId}/artifacts&quot; -H &quot;Content-Type: application/json&quot; -d @&lt;path-to-your-definition.json&gt;</pre><p>Remember to replace &lt;apicurio-url&gt; with the URL where your APIcurio instance is running and &lt;path-to-your-definition.json&gt; with the path to your OpenAPI definition file.</p><p>Upon successful execution, your API definition will be added to the APIcurio registry and accessible to developers and other stakeholders.</p><h4>The Value of APIcurio in Your API Program</h4><p>APIcurio provides several advantages that can enrich your API program:</p><ol><li><strong>Collaboration:</strong> With its ability to support team collaboration, APIcurio enhances productivity, making it possible for multiple users to concurrently work on the same API design.</li><li><strong>Versioning and Governance:</strong> APIcurio provides API versioning, enabling you to manage different versions of an API. It also aids in API governance, helping enforce consistency across all APIs.</li><li><strong>Documentation:</strong> APIcurio provides a central repository for API documentation, thus increasing the discoverability and understanding of APIs.</li><li><strong>Integration and Compatibility:</strong> APIcurio can easily be integrated into existing development environments. Its support for OpenAPI specifications makes it compatible with a wide array of applications.</li></ol><p>By integrating APIcurio into your Kubernetes cluster, you’re not only simplifying the management of APIs but also enhancing your API program’s overall efficiency and productivity. Hence, APIcurio is more than just an API registry; it’s an essential tool for optimizing your API program.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce9b8c59f709" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All APIs do not have to be Rest(ful)]]></title>
            <link>https://daniel-kocot.medium.com/all-apis-do-not-have-to-be-rest-ful-72f80dc1a475?source=rss-c0ccbaf1e0d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/72f80dc1a475</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[api-interaction-patterns]]></category>
            <dc:creator><![CDATA[Daniel Kocot]]></dc:creator>
            <pubDate>Fri, 21 Oct 2022 13:49:08 GMT</pubDate>
            <atom:updated>2022-10-21T13:49:08.631Z</atom:updated>
            <content:encoded><![CDATA[<p>Once again we visit our development team, which this time has to solve a pretty challenging problem. Because the ideas in the implementation of an API supported by Rest(ful) do not seem to work as desired. Unfortunately, consumers are not getting the data they need, but a lot of data that is not needed. For this reason, consumer feedback tends to be negative. But what went wrong here?<br>But first of all, let’s take a step back and get an identical understanding of the terms API and Rest(ful). Furthermore, I would like to discuss the contexts in which we are moving with regard to APIs.</p><h3>What is an API anyway?</h3><p>APIs represent mechanisms by which two software components communicate with each other via definitions and protocols. The term API stands for <em>Application Programming Interface</em>. The interface can be regarded as a service contract between the two components. This contract defines how the two communicate with each other via requests and responses.</p><h3>What does rest(ful) actually mean?</h3><p>REST is short for <em>Representational State Transfer</em>. REST is based on a set of functions such as GET, PUT, DELETE, etc. that allow clients to access server data. Clients and servers exchange this data using the HTTP protocol. The main feature of a REST API is statelessness. Being stateless means that servers do not store data from clients between requests. Client requests to the server are URLs similar to what is entered in a browser to display a website. The client then receives data structures in response.</p><h3>In what particular contexts do we engage with APIs?</h3><p>We very often use APIs in integration scenarios, where older systems, the so-called legacy systems, need to be linked to more modern software solutions through integration platforms and the use of residual APIs. The provision of digital products represents another opportunity for the use of APIs. Here, providers are no longer concerned with offering a direct product, for example in the form of an application, but only APIs bundled into a product to ensure access to the data. The terms API product and API as a product can be found in literature. The second term makes strong reference to product management thinking, whereas the first is only to be understood as a parenthesis.</p><h3>Rest(ful) as solver of a problem</h3><p>In the course of all the presented contexts, the use of Rest(ful) respectively the Resource style is generally felt to be a first general solution. But as I already noted in the first article of this series, it is very important to know the real use case of an API and also to understand it from the technical side.</p><h3>Alternatives to Rest(ful)</h3><p>If we now look at the technical side, we are moving in the area of tension of the so-called <a href="https://blog.codecentric.de/api-architecture-path-towards-evolutionary-architectures"><em>API Architecture</em></a>. This term is intended to encompass all efforts with regard to architecture and technologies in relation to APIs. Thus, we are also simultaneously experiencing a new movement that is leaving the path of “one size fits all” solutions. In the following, I would now like to take a brief look at three other API styles apart from Rest(ful). These styles are also often referred to as API Interaction Patterns in the literature and thus represent the first level of a technology selection.</p><h4>Tunnel</h4><p>The idea of tunnel style goes back to the idea of Remote Procedure Call (RPC). From a developer’s point of view, this is a very convenient way to provide simple extensions for existing procedures for the purpose of exchange. But the handling around the tunnel, i.e. the technical access to the respective endpoint, made it difficult for the consumer to use. Which led to the availability of a simpler protocol for the “tunnel” with <em>http</em> and led to a proliferation of APIs based on the resource style.</p><h4>Query</h4><p>While with Rest or the Resource style we face one endpoint per resource, with the Query style it is only one endpoint where consumers are enabled to query the resources behind the API. The consumer now gets back exactly the result that matches their query. This in return means that there must be a good knowledge of both the data and the query models on the consumer side.<br>If we now look at the styles shown so far, we see that they are all based on the identical assumption. The consumer is the trigger of the interaction by sending a request and then waiting for a response. But what about when the consumer wants to be informed about every change and does not need to explicitly request.</p><h4>Event-Based</h4><p>Now the event-based style comes into play. With this interaction pattern, the publish/subscribe (PubSub) pattern also makes its way into the infrastructure. Based on events, consumers and producers can be directly connected or a message broker is located between the two for some decoupling. Unlike the other styles, we now find some sort of centralized architecture.</p><h3>Conclusion</h3><p>Back to the initial question. The team should look at the use case again in terms of the data model and examine it on the basis of the API interaction patterns mentioned. This should ensure that consumer feedback is a lot more positive. But this should not only meet the needs of the consumers. It is also a matter of making appropriate decisions with regard to one’s own architecture.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72f80dc1a475" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API guidelines, the lifeline when designing of APIs]]></title>
            <link>https://daniel-kocot.medium.com/api-guidelines-the-lifeline-when-designing-of-apis-93b1a1f8d0ca?source=rss-c0ccbaf1e0d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/93b1a1f8d0ca</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[api-guideline]]></category>
            <category><![CDATA[governance]]></category>
            <dc:creator><![CDATA[Daniel Kocot]]></dc:creator>
            <pubDate>Wed, 24 Aug 2022 14:34:21 GMT</pubDate>
            <atom:updated>2022-08-24T14:34:21.018Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H1v9aEUcbprym2b-" /><figcaption>Photo by <a href="https://unsplash.com/@lucassankey?utm_source=medium&amp;utm_medium=referral">Lucas Sankey</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In my last post, I talked about why designing APIs is a lot of work and can’t just be done on the fly. API guidelines can be a lifeline for the design of APIs.</p><p>The team that we met already last time has now completed the API for the ERP solution in another sprint according to the requirements of the consumers. In the latest sprint, they now have to create another API. This is to enrich the existing API with data from an API that was developed by another team. Such an API is also often described as a third-party API. When comparing their own API with the other one, the team finds that the API definitions are already very different with regard to the use of the OpenAPI specification. When asked, the other team explains that they have defined guidelines as a team, the so-called API guidelines, in order to standardize the design of APIs and to make them verifiable and testable on the basis of the set of rules. In a first step, the guidelines are now copied by our team to be applied immediately. We will later discuss whether this was a good idea.</p><h3>Design needs rules</h3><p>Every design, whether analog or digital, is based on rules. These rules are used to provide answers to questions in the design process at any time, in order to always deliver the same quality and value. In the context of APIs, the rules in large organizations also help to ensure consistency with regard to topics such as compliance and governance. As a reader, you are probably wondering what would happen if APIs were created without a common set of rules. First of all, it will lead to an inconsistent design that will create more confusion than it makes sense. Also, similar concepts will be represented in different ways in the design. Furthermore, sooner or later there will be gaps in the documentation. When we combine these rules, guidelines are created. These guidelines always fit the organization as a whole.</p><h3>Do not copy, but adapt</h3><p>For this reason, rules should not simply be copied. Because rules or guidelines are created by experience and are subject to a high degree of adaptation especially at the beginning. This means that one can be inspired by the leading API-first companies in order to then transfer this rule to one’s own organization and live it in practice. I would like to support this with an example. Using the HTTP error code 429 (Too Many Requests) only makes sense if it is planned to use rate limiting, a control mechanism for incoming and outgoing data traffic for APIs that are planned in the organization. Otherwise, specifying this error code confuses more than it actually creates value.</p><h3>Written down is fine, but not effective</h3><p>Establishing guidelines for day-to-day development in an organization, or at least in parts of it, is a good step in the right direction. From practical experience, we know that written rules can only be checked in an implementation with great effort. Therefore, it is now necessary to transform the written rules into verifiable rule sets. In the case of APIs, this is a simple task with the appropriate tools. When we write API definitions, we are very concerned that they fit the version of the OpenAPI specification. We can check this with validation against the respective schema. Under <a href="https://openapi.tools/#description-validators">https://openapi.tools/#description-validators</a> we find a list of corresponding tools and frameworks in the various programming languages. With the tools <a href="https://redocly.com/redocly-cli/">redocly-cli</a> and <a href="https://stoplight.io/open-source/spectral">Spectral</a> we can adapt the standard validations to the respective needs of the organization or the teams with the help of rule(sets), functions and plug-ins. Both products use a combination of YAML and JavaScript to write the extensions. I would now like to give you a short example of a written rule with Spectral to illustrate the whole thing a little.</p><pre>formats:<br>    - oas3.0<br>extends:<br>    - &#39;spectral:oas&#39;<br>rules:<br>    set-x-amazon-integration:<br>      description: x-amazon-integration must be set.<br>      message: x-amazon-integration is missing<br>      given: $.path[*]<br>      then:<br>        field: x-amazon-integration<br>        function: truthy</pre><p>The OpenAPI extension x-amazon-integration will be checked to see if it is present in the paths object. This is just one of many examples that turn rigid API guidelines into testable rule sets. There are extensions for editors such as Visual Studio Code for both redocly-cli and Spectral, so that the validation becomes part of the writing process, the so-called linting, because a check takes place directly in the editor.</p><h3>Rule sets as part of testing</h3><p>And from the check in the editor, it is not far to validation becoming a part of Continuous Integration within a build or deploy pipeline. And this is also, among other things, where API guidelines become a lifeline for API design. This ensures that a very consistent API design develops over time, which also helps the consumers of the APIs in particular to understand and use them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93b1a1f8d0ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing APIs is very hard work]]></title>
            <link>https://daniel-kocot.medium.com/designing-apis-is-very-hard-work-744a37ff13ad?source=rss-c0ccbaf1e0d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/744a37ff13ad</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[experience-api]]></category>
            <category><![CDATA[api-design]]></category>
            <category><![CDATA[api-development]]></category>
            <dc:creator><![CDATA[Daniel Kocot]]></dc:creator>
            <pubDate>Tue, 31 May 2022 12:00:22 GMT</pubDate>
            <atom:updated>2022-05-31T12:00:22.974Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to a situation from the everyday life of a development team. It is Wednesday and the planning for the upcoming sprint is in full swing. The team is supposed to make estimations regarding a new API to be created for the ERP solution. For all members of the team the solution based on a rest(ful) API seems clear and is estimated to take a small amount of time. During the sprint, after an initial feedback loop with the consumer, it becomes clear that the use case of the interface is not so clear and unambiguous after all. Likewise, the concerns of security were also left out. So at the end of the sprint no API could be provided. Why could misinterpretations and misestimations occur?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M2o9r_577_z8dGQA" /><figcaption>Photo by <a href="https://unsplash.com/@douglasamarelo?utm_source=medium&amp;utm_medium=referral">Douglas Lopes</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Exactly this question is not so easy to answer. Because creating an API with a good experience is not that easy. But what exactly is not simple? As a rule, APIs are created for a specific purpose or known consumers. Mostly also still using the “code first” approach, i.e. the API is created directly when the code is written and then a description is created afterwards. When using code first, the consumers have no chance to test the interface sufficiently for its purpose based on its description. With “API first” now exactly this problem is tried to counteract. However, this can also lead to misinterpretations, since one simply creates an API if the use case and the consumers are not known beforehand. So it would probably be better to call the approach “API by use case first”. For this approach it is also important to get away from the backend of the service and its supposed structure. After all, a description according to the OpenAPI specification says nothing about the architecture of the downstream service that provides the data for the API. After the explanation of the use case, we would like to turn our attention once again to the API consumers. Here, as for a good user experience, the credo “you are not user” applies. Knowing the consumer or consumers of an API is the be-all and end-all here. It can pay off to work with personas in order to narrow down the circle of consumers accordingly. After all, a data scientist has different requirements for an API than an app developer. The team now knows the use case and the consumer(s) and could now start the initial design of the API. Why “could” you, as a reader, will now surely ask yourself. The team knows the business use case, but the provisioning of an API should also establish frameworks regarding the protocol. Is REST really expected on the consumer side or would something asynchronous fit better. Only when this has been sufficiently clarified does it make sense to start with the design.</p><p>To speed up consumer feedback, especially to eliminate misunderstandings, the API is made available with the help of a mock. This is especially important with regard to the data models that are made available via API. With regard to REST, the team can return a single resource or even a collection of resources (collections) via an endpoint of an API. It is also important to talk about the expected error responses of an API and to record this description. At this point, it also makes sense to include a standard such as Problem JSON in order to increase the experience with regard to the API with concrete error responses.</p><p>This shows that even simple API design challenges can be more complicated than they might seem at first glance. Besides design, there are many other interesting topics within the API worlds that I would like to share my thoughts on in the coming issues.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=744a37ff13ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>