Json api link templates

This adds support for the top level links in the JSON API