Book Image

SoapUI Cookbook

By : Rupert Anderson
Book Image

SoapUI Cookbook

By: Rupert Anderson

Overview of this book

Table of Contents (19 chapters)
SoapUI Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Testing HATEOAS links


In very simple terms, HATEOAS links are used to help make a RESTful API understandable and navigable using the principles of Hypertext alone (see http://en.wikipedia.org/wiki/HATEOAS for a more official definition!).

At the time of writing, the structure of HATEOAS links has no official standard. For XML, the Atom (http://en.wikipedia.org/wiki/Atom_(standard)) structure is often reused. For example, here is a quote document with HATEOAS links to itself (use of a self link is common) and a link to a related customer resource:

<quote xmlns:atom="http://www.w3.org/2005/Atom">
   <id>777</id>
   <amount>100</amount>
   <atom:link rel="self" href="http://localhost:8080/quote/777"/>
   <atom:link rel="customer" href="http://localhost:8080/customer/12345"/>
</quote>

For JSON, the Atom structure is sometimes replicated:

{
    "quote": {
        "id": 12345,
        "amount": 100,
        "links": [
            {
                "rel...