Abstract
Hypermedia as the Engine of Application State (HATEOAS) is one of the core constraints of REST. It refers to the concept of embedding hyperlinks into the response of a queried or manipulated resource to show a client possible follow-up actions and transitions to related resources. Thus, this concept aims to provide a client with a navigational support when interacting with a Web-based application. Although HATEOAS should be implemented by any Web-based API claiming to be RESTful, API providers tend to offer service descriptions in place of embedding hyperlinks into responses. Instead of relying on a navigational support, a client developer has to read the service description and has to identify resources and their URIs that are relevant for the interaction with the API. In this paper, we introduce an approach that aims to identify transitions between resources of a Web-based API by systematically analyzing the service description only. We devise an algorithm that automatically derives a URI Model from the service description and then analyzes the payload schemas to identify feasible values for the substitution of path parameters in URI Templates. We implement this approach as a proxy application, which injects hyperlinks representing transitions into the response payload of a queried or manipulated resource. The result is a HATEOAS-like navigational support through an API. Our first prototype operates on service descriptions in the OpenAPI format. We evaluate our approach using ten real-world APIs from different domains. Furthermore, we discuss the results as well as the observations captured in these tests.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Adafruit: Adafruit IO HTTP API 2.0.0. https://io.adafruit.com/api/docs/. Accessed 1 Oct 2020
api.gouv.fr: API Géo 1.0. https://api.gouv.fr/documentation/api-geo. Accessed 1 Oct 2020
Bogner, J., Wagner, S., Zimmermann, A.: Collecting service-based maintainability metrics from RESTful API descriptions: static analysis and threshold derivation. In: Muccini, H., et al. (eds.) ECSA 2020. CCIS, vol. 1269, pp. 215–227. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-59155-7_16
Deutsche Bahn AG: Fahrplan-Free v1. https://developer.deutschebahn.com/store/apis/info?name=Fahrplan-Free&version=v1&provider=DBOpenData. Accessed 1 Oct 2020
Fielding, R.T., Taylor, R.N.: Principled design of the modern web architecture. ACM Trans. Internet Technol. 2(2), 115–150 (2002). https://doi.org/10.1145/514183.514185
Fielding, R.T.: Architectural styles and the design of network-based software architectures. Ph.D. thesis, University of California, Irvine, USA (2000)
Giphy Inc.: Giphy API 1.0. https://developers.giphy.com/docs/api/. Accessed 1 Oct 2020
Gregorio, J., Fielding, R., Hadley, M., Nottingham, M., Orchard, D.: URI Template. RFC 6570, RFC Editor (2012)
Haupt, F., Karastoyanova, D., Leymann, F., Schroth, B.: A model-driven approach for REST compliant services. In: 2014 IEEE International Conference on Web Services (ICWS), pp. 129–136. IEEE, Anchorage (2014). https://doi.org/10.1109/ICWS.2014.30
Haupt, F., Leymann, F., Scherer, A., Vukojevic-Haupt, K.: A framework for the structural analysis of REST APIs. In: 2017 IEEE International Conference on Software Architecture (ICSA), pp. 55–58. IEEE, Gothenburg (2017). https://doi.org/10.1109/ICSA.2017.40
Haupt, F., Leymann, F., Vukojevic-Haupt, K.: API governance support through the structural analysis of REST APIs. In: Computer Science - Research and Development, pp. 291–303 (2017). https://doi.org/10.1007/s00450-017-0384-1
Home Connect GmbH: Home Connect API 1.0. https://apiclient.home-connect.com. Accessed 1 Oct 2020
Liskin, O., Singer, L., Schneider, K.: Teaching old services new tricks: adding HATEOAS support as an afterthought. In: Proceedings of the 2nd International Workshop on RESTful Design, pp. 3–10. Association for Computing Machinery, New York (2011). https://doi.org/10.1145/1967428.1967432
Masse, M.: REST API Design Rulebook, 1st edn. O’Reilly Media Inc., Sebastopol (2011)
Mercedes-Benz Connectivity Services GmbH: Car Configurator API 1.0. https://developer.mercedes-benz.com/products/car_configurator/specification. Accessed 1 Oct 2020
Neumann, A., Laranjeiro, N., Bernardino, J.: An analysis of public REST web service APIs. IEEE Trans. Serv. Comput.(2018)
Craig, P.: Canada Holidays API 1.0. https://canada-holidays.ca/api. Accessed 1 Oct 2020
Pennington, J., Socher, R., Manning, C.D.: GloVe: global vectors for word representation. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1532–1543. Association for Computational Linguistics, Doha (2014). https://doi.org/10.3115/v1/D14-1162
Renzel, D., Schlebusch, P., Klamma, R.: Today’s top “RESTful” services and why they are not RESTful. In: Wang, X.S., Cruz, I., Delis, A., Huang, G. (eds.) WISE 2012. LNCS, vol. 7651, pp. 354–367. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-35063-4_26
SmartBear Software: SwaggerHub Registry API 1.0.47. https://app.swaggerhub.com/apis/swagger-hub/registry-api/1.0.47. Accessed 1 Oct 2020
Spotify, A.B.: Web API v1. https://developer.spotify.com/documentation/web-api/. Accessed 1 Oct 2020
Webber, J., Parastatidis, S., Robinson, I.: REST in Practice: Hypermedia and Systems Architecture, 1st edn. O’Reilly Media Inc., Sebastopol (2010)
Zoom Video Communications Inc.: Zoom API 2.0.0. https://marketplace.zoom.us/docs/api-reference/zoom-api. Accessed 1 Oct 2020
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Kotstein, S., Decker, C. (2020). Navigational Support for Non HATEOAS-Compliant Web-Based APIs. In: Dustdar, S. (eds) Service-Oriented Computing. SummerSOC 2020. Communications in Computer and Information Science, vol 1310. Springer, Cham. https://doi.org/10.1007/978-3-030-64846-6_10
Download citation
DOI: https://doi.org/10.1007/978-3-030-64846-6_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-64845-9
Online ISBN: 978-3-030-64846-6
eBook Packages: Computer ScienceComputer Science (R0)