Skip to main content

Example-Driven Web API Specification Discovery

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 10376))

Abstract

REpresentational State Transfer (REST) has become the dominant approach to design Web APIs nowadays, resulting in thousands of public REST Web APIs offering access to a variety of data sources (e.g., open-data initiatives) or advanced functionalities (e.g., geolocation services). Unfortunately, most of these APIs do not come with any specification that developers (and machines) can rely on to automatically understand and integrate them. Instead, most of the time we have to rely on reading its ad-hoc documentation web pages, despite the existence of languages like Swagger or, more recently, OpenAPI that developers could use to formally describe their APIs. In this paper we present an example-driven discovery process that generates model-based OpenAPI specifications for REST Web APIs by using API call examples. A tool implementing our approach and a community-driven repository for the discovered APIs are also presented.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    http://swagger.io/.

  2. 2.

    https://apiblueprint.org/.

  3. 3.

    http://raml.org/.

  4. 4.

    https://openapis.org.

  5. 5.

    https://apimatic.io/.

  6. 6.

    http://swagger.io/swagger-ui/.

  7. 7.

    https://www.runscope.com/.

  8. 8.

    https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json.

  9. 9.

    https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json.

  10. 10.

    https://github.com/swagger-api/swagger-core.

  11. 11.

    https://github.com/SOM-Research/APIDiscoverer/tree/master/metamodel.

  12. 12.

    More information about the schema information can be found at http://json-schema.org/latest/json-schema-validation.html.

  13. 13.

    application/x-www-form-urlencoded or multipart/form-data.

  14. 14.

    https://tools.ietf.org/html/rfc6901.

  15. 15.

    http://www.refugerestrooms.org/api/docs/.

  16. 16.

    http://www.omdbapi.com/.

  17. 17.

    https://graphhopper.com/.

  18. 18.

    http://passwordutility.net.

  19. 19.

    http://swagger.io/tools/.

  20. 20.

    https://lucybot.com/.

  21. 21.

    http://rebilly.github.io/ReDoc/.

  22. 22.

    https://studio.restlet.com.

  23. 23.

    http://stoplight.io/platform/design/.

  24. 24.

    https://github.com/SOM-Research/APIDiscoverer.

  25. 25.

    http://www.primefaces.org.

  26. 26.

    http://unirest.io.

  27. 27.

    http://www.eclipse.org/modeling/emf/.

  28. 28.

    https://market.mashape.com.

  29. 29.

    http://docs.seleniumhq.org/projects/webdriver/.

  30. 30.

    https://github.com/SOM-Research/hapi.

  31. 31.

    https://apis.guru/api-doc/ and http://www.apis.io/apiDoc.

References

  1. Brambilla, M., Cabot, J., Wimmer, M.: Model-Driven Software Engineering in Practice. Morgan & Claypool Publishers, San Rafael (2012)

    Google Scholar 

  2. Brambilla, M., Fraternali, P., et al.: The Interaction Flow Modeling Language (IFML). Technical report, Object Management Group (OMG) (2014)

    Google Scholar 

  3. Cabot, J., Gogolla, M.: Object constraint language (OCL): a definitive guide. In: Bernardo, M., Cortellessa, V., Pierantonio, A. (eds.) SFM 2012. LNCS, vol. 7320, pp. 58–90. Springer, Heidelberg (2012). doi:10.1007/978-3-642-30982-3_3

    Chapter  Google Scholar 

  4. Cánovas Izquierdo, J.L., Cabot, J.: JSONDiscoverer: visualizing the schema lurking behind JSON documents. Knowl.-Based Syst. 103, 52–55 (2016)

    Article  Google Scholar 

  5. Frankle, J., Osera, P.M., Walker, D., Zdancewic, S.: Example-directed synthesis: a type-theoretic interpretation. In: ACM Symposium on Principles of Programming Languages, pp. 802–815 (2016)

    Google Scholar 

  6. Hadley, M.J.: Web Application Description Language (WADL). Technical report (2006)

    Google Scholar 

  7. Klettke, M., Störl, U., Scherzinger, S., Regensburg, O.: Schema extraction and structural outlier detection for JSON-based NoSQL data stores. In: Conference on Database Systems for Business, Technology, and Web, pp. 425–444 (2015)

    Google Scholar 

  8. López-Fernández, J.J., Cuadrado, J.S., Guerra, E., de Lara, J.: Example-driven meta-model development. Softw. Syst. Model. 14(4), 1323–1347 (2015)

    Article  Google Scholar 

  9. Motahari-Nezhad, H.R., Saint-Paul, R., Casati, F., Benatallah, B.: Event correlation for process discovery from web service interaction logs. Inter. J. Very Large Data Bases 20(3), 417–444 (2011)

    Article  Google Scholar 

  10. Nierstrasz, O., Kobel, M., Girba, T., Lanza, M.: Example-driven reconstruction of software models. In: European Conference on Software Maintenance and Reengineering, pp. 275–286 (2007)

    Google Scholar 

  11. Pautasso, C., Zimmermann, O., Leymann, F.: RESTful web services vs. “Big” web services. In: International Conference on World Wide Web, pp. 805–814 (2008)

    Google Scholar 

  12. Pezoa, F., Reutter, J.L., Suarez, F., Ugarte, M., Vrgoč, D.: Foundations of JSON schema. In: International Conference on World Wide Web, pp. 263–273 (2016)

    Google Scholar 

  13. Quarteroni, S., Brambilla, M., Ceri, S.: A bottom-up, knowledge-aware approach to integrating and querying web data services. ACM Trans. Web 7(4), 19–33 (2013)

    Article  Google Scholar 

  14. Rodriguez Mier, P., Pedrinaci, C., Lama, M., Mucientes, M.: An integrated semantic web service discovery and composition framework. IEEE Trans. Serv. Comput. 9(4), 537–550 (2015)

    Article  Google Scholar 

  15. Ruiz, D.S., Morales, S.F., Molina, J.G.: Inferring versioned schemas from NoSQL databases and its applications. In: International Conference on Conceptual Modeling, pp. 467–480 (2015)

    Google Scholar 

  16. Schmidt, C., Parashar, M.: A peer-to-peer approach to web service discovery. In: International Conference on World Wide Web, pp. 211–229 (2004)

    Google Scholar 

  17. Serrour, B., Gasparotto, D.P., Kheddouci, H., Benatallah, B.: Message correlation and business protocol discovery in service interaction logs. In: Bellahsène, Z., Léonard, M. (eds.) CAiSE 2008. LNCS, vol. 5074, pp. 405–419. Springer, Heidelberg (2008). doi:10.1007/978-3-540-69534-9_31

    Chapter  Google Scholar 

  18. Sohan, S., Anslow, C., Maurer, F.: SpyREST: automated RESTful API documentation using an HTTP proxy server (N). In: International Conference on Automated Software Engineering, pp. 271–276 (2015)

    Google Scholar 

Download references

Acknowledgment

This work has been supported by the Spanish government (TIN2016-75944-R project).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hamza Ed-douibi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Ed-douibi, H., Cánovas Izquierdo, J.L., Cabot, J. (2017). Example-Driven Web API Specification Discovery. In: Anjorin, A., Espinoza, H. (eds) Modelling Foundations and Applications. ECMFA 2017. Lecture Notes in Computer Science(), vol 10376. Springer, Cham. https://doi.org/10.1007/978-3-319-61482-3_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-61482-3_16

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-61481-6

  • Online ISBN: 978-3-319-61482-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics