Università
della
Svizzera
Italiana
Software Institute

Towards Large-scale Empirical Assessment of Web APIs Evolution

Fabio Di Lauro, Souhaila Serbout, Cesare Pautasso

Web Application Programming Interfaces
  • Remotely access services over HTTP(S)
  • Speed up development with third party API services
  • Reuse software written in different languages

APIs evolution:

Add Update Delete

Mitigation techniques:

  • Preview of new experimental versions
  • Support one or more versions at the same time

OpenAPI 3.x or Swagger 2.x

OpenAPI Specifications: https://spec.openapis.org/oas/v3.1.0

GitHub crawler (December 2020)

  • 4,682 open-source API descriptions (Swagger 2.x || OpenAPI 3.x)
  • 34,638 commits (13,786 commits with valid content)
  • 55% of the APIs have more than 1 commit

Yearly distribution of commits

Our goal

Assess the feasibility of using API descriptions mined from GitHub to study how Web APIs evolve over long periods of time.

  • Do the API artifacts have a sufficiently long history?
  • What kind of changes can be detected by analyzing basic metadata associated with the artifacts?
  • How stable are API artifacts over time?
  • Do APIs tend to grow or shrink over time?

API Size = Number of Operations

A simple metric that counts how many operations are published by the API


OpenAPI-to-Tree is an API visualization tool developed by Souhaila Serbout
https://openapi-to-tree.herokuapp.com/

Size (Number of Operations) = 4

API evolution examples

OpenStorage SDK

Dockstore API

Kubermatic API

RQ1: Dataset overview

Commit History of APIs with more than 10 commits, sorted by number of commits

Age

How old are the APIs?

RQ2: API Versioning Metadata

What kind of changes can be detected from versioning metadata?

RQ3: API stability

Do APIs change less as they age?

RQ4: API Size Evolution

How many APIs with more than 2 commits grow or shrink their size?

In summary

  • Do the API artifacts have a sufficiently long history? Yes (875 APIs with a history of more than 2 commits)
  • What kind of changes can be detected by analyzing basic metadata associated with the artifacts? Commits do not always match version increments
  • How stable are API artifacts over time? Likelihood of change does not depend on age
  • Do APIs tend to grow or shrink over time? More APIs became larger, but some did shrink

One more thing

Voyager

speed = 0.00 operations/day

Future work

  • Can these artifacts be used to trace, measure, and classify changes on APIs structures during their lifetime?
  • Define more metrics
  • Track repository relationships and forks
  • ...

Towards Large-scale Empirical Assessment of Web APIs Evolution

Fabio Di Lauro, Souhaila Serbout, Cesare Pautasso

References

  • Di Lauro F., Serbout S., Pautasso C. "Towards Large-scale Empirical Assessment of Web APIs Evolution", Proc. of the 21th International Conference on Web Engineering (ICWE 2021), Biarritz, France, May 2021
  • Lübke, D., Zimmermann, O., Pautasso, C., Zdun, U., Stocker, M.: Interface evolution patterns — balancing compatibility and flexibility across microservices lifecycles. In: Proc. 24th European Conference on Pattern Languages of Programs (EuroPLoP 2019). ACM (2019)
  • OpenAPI 3.1.0 specification. https://spec.openapis.org/oas/v3.1.0, accessed: 2021-04-20
  • OpenAPI-to-tree. https://openapi-to-tree.herokuapp.com/, accessed: 2021-04-21
  • Prance. https://pypi.org/project/prance/, accessed: 2021-04-20