This guide will help you get up and running with the LISA REST API quickly.
By the end of this guide, you'll know how to:
First, let's verify the API is working:
# Health check (no authentication required)
curl https://api.biocv.info/api/v1/health
Expected response:
{
"success": true,
"message": "LISA REST API is running",
"timestamp": "2024-12-01T08:47:16.838Z",
"version": "v1"
}
✅ Great! The API is running. Now let's authenticate.
The LISA API uses JWT token-based authentication. You'll need to generate a token before making API requests.
curl -X POST "https://api.biocv.info/api/v1/tokens" \
-H "Content-Type: application/json" \
-d '{
"integratorUID": "your-integrator-uid",
"expiresIn": 3600,
"refreshToken": true
}'
Response:
{
"success": true,
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresAt": 1640995200000,
"tokenType": "Bearer"
},
"message": "Token generated successfully",
"timestamp": "2024-12-01T08:47:16.838Z"
}
Important: Save the accessToken - you'll need it for all API requests.
Now let's use the token to make an authenticated request:
curl -H "Authorization: Bearer your-jwt-token-here" \
"https://api.biocv.info/api/v1/users/user123/animals"
Replace your-jwt-token-here with the actual access token from the previous step.
Your API call will return data in a consistent format:
{
"success": true,
"data": [
{
"ID": "Cow_001",
"MAC": "AA:BB:CC:DD:EE:FF",
"Group": "Barn_A",
"Sex": "female",
"Active": true,
"CurrentTemperature": 38.5,
"Battery": 85,
"t": 1701432000000
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 25,
"totalPages": 3
},
"timestamp": "2024-12-01T08:47:16.838Z"
}
Key points:
success: Always true for successful requestsdata: Contains the actual data (array for lists, object for single items)pagination: Shows pagination info for list endpointstimestamp: When the response was generatedMost endpoints support query parameters for filtering and pagination:
# Get first 20 animals, sorted by ID
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/users/user123/animals?page=1&limit=20&sortBy=ID&sortOrder=asc"
# Search for animals in a specific group
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/users/user123/animals/search?group=Barn_A"
# Get only active animals
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/users/user123/animals/search?active=true"
Common parameters:
page - Page number (default: 1)limit - Items per page (default: 10, max: 100)sortBy - Field to sort by (default: 't' for timestamp)sortOrder - Sort order: 'asc' or 'desc' (default: 'desc')The API provides access to several data collections:
# Get all LitterGuard devices for a user
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/users/user123/litterguards"
# Get LitterGuard summary statistics
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/users/user123/litterguards/summary"
# Get all AI predictions for an animal
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/users/user123/animals/AA:BB:CC:DD:EE:FF/predictions"
# Get only heat predictions
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/users/user123/animals/AA:BB:CC:DD:EE:FF/predictions/heat"
🎉 Congratulations! You've successfully:
Diese Seite wird aus dem offiziellen LiSA-API-Wiki erzeugt. Sollte etwas falsch sein oder fehlen, kontaktieren Sie uns — wir korrigieren es an der Quelle.
Wiki-Stand 158c1a5 · 28.7.2026Hallo! Brauchen Sie Hilfe? Chatten Sie mit mir!