Resource Traversal

Resource Expansion

< GET https://example.com/users/john_doe
> { "name": "John Doe", "friends": "/users/john_doe/friends" }

< GET https://example.com/users/john_doe?expand=friends
> { "name": "John Doe", "friends": { "joe_bloggs": "/users/joe_bloggs" } }

Substitute the link named friends with the resource at that link.

Resource Traversal

< DELETE https://example.com/users/john_doe?traverse=friends.joe_bloggs
> { "msg": "Removed friend joe_bloggs" }

Server will internally GET each link up to the last, and respond with a 307 redirect to the last.