cURL Examples
This guide provides practical command-line examples using cURL for testing and automating the Smart Tech Export API.
Prerequisites
Before running these examples, ensure you have:
curlcommand-line tool installedjqfor JSON formatting (optional but recommended): Most systems have this available- Valid API token from Smart Tech App
- Access to the meters you want to query
Basic Example
Simple cURL command for API testing:
curl -X POST https://app.smart-tech.live/api/v1/export/monthly/ \
-H "Authorization: Token your-api-token-here" \
-H "Content-Type: application/json" \
-d '{
"uuids": ["meter-uuid-1", "meter-uuid-2"],
"month": "2024-01"
}'
Pretty-Printed JSON Response
With formatted JSON output using jq:
curl -X POST https://app.smart-tech.live/api/v1/export/monthly/ \
-H "Authorization: Token your-api-token-here" \
-H "Content-Type: application/json" \
-d '{
"uuids": ["meter-uuid-1", "meter-uuid-2"],
"month": "2024-01"
}' | jq '.'
Related Documentation
- Export API Reference - Complete API documentation
- Python Examples - Python implementation examples
- Node.js Examples - JavaScript/Node.js implementation examples