A Study of the Effectiveness of Usage Examples in REST API Documentation

被引:0
|
作者
Sohan, S. M. [1 ]
Maurer, Frank [1 ]
Anslow, Craig [2 ]
Robillard, Martin P. [3 ]
机构
[1] Univ Calgary, Dept Comp Sci, Calgary, AB, Canada
[2] Victoria Univ Wellington, Sch Engn & Comp Sci, Wellington, New Zealand
[3] McGill Univ, Sch Comp Sci, Montreal, PQ, Canada
关键词
API; REST; Documentation; Usage Examples; Empirical Study; Controlled Study; Productivity; USABILITY;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Generating and maintaining REST API documentation with usage examples can be a time consuming and expensive process for evolving APIs. Most REST API documentation tools focus on automating the documentation of the API objects, but require manual effort for capturing usage examples. Consequently, REST API developers need to know the cost vs. benefit of providing usage examples in the documentation to prioritize the documentation efforts. To this end, we have performed a controlled study with 26 experienced software engineers to understand problems that REST API client developers face while using an API without usage examples. We found that REST API client developers face productivity problems with using correct data types, data formats, required HTTP headers and request body when documentation lacks usage examples. By following the REST API documentation suggestions from this paper, REST API developers can reduce the errors, improve success rate and satisfaction of API client developers.
引用
收藏
页码:53 / 61
页数:9
相关论文
共 50 条
  • [1] Synthesising Linear API Usage Examples for API Documentation
    Alharbi, Seham
    Kolovos, Dimitris
    Matragkas, Nicholas
    2022 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2022), 2022, : 607 - 611
  • [2] An Observational Study on API Usage Constraints and Their Documentation
    Saied, Mohamed Aymen
    Sahraoui, Houari
    Dufour, Bruno
    2015 22ND INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), 2015, : 33 - 42
  • [3] An Exploratory Study of API Usage Examples on the Web
    Wang, Lijie
    Zou, Yanzhen
    Fang, Lu
    Xie, Bing
    Yang, Fuqing
    2012 19TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC), VOL 1, 2012, : 396 - 405
  • [4] API documentation with executable examples
    Hoffman, D
    Strooper, P
    JOURNAL OF SYSTEMS AND SOFTWARE, 2003, 66 (02) : 143 - 156
  • [5] Synthesizing API Usage Examples
    Buse, Raymond P. L.
    Weimer, Westley
    2012 34TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2012, : 782 - 792
  • [6] Improving API Documentation Using API Usage Information
    Stylos, Jeffrey
    Faulring, Andrew
    Yang, Zizhuang
    Myers, Brad A.
    2009 IEEE SYMPOSIUM ON VISUAL LANGUAGES AND HUMAN-CENTRIC COMPUTING, PROCEEDINGS, 2009, : 119 - 126
  • [7] Unit Tests as API Usage Examples
    Nasehi, Seyed Mehdi
    Maurer, Frank
    2010 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, 2010,
  • [8] APISonar: Mining API usage examples
    Hora, Andre
    SOFTWARE-PRACTICE & EXPERIENCE, 2021, 51 (02): : 319 - 352
  • [9] Visualizing API Usage Examples at Scale
    Glassman, Elena L.
    Zhang, Tianyi
    Hartmann, Bjoern
    Kim, Miryung
    PROCEEDINGS OF THE 2018 CHI CONFERENCE ON HUMAN FACTORS IN COMPUTING SYSTEMS (CHI 2018), 2018,
  • [10] Inappropriate Usage Examples in Web API Documentations
    Hosono, Masaki
    Washizaki, Hironori
    Honda, Kiyoshi
    Nagumo, Hiromasa
    Sonoda, Hisanobu
    Fukazawa, Yoshiaki
    Munakata, Kazuki
    Nakagawa, Takao
    Nemoto, Yusuke
    Tokumoto, Susumu
    Monpratarnchai, Supasit
    2019 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2019), 2019, : 343 - 347