Towards Extracting Web API Specifications from Documentation

被引:13
|
作者
Yang, Jinqiu [1 ]
Wittern, Erik [2 ]
Ying, Annie T. T. [3 ]
Dolby, Julian [2 ]
Tan, Lin [1 ]
机构
[1] Univ Waterloo, Waterloo, ON, Canada
[2] IBM TJ Watson Res Ctr, Yorktown Hts, NY USA
[3] EquitySim, Vancouver, BC, Canada
关键词
D O I
10.1145/3196398.3196411
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Web API specifications are machine-readable descriptions of APIs. These specifications, in combination with related tooling, simplify and support the consumption of APIs. However, despite the increased distribution of web APIs, specifications are rare and their creation and maintenance heavily rely on manual efforts by third parties. In this paper, we propose an automatic approach and an associated tool called D2Spec for extracting significant parts of such specifications from web API documentation pages. Given a seed online documentation page of an API, D2Spec first crawls all documentation pages on the API, and then uses a set of machine-learning techniques to extract the base URL, path templates, and HTTP methods - collectively describing the endpoints of the API. We evaluate whether D2Spec can accurately extract endpoints from documentation on 116 web APIs. The results show that D2Spec achieves a precision of 87.1% in identifying base URLs, a precision of 80.3% and a recall of 80.9% in generating path templates, and a precision of 83.8% and a recall of 77.2% in extracting HTTP methods. In addition, in an evaluation on 64 APIs with pre-existing API specifications, D2Spec revealed many inconsistencies between web API documentation and their corresponding publicly available specifications. API consumers would benefit from D2Spec pointing them to, and allowing them thus to fix, such inconsistencies.
引用
收藏
页码:454 / 464
页数:11
相关论文
共 50 条
  • [1] Inferring specifications for resources from natural language API documentation
    Zhong, Hao
    Zhang, Lu
    Xie, Tao
    Mei, Hong
    [J]. AUTOMATED SOFTWARE ENGINEERING, 2011, 18 (3-4) : 227 - 261
  • [2] Inferring Resource Specifications from Natural Language API Documentation
    Zhong, Hao
    Zhang, Lu
    Xie, Tao
    Mei, Hong
    [J]. 2009 IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, PROCEEDINGS, 2009, : 307 - 318
  • [3] Inferring specifications for resources from natural language API documentation
    Hao Zhong
    Lu Zhang
    Tao Xie
    Hong Mei
    [J]. Automated Software Engineering, 2011, 18 : 227 - 261
  • [4] Inferring specifications for resources from natural language API documentation
    Laboratory for Internet Software Technologies, Institute of Software, Chinese Academy of Sciences, Beijing, China
    不详
    不详
    不详
    [J]. Autom Software Eng, 3-4 (227-261):
  • [5] Generating Chat Bots from Web API Specifications
    Vaziri, Mandana
    Mandel, Louis
    Shinnar, Avraham
    Simeon, Jerome
    Hirzel, Martin
    [J]. PROCEEDINGS OF THE 2017 ACM SIGPLAN INTERNATIONAL SYMPOSIUM ON NEW IDEAS, NEW PARADIGMS, AND REFLECTIONS ON PROGRAMMING AND SOFTWARE (ONWARD!'17), 2017, : 44 - 57
  • [6] Challenges of API Documentation from a Provider Perspective and Best Practices for Examples in Public Web API Documentation
    Bondel, Gloria
    Cerit, Arif
    Matthes, Florian
    [J]. ICEIS: PROCEEDINGS OF THE 24TH INTERNATIONAL CONFERENCE ON ENTERPRISE INFORMATION SYSTEMS - VOL 2, 2022, : 268 - 279
  • [7] Extracting Conceptual Interoperability Constraints from API Documentation using Machine Learning
    Abukwaik, Hadil
    Abujayyab, Mohammed
    Humayoun, Shah Rukh
    Rombach, Dieter
    [J]. 2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING COMPANION (ICSE-C), 2016, : 701 - 703
  • [8] Extracting Attribute-Value Pairs from Product Specifications on the Web
    Petrovski, Petar
    Bizer, Christian
    [J]. 2017 IEEE/WIC/ACM INTERNATIONAL CONFERENCE ON WEB INTELLIGENCE (WI 2017), 2017, : 558 - 565
  • [9] Towards Crowd-Sourced API Documentation
    Uddin, Gias
    Khomh, Foutse
    Roy, Chanchal K.
    [J]. 2019 IEEE/ACM 41ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS (ICSE-COMPANION 2019), 2019, : 310 - 311
  • [10] Generation of Web Frontends from API Documentation with Direwolf Interaction Flow Designer
    Koren, Istvan
    Klamma, Ralf
    [J]. WEB ENGINEERING, ICWE 2018, 2018, 10845 : 492 - 495