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 条
  • [31] Extracting Design Information from Natural Language Specifications
    Harris, Ian G.
    [J]. 2012 49TH ACM/EDAC/IEEE DESIGN AUTOMATION CONFERENCE (DAC), 2012, : 1252 - 1253
  • [32] Extracting symbolic transitions from TLA+ specifications
    Kukovec, Jure
    Tran, Thanh-Hai
    Konnov, Igor
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2020, 187
  • [33] Inferring Method Specifications from Natural Language API Descriptions
    Pandita, Rahul
    Xiao, Xusheng
    Zhong, Hao
    Xie, Tao
    Oney, Stephen
    Paradkar, Amit
    [J]. 2012 34TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2012, : 815 - 825
  • [34] Mining Effective Temporal Specifications from Heterogeneous API Data
    Wu, Qian
    Liang, Guang-Tai
    Wang, Qian-Xiang
    Mei, Hong
    [J]. JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY, 2011, 26 (06) : 1061 - 1075
  • [35] Mining Effective Temporal Specifications from Heterogeneous API Data
    Qian Wu
    Guang-Tai Liang
    Qian-Xiang Wang
    Hong Mei
    [J]. Journal of Computer Science and Technology, 2011, 26 : 1061 - 1075
  • [36] Mining Effective Temporal Specifications from Heterogeneous API Data
    吴倩
    梁广泰
    王千祥
    梅宏
    [J]. Journal of Computer Science & Technology, 2011, 26 (06) : 1061 - 1075
  • [37] Beyond Specifications: Towards a Practical Methodology for Evaluating Web Accessibility
    Koutsabasis, Panayiotis
    Vlachogiannis, Evangelos
    Darzentas, Jenny S.
    [J]. JOURNAL OF USABILITY STUDIES, 2010, 5 (04) : 157 - 171
  • [38] Improving open data web API documentation through interactivity and natural language generation
    Gonzalez-Mora, Cesar
    Barros, Cristina
    Garrig, Irene
    Zubcoff, Jose
    Lloret, Elena
    Maz, Jose -Norberto
    [J]. COMPUTER STANDARDS & INTERFACES, 2023, 83
  • [39] Improving API Documentation Using API Usage Information
    Stylos, Jeffrey
    Faulring, Andrew
    Yang, Zizhuang
    Myers, Brad A.
    [J]. 2009 IEEE SYMPOSIUM ON VISUAL LANGUAGES AND HUMAN-CENTRIC COMPUTING, PROCEEDINGS, 2009, : 119 - 126
  • [40] Synthesising Linear API Usage Examples for API Documentation
    Alharbi, Seham
    Kolovos, Dimitris
    Matragkas, Nicholas
    [J]. 2022 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2022), 2022, : 607 - 611