Forum Discussion
1 Reply
- DougS9 years agoKhoros Oracle
Hi Gopichand, and welcome to the community!
Here are some good articles that will walk you through how to use Endpoints and Macros (the first 2 explain what endpoints and macros are and how to use them, the last 3 are around common use-cases/best practices):
- About Endpoints
- Creating FreeMarker macros for custom components and endpoints
- Calling an Endpoint from a custom component
- Using Endpoints to Condense REST API Requests
- Caching in endpoints and custom components
The best place to start learning about the Lithium REST APIs is in the Developer Documentation Portal, in the following sections:
Both of the above sections have search boxes in them -- type a term in the search box on the REST API V1 section and it will return you calls that have that term in the path, or type a term in the search box on the REST API V2 section and it will return you LiQL queries or CRUD calls you can make with that term in it.
These articles provide good references and tutorials on making REST calls via Freemarker components and endpoints (you don't need to read them all, but you might want to read some of them depending on what you are trying to do):
- Component tutorial: Building your first custom component with FreeMarker and REST
- rest FreeMarker context object
- restadmin FreeMarker context object
- Return FreeMarker objects as JSON or XML strings
- Tutorial: Update a FreeMarker component from Community REST API v1 to v2
- Creating higher-order functions using FreeMarker templates (a more advanced topic for writing reusable freemarker functions and macros)
Hope that helps!
-Doug
Related Content
- 9 months ago