Url resolving added to Content Delivery API

Changes in: api Permalink

The content delivery api has now the possibility for link resolving of items like global navigation items. With the parameter resolve_links and the values story and url the developer can now choose between resolving a link as “story” or as a smaller “url” object.

Request without resolve_links=url

{
  "story": {
    "content": {
      "link": {
        "id": "f5c956e6-66a9-4f0b-a530-2ae88b9689a6",
        "url": "", // entered URL if external link
        "linktype": "story",
        "fieldtype": "multilink",
        "cached_url": "my-folder/my-cached-url" // a cached URL based on time of publication
      }
    }
  }
}

Request with resolve_links=url

{
  "story": {
    "content": {
      "link": {
        "id": "f5c956e6-66a9-4f0b-a530-2ae88b9689a6",
        "url": "", // entered URL if external link
        "linktype": "story",
        "fieldtype": "multilink",
        "cached_url": "my-folder/my-cached-url", // a cached URL based on time of publication
        "story": { // NEW story object inside the link field of yours
          "name": "My Linked Entry",
          "id": 669642,
          "uuid": "f5c956e6-66a9-4f0b-a530-2ae88b9689a6",
          "slug": "my-updated-url",
          "full_slug": "my-folder/my-updated-url", 
          "url": "my-folder/my-updated-url" // <-- URL that can be used for links and will stay up2date
        }
      }
    }
  }
}