<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Z</title>
    <description>The latest articles on Forem by Z (@zdne).</description>
    <link>https://forem.com/zdne</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F637463%2Fcc1d7f13-7a31-443a-afce-635802abd12d.jpeg</url>
      <title>Forem: Z</title>
      <link>https://forem.com/zdne</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/zdne"/>
    <language>en</language>
    <item>
      <title>AI in APIs</title>
      <dc:creator>Z</dc:creator>
      <pubDate>Wed, 16 Nov 2022 12:08:13 +0000</pubDate>
      <link>https://forem.com/superface/ai-in-apis-4ol7</link>
      <guid>https://forem.com/superface/ai-in-apis-4ol7</guid>
      <description>&lt;p&gt;Artificial Intelligence (AI) is making its way into everyday developer life, but the use of AI along the API lifecycle is yet to be improved. For decades APIs have relied on tedious manual work. Tasks like API design, API documentation, discovery, contract, and API integration are primarily manual, but a change is coming.&lt;/p&gt;

&lt;p&gt;APIs can leverage AI, and AI can significantly benefit from APIs. Though the use of AI in APIs is a vast topic, we will split it into two. The first is employing AI (precisely ML – machine learning algorithms) to deliver or integrate APIs. The second topic is enabling AI, which can either mean making AI accessible via APIs or making the APIs accessible to an AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using AI in APIs
&lt;/h2&gt;

&lt;p&gt;Using AI/ML can enhance a developer's life, boost efficiency, and lead to better applications and shorter delivery times. Following are a few examples of employing AI in APIs delivery and consumption.&lt;/p&gt;

&lt;h3&gt;
  
  
  AI client and server code-gen
&lt;/h3&gt;

&lt;p&gt;The most straightforward use of AI/ML is to generate API calls or server code on behalf of a programmer. Solutions like GitHub Copilot can create code stubs, reducing developers' need to write the API calls boilerplate. As a larger corpus of API calls is needed, this approach is primarily suitable for public APIs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mhK6BCUw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3a0g2hdwgu6mcf47684u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mhK6BCUw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3a0g2hdwgu6mcf47684u.png" alt="Screenshot of JavaScript function for fetching a NASA Picture of the Day fully generated by Copilot" width="880" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

API client code generation with GitHub Copilot




&lt;h3&gt;
  
  
  AI API design
&lt;/h3&gt;

&lt;p&gt;A good API design is a function of developer experience and operational efficiency. Algorithm-guided API design can improve the efficient layout of resources. Traffic recording and profiling information from API observability tools (Akita, Optic, Seekret, …) already provide valuable insights and can be the input for the AI-guided API design.&lt;/p&gt;

&lt;p&gt;AI can also aid in designing APIs from the ground up, mapping the use cases into correct API protocol/style semantics. For example, from the operation name "make payment," the algorithm may infer an unsafe, idempotent operation and, therefore, the POST HTTP method.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cmhnyv0B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2prbw7yowutnjod6ocjl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cmhnyv0B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2prbw7yowutnjod6ocjl.png" alt="Screenshot of Jurassic-X prompt: &amp;quot;What HTTP method to use for 'make payment'&amp;quot; and an answer suggesting to use POST method" width="880" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

Jurrasic-X assists in mapping a use case to an HTTP method




&lt;h3&gt;
  
  
  AI API integration
&lt;/h3&gt;

&lt;p&gt;The opposite approach to AI-guided API design is that an algorithm can infer what operation to invoke, what the parameters are, and how to map them from the user input to the expected result. These algorithms can take a business case for an API (e.g., "how to fulfill an order") and API documentation as input and figure out the required API communication to complete the use case.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bVqgW7-I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a40bw89qkm4e0afqf3pt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bVqgW7-I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a40bw89qkm4e0afqf3pt.png" alt="Screenshot of a prompt for OpenAI GPT-3 asking how to fulfill an order and autocompleted answer detailing what HTTP method, URL, parameters, and payload should be used." width="880" height="91"&gt;&lt;/a&gt;&lt;/p&gt;

OpenAI GPT-3 aiding with API integration




&lt;h3&gt;
  
  
  AI API security
&lt;/h3&gt;

&lt;p&gt;Currently, the most mature area is using AI/ML algorithms to analyze valuable information from the API traffic. For example, an algorithm can check whether there are sensitive data in the traffic or when a malicious communication pattern threatens your systems. The existing tools (Traceable, Aiculus) already help security, DevOps, and compliance teams in their work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Levels of enabling AI
&lt;/h2&gt;

&lt;p&gt;Beyond helping developers deliver or consume APIs, AI can greatly benefit from them. Here's how APIs will gradually enable AI.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. APIs as the interface to AI
&lt;/h3&gt;

&lt;p&gt;APIs are vital in making AI and its infrastructure accessible to other applications. Many AI/ML models and algorithms are proprietary (OpenAI) or resource-consuming, so they can't be self-hosted by their users. API is the standard way to make AI available in these cases. The same applies to AI/ML and data science infrastructure (Google, Azure, AWS), where users can develop and run their models.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Self-integrating applications
&lt;/h3&gt;

&lt;p&gt;Self-integrating applications are the revolutionary step in distributed systems. It enables applications to integrate without the need for human intervention. This integration can be direct between two applications or via an intermediary – an integration platform.&lt;/p&gt;

&lt;p&gt;Advanced integration platforms can infer common integration patterns, and when a new application enters the organizational landscape, it can be automatically hooked into the existing applications.&lt;/p&gt;

&lt;p&gt;Several integration platforms already employ algorithms to assist engineers in their repetitive tasks of data mapping and system integrations (Dell Boomi, Snaplogic). Still, we need the new infrastructure to enable applications to integrate without assistance.&lt;/p&gt;

&lt;p&gt;Superface is the pioneer in direct self-integrating applications, enabling them to integrate autonomously without needing an intermediary.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Autonomous applications
&lt;/h3&gt;

&lt;p&gt;An autonomous application can navigate and make decisions in its landscape. Unlike a self-integrating application, an autonomous application can decide which API to connect and when.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The critical difference to the present API clients is that the autonomous applications are programmed for a job, not how the job is executed with a particular API at a given time.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To illustrate, a manufacturing application can be programmed to check the status of the works on the product. However, it is not instructed on how to do it and what APIs to ask. Instead, when executed within a landscape, the application will determine what APIs are available and which ones to call to get the answer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6pMW0wxy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k67shpcsqwjvlbi1q4od.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6pMW0wxy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k67shpcsqwjvlbi1q4od.png" alt="Conceptual scheme of autonomous APIs: the client application asks a landscape registry on what's available and learns how to connect; the API announces to the registry its presence and connection instructions for the client; the API communication is then direct between the client and the API." width="880" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

Autonomous application conceptual scheme




&lt;h3&gt;
  
  
  4. Autonomous Business Integrations
&lt;/h3&gt;

&lt;p&gt;Autonomous business integrations take the concept of autonomous application to the next level. The application can discover and connect to an API without human intervention, but it can also enter a business contract on its user's behalf. The autonomous business integrations (ABI) will fully unlock the digital business-making where software can evaluate, enter or fulfill contracts.&lt;/p&gt;

&lt;p&gt;An example would be a commerce application that needs to send text messages to its users in various countries. At any given time, such an application can quickly evaluate all available API providers, their costs and quality, make the purchase, and send the messages at the best price and quality.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. AI applications
&lt;/h3&gt;

&lt;p&gt;The pinnacle of interfaces for AI is a system where the tasks are not hard-coded in the application. Instead, the application can infer (e.g., for a user's input) what job to execute, the available APIs in its landscape to fulfill the task, and which one to use. This ultimate step will unlock the reasoning AI that would be able to navigate in the universe of humanity's capabilities.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;But if the technological Singularity can happen, it will.&lt;/p&gt;

&lt;p&gt;– &lt;a href="https://frc.ri.cmu.edu/~hpm/book98/com.ch1/vinge.singularity.html"&gt;Vernor Vinge&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;At Superface.ai, we are committed to researching and advancing AI in APIs. We have released the infrastructure for self-integrating applications and are heading forward to introducing the autonomous business integrations and, at a later stage, towards the AI systems.&lt;/p&gt;

&lt;p&gt;If you are working in one of the areas, or you think I've missed one, let me know in comments!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>programming</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Stop the manual API plumbing</title>
      <dc:creator>Z</dc:creator>
      <pubDate>Fri, 25 Mar 2022 13:42:30 +0000</pubDate>
      <link>https://forem.com/superface/stop-the-manual-api-plumbing-5639</link>
      <guid>https://forem.com/superface/stop-the-manual-api-plumbing-5639</guid>
      <description>&lt;p&gt;APIs rely upon bespoke, manual, and tedious work. Typical time sinks are poor documentation, undocumented behavior, non-standard API design, custom authentication schemes, unclear limits, and terms of service. Yet, the real pain comes later when APIs change. Once you lay down the wires, you are in the business of perpetual maintenance. Sure, you can close your eyes and pray, but APIs are a dependency and, potentially, a liability. But it doesn't have to be.&lt;/p&gt;

&lt;p&gt;Most of us want to get to the value delivered over APIs quickly. Chances are you don't care whatever was the fancy API style in 1998. Besides, it will be different with the very next API you need to connect. So why bother?&lt;/p&gt;

&lt;h2&gt;
  
  
  Use-case abstraction
&lt;/h2&gt;

&lt;p&gt;The solution lies in the use-case level abstraction on top of APIs. The concept is simple. If you are an API consumer, integrate with the use-case, &lt;strong&gt;not&lt;/strong&gt; with a provider: “&lt;strong&gt;Send text message&lt;/strong&gt;” vs. &lt;code&gt;POST https://api.twilio.com/:version/messages.json&lt;/code&gt;. If you are a provider, publish your business capabilities: “&lt;strong&gt;Make a payment with PayPal&lt;/strong&gt;” vs. &lt;code&gt;customerPaymentMethodPaypalBillingAgreementCreate(billingAgreementId: $billingAgreementId, customerId: $customerId)&lt;/code&gt; (&lt;a href="https://shopify.dev/api/admin-graphql/2021-07/mutations/customerPaymentMethodPaypalBillingAgreementCreate"&gt;source&lt;/a&gt;). The technicalities of the connection can be dealt with autonomously with the right metadata.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hexagonal architecture
&lt;/h2&gt;

&lt;p&gt;The implications of use-case abstraction are profound. The clean, hexagonal architecture results in decoupling client and server and&lt;br&gt;
enables independent evolution, breaks technical vendor locks, speeds up the development, and radically reduces maintenance.&lt;/p&gt;

&lt;p&gt;To learn about the use-case abstraction for APIs, check out &lt;a href="https://github.com/superfaceai"&gt;Superface GitHub profile&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>api</category>
      <category>architecture</category>
      <category>systems</category>
      <category>startup</category>
    </item>
    <item>
      <title>OpenAPI cures the symptoms, not the disease</title>
      <dc:creator>Z</dc:creator>
      <pubDate>Thu, 24 Mar 2022 14:35:59 +0000</pubDate>
      <link>https://forem.com/superface/openapi-cures-the-symptoms-not-the-disease-2i4h</link>
      <guid>https://forem.com/superface/openapi-cures-the-symptoms-not-the-disease-2i4h</guid>
      <description>&lt;p&gt;At Apiary.io, we were promising to solve one immense pain for developers: API documentation. The pain was so big that developers would rather learn API Blueprint or Swagger (now OpenAPI) instead of writing documentation by themselves. It has turned out developers need more than a reference of the endpoints to build a successful API, something we could never deliver generating documentation from a specification.&lt;/p&gt;

&lt;p&gt;We failed the mission because we were not fixing the root cause: &lt;em&gt;APIs need engineers to integrate APIs&lt;/em&gt;. And now, we are still just serving painkillers with OpenAPI to cover up the symptoms.&lt;/p&gt;

&lt;p&gt;Yes, having a reference is better than an undocumented API. Everywhere where API client self-service matters, additional documentation is needed. But no developer wants to write it. And if someone does, a new extensive problem arrives: How do you keep the documentation in sync with reality?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vqehnZxx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/puawsyro4gnz1dyjpe1f.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vqehnZxx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/puawsyro4gnz1dyjpe1f.jpg" alt="APIs in 2021: Front-end developer + back-end developer = JSON" width="880" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools
&lt;/h2&gt;

&lt;p&gt;So we have built tools. We built testing tools like Dredd to test API description and its API implementation. Mock services for quick prototyping. Interactive documentation for developers to play with the API because the documentation itself is not enough to explain the API clearly. We incorporate all these tools in the pinnacle of "humans connecting the software" – the developer portals.&lt;/p&gt;

&lt;p&gt;And we have built more tools. Because we have not dealt with the core of the problem, we created even more pain points. We looked at our designs and said: Oh, you can’t publish the API because it has a poor design! All the company APIs must look alike because it is easier for human developers to comprehend and connect. So the API guidelines and tools like Spectral were born.&lt;/p&gt;

&lt;h2&gt;
  
  
  Painkillers, not the solution
&lt;/h2&gt;

&lt;p&gt;We keep covering up the symptoms, but we create more problems in the process. I have contributed to all these concepts both as the author of API Blueprint and later as a consultant. And though we left the world in a better place, these tools will not take us much further. What we are doing is not working.&lt;/p&gt;

&lt;p&gt;To move ahead, we need to solve the root cause of the problem. We must stop having people writing API documentation so other people can find it on Google (or internal catalogs) only to bake whatever is in the docs to their software. And when they do, they need to eyeball the documentation as long as they want their integration to work. &lt;em&gt;This might work for software libraries but not for distributed systems&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Cure
&lt;/h2&gt;

&lt;p&gt;So what is the solution? Autonomous APIs. Self-integrating applications. A distributed infrastructure where applications can meet, enter into a contract, and connect based on how they are programmed &lt;em&gt;without knowing each other's implementation details&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Autonomous systems will replace client-facing documentation. They will minimize the time needed for integration, nullify the maintenance, and massively reduce client and server codebases. The API design will be only a matter of performance, not a tool to attract (or not to lose) client developers. Oh, and &lt;em&gt;those annoying API integration tests and invasive integration platforms? They will go away too!&lt;/em&gt; We do not need proxy platforms to connect if our application can self-integrate!&lt;/p&gt;

&lt;p&gt;Let’s fight the disease!&lt;/p&gt;

</description>
      <category>api</category>
      <category>openapi</category>
      <category>tooling</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
