FreeMarker API

Retrieve data exposed to the Khoros community context with our FreeMarker API. Our context objects

  • expose the community application’s state to custom components and endpoints at the community, page, user, or message level. Other objects

  • facilitate server-to-server integrations with third-party sources of data and expose methods to access and manipulate the current request and response for a custom endpoint

  • issue REST calls into Community to expose more data to custom components and to manipulate the responses from these calls

  • provide methods for caching, retrieving settings, skins, and more

This extensive API and architecture is the API you'll use to create the custom components that elevate your community experience to the next level. Custom endpoints (also written in FreeMarker) can make AJAX requests within your components, syndicate community content outside of the community, and integrate with third-party REST APIs. While components act within a community, custom endpoints are independent of the community, have separate styling, and bundle multiple REST calls to gather and manipulate data in a single location.

The FreeMarker API also supports macros and functions to encapsulate commonly-used code that can be shared across components and endpoints for reuse, easier maintenance, and DRY coding practices. Example of endpoints include:

  • modifying community or user attributes

  • passing in a user's ID to retrieve HTML via AJAX for displaying a tooltip when hovering over usernames

  • injecting additional data into a REST API response to supplement the existing data

  • creating stand-alone HTML pages

Register on Atlas to read more in the Developer Documentation about FreeMarker and custom endpoints.