REST Api
Trilly provides two REST API endpoints to fetch content. Both can be requested using GET and POST methods. For GET request, context must be sent in query string, for POST in requets body as JSON.
Every request must have Trilly-Api-Key
header with valid API key. You can get your API key from Trilly dashboard.
Base addess of the API is https://trilly.onrender.com/api/v1/content/
.
Fetch a collection
Endpoint: /api/v1/content/{collectionName}
Example:
curl -X POST https://trilly.onrender.com/api/v1/content/pages \
-H "Content-Type: application/json" \
-H "Trilly-Api-Key: YOUR_API_KEY" \
-d '{"language":"en", "userType": "VIP"}'
Fetch a container
Endpoint: /api/v1/content/{collectionName}/{containerName}
Example:
curl -X POST https://trilly.onrender.com/api/v1/content/pages/homepage \
-H "Content-Type: application/json" \
-H "Trilly-Api-Key: YOUR_API_KEY" \
-d '{"language":"en", "userType": "VIP"}'