API Endpoints
Copy any curl request below and paste directly into Postman or your terminal. Or try it out in our interactive demo.
Core APIs
GET
https://leafapi.com/api/project1/module1?limit=25&page=1&sort_field=created_at&sort_order=desc&search=Retrieve paginated data with sort/search. Defaults: page=1, limit=25. Response includes meta links for next/prev/first/last pages.
CURL REQUEST:
curl -X GET "https://leafapi.com/api/project1/module1?limit=25&page=1&sort_field=created_at&sort_order=desc&search=" \
-H "leaf-api-key: LEAF_API_KEY_HERE"Additional Operations
Use the following API to delete an entire module and all its records at once.
DELETE
https://leafapi.com/api/project1/module2Delete entire module and all its records - use with caution
CURL REQUEST:
curl -X DELETE "https://leafapi.com/api/project1/module2" \
-H "leaf-api-key: LEAF_API_KEY_HERE"DELETE
https://leafapi.com/api/project1Delete entire project and all its modules/records - use with caution
CURL REQUEST:
curl -X DELETE "https://leafapi.com/api/project1" \
-H "leaf-api-key: LEAF_API_KEY_HERE"