REST API to update Content Fragments?

Developer Space

Developer Space
Want to extend the Telligent Evolution platform? Collaborate with other developers and product experts here.

REST API to update Content Fragments?

This question has suggested answer(s)


I'm working on a project to automatically publish data to a blog. The same post gets continually updated, and this method is working fantastically. However, the other day, the scope of the project changed and now I need to publish the same data to a content fragment on a content page.


I'm trying to find the correct URI to update the content fragment, but for the life of me, I can't find it. Using /blogs/{blogid}/posts/{postid}.json worked great for the blog, but what's the path for a fragment?


If updating a fragment through the REST API isn't possible, can I embed a specific blog post into the content fragment? Are there any other potential workarounds?

All Replies
  • There is not a REST API for updating content fragments, though there is an in-process one.

    That said, you'd probably be better off re-rendering that blog post on your custom page. You can already add a Blog Post List widget to your content page and configure it to pull from a specific blog.

    However, this will not just pull a single post from the blog. If that's an issue, you could copy the Blog Post widget and make a small modification to it to support showing a specific blog post instead of the current contextual post (there would be no contextual post since it wouldn't be on a blog post URL)

    The changes necessary in (a copy of) the Blog Post widget in Widget Studio:

    1 - Remove 'Blog Post' as a required context on the widget's Configuration tab

    2 - In the first 2 lines of the widget's Content script, change:

    #set($post = $core_v2_blogPost.Current)


    #set($post = $core_v2_blogPost.Get(...))

    where the call to $core_v2_blogPost.Get() is passed either necessary content id or blog and post id as defined by its API:

    Hope this helps!