chose for the case study. The Compass API is embed-
ded in a complex domain and is a GraphQL API. APIs
of different complexity and using other technology
might have different documentation requirements.
Finally, we also realized several best practices
at once as part of the advanced documentation and
added a best practices section. Therefore, it is not
possible to isolate the effect of a single best practice
candidate. Hence, future research could investigate
the effect of the realization of each single best prac-
tices.
8 CONCLUSION
Learning new APIs is an every-day task for develop-
ers (Meng et al., 2018; Meng et al., 2019; Glassman
et al., 2018) and it is well known, that documentation
is a crucial learning resource for API consumers (Ro-
billard, 2009; Lethbridge et al., 2003; McLellan et al.,
1998). Nevertheless, consumers report that API doc-
umentation only rarely meets their needs (Meng et al.,
2018).
Therefore, we first derive four significant chal-
lenges API providers face when creating public Web
API documentation from 13 expert interviews. These
challenges are unknown customer needs, the diffi-
culty of balancing the coverage of varying informa-
tion needs and keeping documentation concise, the
high effort of creating and maintaining documenta-
tion, and missing guidance and governance. Each of
these challenges provides a starting point for future
research.
Also, code examples comprising code snippets,
tutorials, sample apps, and productive code (Robillard
and DeLine, 2011) play a crucial role in API docu-
mentation (Nykaza et al., 2002; Meng et al., 2018;
Meng et al., 2019; Robillard, 2009; Ko et al., 2007;
Nasehi and Maurer, 2010; McLellan et al., 1998;
Meng et al., 2020; Jeong et al., 2009; McLellan et al.,
1998). Nevertheless, examples have to meet specific
quality criteria to unlock their potential and support
the learnability of APIs (Meng et al., 2018; Robillard
and DeLine, 2011; Robillard, 2009; Nykaza et al.,
2002). Hence, we identify 46 best practices candi-
dates for examples in public Web API documentation
in literature and expert interviews. In addition, we
choose a subset of eight best practices (BP01, BP03,
BP13, BP27, BP28, BP30, BP38, BP46) and analyze
their impact on API consumers’ productivity and per-
ception when learning a new API. As a result, we can
verify that the chosen best practices candidates are ac-
tual best practices for examples in public Web API
documentation.
Future work should analyze the impact of other
best practices candidates for examples in public Web
API documentation on consumer perception and pro-
ductivity.
ACKNOWLEDGMENTS
We want to thank the participants of the interviews
and the case study for their collaboration and the in-
teresting insights.
REFERENCES
Brooke, J. et al. (1996). Sus-a quick and dirty usability
scale. Usability evaluation in industry, 189(194):4–7.
Glassman, E. L., Zhang, T., Hartmann, B., and Kim, M.
(2018). Visualizing api usage examples at scale. In
Proceedings of the 2018 CHI Conference on Human
Factors in Computing Systems, pages 1–12.
Hoffman, D. and Strooper, P. (2000). Prose+ test cases=
specifications. In Proceedings. 34th International
Conference on Technology of Object-Oriented Lan-
guages and Systems-TOOLS 34, pages 239–250.
IEEE.
Hoffman, D. and Strooper, P. (2003). Api documentation
with executable examples. Journal of Systems and
Software, 66(2):143–156.
Hosono, M., Washizaki, H., Honda, K., Nagumo, H., Son-
oda, H., Fukazawa, Y., Munakata, K., Nakagawa, T.,
Nemoto, Y., Tokumoto, S., et al. (2019). Inappropriate
usage examples in web api documentations. In 2019
IEEE International Conference on Software Mainte-
nance and Evolution (ICSME), pages 343–347. IEEE.
Inzunza, S., Ju
´
arez-Ram
´
ırez, R., and Jim
´
enez, S. (2018).
Api documentation. In Rocha,
´
A., Adeli, H., Reis,
L. P., and Costanzo, S., editors, Trends and Advances
in Information Systems and Technologies, pages 229–
239, Cham. Springer International Publishing.
ISO/IEC/IEEE 29119-1 (2013). Iso/iec/ieee 29119-1: Soft-
ware and systems engineering — software testing —
part 1: Concepts and definitions — first edition 2013-
09-01. Technical report, ISO.
Jeong, S. Y., Xie, Y., Beaton, J., Myers, B. A., Stylos,
J., Ehret, R., Karstens, J., Efeoglu, A., and Busse,
D. K. (2009). Improving documentation for esoa apis
through user studies. In Pipek, V., Rosson, M. B.,
de Ruyter, B., and Wulf, V., editors, End-User Devel-
opment, pages 86–105, Berlin, Heidelberg. Springer
Berlin Heidelberg.
Jiang, J., Koskinen, J., Ruokonen, A., and Systa, T. (2007).
Constructing usage scenarios for api redocumentation.
In 15th IEEE International Conference on Program
Comprehension (ICPC’07), pages 259–264. IEEE.
Johnson, T. (2021). Documenting apis: A guide for tech-
nical writers and engineers. https://idratherbewriting.
com/learnapidoc/. (accessed 13.12.2021).
ICEIS 2022 - 24th International Conference on Enterprise Information Systems
278