Files
Abstract
The number and variety of Web APIs is growing exponentially. Software engineers need to expend a significant amount of time and effort reading and understanding the accompanying documentation. In addition, system automation may use API to interact with each other. However, this is not always a simple task since the API documentation of a provider can be anything from a single HTML page description through to a complex structure with information spanning several pages. Understanding this wide variety of API documentation structures and styles is therefore a labor intensive and error-prone task for engineers. By providing a machine-learning platform that can extract and standardize API usage information, however, we believe we can accelerate the creation of API-enabled systems by using automation to simplify the task of understanding.
%help both software engineers and automated software applications to interact with other APIs. However, creating unified API specifications is not a simple task due to heterogeneous API documentations.
In this paper we introduce a novel approach to automating and standardizing usage information about APIs, combining several machine-learning algorithms in order to extract key attributes from API documentation and generate a machine readable Open API Specification (OAS).
Our proposed approach uses the content of description and their metadata such as HTML tags to predict OAS API attributes.
We develop i) a content-based learning model that identifies the context of a block of extracted API features; ii) a signature-based machine learning model that recognizes a sequence of successful/unsuccessful extracted API endpoints; and iii) a deep mapping model that pinpoints fine-grained mapping of extracted API attributes to OAS objects. Results of our experiments show that the proposed approach successfully works with an accuracy of 99%, 94% and 97% for content-based learning, signature-based learning, and Deep Mapping of API attributes respectively. We then use the models to produce OAS compliant API Specifications for more than 2,585 public APIs, validate them via API calls and finally deploy the validated APIs to the RunMyProcess software automation platform.