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/module1Retrieve all data records from a module
CURL REQUEST:
curl -X GET "https://leafapi.com/api/project1/module1" \
-H "LEAF_API_KEY: LEAF_API_KEY_HERE"POST
https://leafapi.com/api/project1/module1Create a new record in a module
CURL REQUEST:
curl -X POST "https://leafapi.com/api/project1/module1" \
-H "LEAF_API_KEY: LEAF_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"name":"New Record","data":"value"}'GET
https://leafapi.com/api/project1/module1/:idRetrieve details of a specific record
CURL REQUEST:
curl -X GET "https://leafapi.com/api/project1/module1/123" \
-H "LEAF_API_KEY: LEAF_API_KEY_HERE"PATCH
https://leafapi.com/api/project1/module1/:idPartially update a specific record
CURL REQUEST:
curl -X PATCH "https://leafapi.com/api/project1/module1/123" \
-H "LEAF_API_KEY: LEAF_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"status":"active"}'PUT
https://leafapi.com/api/project1/module1/:idCompletely replace a record
CURL REQUEST:
curl -X PUT "https://leafapi.com/api/project1/module1/123" \
-H "LEAF_API_KEY: LEAF_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"name":"Updated Name","data":"new value"}'DELETE
https://leafapi.com/api/project1/module1/:idDelete a specific record from a module
CURL REQUEST:
curl -X DELETE "https://leafapi.com/api/project1/module1/123" \
-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"